Class Chunk

java.lang.Object
com.zenith.cache.data.chunk.Chunk

public class Chunk extends Object
  • Field Details

    • EMPTY_HEIGHT_MAP

      public static final Map<HeightmapTypes, long[]> EMPTY_HEIGHT_MAP
  • Constructor Details

    • Chunk

      public Chunk()
  • Method Details

    • generateEmptyHeightMap

      public static Map<HeightmapTypes, long[]> generateEmptyHeightMap()
    • getHeightMap

      public final Map<HeightmapTypes, long[]> 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

      public ChunkSection getChunkSection(int y)
    • getSectionIndex

      public int getSectionIndex(int y)
    • minY

      public int minY()
    • maxY

      public int maxY()
    • getSectionsCount

      public int getSectionsCount()