java.lang.Object
com.viaversion.viaversion.api.minecraft.chunks.Chunk1_18
All Implemented Interfaces:
Chunk

public class Chunk1_18 extends Object implements Chunk
  • Field Details

    • x

      protected final int x
    • z

      protected final int z
    • sections

      protected ChunkSection[] sections
    • heightMap

      protected com.viaversion.nbt.tag.CompoundTag heightMap
    • blockEntities

      protected final List<BlockEntity> blockEntities
  • Constructor Details

    • Chunk1_18

      public Chunk1_18(int x, int z, ChunkSection[] sections, com.viaversion.nbt.tag.CompoundTag heightMap, List<BlockEntity> blockEntities)
  • Method Details

    • isBiomeData

      public boolean isBiomeData()
      Description copied from interface: Chunk
      Returns whether this chunk holds biome data, always true for 1.17+ chunks.
      Specified by:
      isBiomeData in interface Chunk
      Returns:
      true if this chunk holds biome data
    • getX

      public int getX()
      Description copied from interface: Chunk
      Returns the chunk x coordinate.
      Specified by:
      getX in interface Chunk
      Returns:
      chunk x coordinate
    • getZ

      public int getZ()
      Description copied from interface: Chunk
      Returns the chunk z coordinate.
      Specified by:
      getZ in interface Chunk
      Returns:
      chunk z coordinate
    • isFullChunk

      public boolean isFullChunk()
      Description copied from interface: Chunk
      Returns whether this is a full chunk, always true for 1.17+ chunks.
      Specified by:
      isFullChunk in interface Chunk
      Returns:
      true if this is a full chunk
    • isIgnoreOldLightData

      public boolean isIgnoreOldLightData()
      Specified by:
      isIgnoreOldLightData in interface Chunk
    • setIgnoreOldLightData

      public void setIgnoreOldLightData(boolean ignoreOldLightData)
      Specified by:
      setIgnoreOldLightData in interface Chunk
    • getBitmask

      public int getBitmask()
      Description copied from interface: Chunk
      Returns the chunk section bit mask for chunks < 1.17.
      Specified by:
      getBitmask in interface Chunk
      Returns:
      chunk section bit mask for chunks < 1.17
      See Also:
    • setBitmask

      public void setBitmask(int bitmask)
      Specified by:
      setBitmask in interface Chunk
    • getChunkMask

      public @Nullable BitSet getChunkMask()
      Description copied from interface: Chunk
      Returns the chunk section bit mask, only non-null for 1.17+ chunks.
      Specified by:
      getChunkMask in interface Chunk
      Returns:
      chunk section bit mask, only non-null for 1.17+ chunks
      See Also:
    • setChunkMask

      public void setChunkMask(BitSet chunkSectionMask)
      Specified by:
      setChunkMask in interface Chunk
    • getSections

      public ChunkSection[] getSections()
      Description copied from interface: Chunk
      Returns an array of nullable chunk section entries.
      Specified by:
      getSections in interface Chunk
      Returns:
      array of nullable chunk sections
    • setSections

      public void setSections(ChunkSection[] sections)
      Specified by:
      setSections in interface Chunk
    • getBiomeData

      public int @Nullable [] getBiomeData()
      Description copied from interface: Chunk
      Returns the chunk's raw biome data. The format the biomes are stored may vary.
      Specified by:
      getBiomeData in interface Chunk
      Returns:
      raw biome data
    • setBiomeData

      public void setBiomeData(int @Nullable [] biomeData)
      Specified by:
      setBiomeData in interface Chunk
    • getHeightMap

      public @Nullable com.viaversion.nbt.tag.CompoundTag getHeightMap()
      Description copied from interface: Chunk
      Returns a compoundtag containing the chunk's heightmaps if present.
      Specified by:
      getHeightMap in interface Chunk
      Returns:
      compoundtag containing heightmaps if present
    • setHeightMap

      public void setHeightMap(com.viaversion.nbt.tag.CompoundTag heightMap)
      Specified by:
      setHeightMap in interface Chunk
    • getBlockEntities

      public List<com.viaversion.nbt.tag.CompoundTag> getBlockEntities()
      Description copied from interface: Chunk
      Returns a list of block entities.
      Specified by:
      getBlockEntities in interface Chunk
      Returns:
      list of block entities
    • blockEntities

      public List<BlockEntity> blockEntities()
      Description copied from interface: Chunk
      Returns a list of block entities.
      Specified by:
      blockEntities in interface Chunk
      Returns:
      list of block entities