Class Chunk
java.lang.Object
com.zenith.cache.data.chunk.Chunk
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longchunkPosToLong(int x, int z) static 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 occurintgetSectionIndex(int y) intstatic intlongToChunkX(long l) static intlongToChunkZ(long l) intmaxY()intminY()
-
Field Details
-
EMPTY_HEIGHT_MAP
-
-
Constructor Details
-
Chunk
public Chunk()
-
-
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()
-