Class Chunk
java.lang.Object
com.zenith.cache.data.chunk.Chunk
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChunk(int x, int z, ChunkSection[] sections, int maxSection, int minSection, List<BlockEntityInfo> blockEntities, LightUpdateData lightUpdateData) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic longchunkPosToLong(int x, int z) booleanstatic Map<HeightmapTypes, long[]> intgetBlockStateId(int relativeX, int y, int relativeZ) longgetChunkSection(int y) final Map<HeightmapTypes, long[]> Client do not need a valid heightmap for rendering and gameplay to work Also even if we do cache real heightmaps they are not guaranteed to be correct as we do not have logic to rebuild or mutate heightmaps as block updates occurintintintgetSectionIndex(int y) intintgetX()intgetZ()inthashCode()static intlongToChunkX(long l) static intlongToChunkZ(long l) intmaxY()intminY()voidsetLightUpdateData(LightUpdateData lightUpdateData) toString()
-
Field Details
-
EMPTY_HEIGHT_MAP
-
-
Constructor Details
-
Chunk
public Chunk(int x, int z, ChunkSection[] sections, int maxSection, int minSection, List<BlockEntityInfo> blockEntities, LightUpdateData lightUpdateData)
-
-
Method Details
-
generateEmptyHeightMap
-
getHeightMap
Client do not need a valid heightmap for rendering and gameplay to work Also even if we do cache real heightmaps they are not guaranteed to be correct as we do not have logic to rebuild or mutate heightmaps as block updates occur -
getChunkPos
public long getChunkPos() -
chunkPosToLong
public static long chunkPosToLong(int x, int z) -
longToChunkX
public static int longToChunkX(long l) -
longToChunkZ
public static int longToChunkZ(long l) -
getBlockStateId
public int getBlockStateId(int relativeX, int y, int relativeZ) -
getChunkSection
-
getSectionIndex
public int getSectionIndex(int y) -
minY
public int minY() -
maxY
public int maxY() -
getSectionsCount
public int getSectionsCount() -
getX
public int getX() -
getZ
public int getZ() -
getSections
-
getMaxSection
public int getMaxSection() -
getMinSection
public int getMinSection() -
getBlockEntities
-
getLightUpdateData
-
setLightUpdateData
-
equals
-
canEqual
-
hashCode
-
toString
-