Class Chunk

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

public class Chunk extends Object
  • Field Details

    • EMPTY_HEIGHT_MAP

      public static final com.viaversion.nbt.mini.MNBT EMPTY_HEIGHT_MAP
  • Constructor Details

  • Method Details

    • generateEmptyHeightMap

      public static com.viaversion.nbt.mini.MNBT generateEmptyHeightMap()
    • getHeightMap

      public final com.viaversion.nbt.mini.MNBT 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()
    • getX

      public int getX()
    • getZ

      public int getZ()
    • getSections

      public ChunkSection[] getSections()
    • getMaxSection

      public int getMaxSection()
    • getMinSection

      public int getMinSection()
    • getBlockEntities

      public List<BlockEntityInfo> getBlockEntities()
    • getLightUpdateData

      public LightUpdateData getLightUpdateData()
    • setLightUpdateData

      public void setLightUpdateData(LightUpdateData lightUpdateData)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object