Interface Chunk

  • All Known Implementing Classes:
    BaseChunk

    public interface Chunk
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int @Nullable [] getBiomeData()
      Returns the chunk's raw biome data.
      int getBitmask()
      Returns the chunk section bit mask for chunks < 1.17.
      java.util.List<com.github.steveice10.opennbt.tag.builtin.CompoundTag> getBlockEntities()
      Returns a list of block entities.
      @Nullable java.util.BitSet getChunkMask()
      Returns the chunk section bit mask, only non-null for 1.17+ chunks.
      @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag getHeightMap()
      Returns a compoundtag containing the chunk's heightmaps if present.
      @Nullable ChunkSection[] getSections()
      Returns an array of nullable chunk section entries.
      int getX()
      Returns the chunk x coordinate.
      int getZ()
      Returns the chunk z coordinate.
      boolean isBiomeData()
      Returns whether this chunk holds biome data, always true for 1.17+ chunks.
      boolean isFullChunk()
      Returns whether this is a full chunk, always true for 1.17+ chunks.
      boolean isIgnoreOldLightData()  
      void setBiomeData​(int @Nullable [] biomeData)  
      void setBitmask​(int bitmask)  
      void setChunkMask​(java.util.BitSet chunkSectionMask)  
      void setHeightMap​(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag heightMap)  
      void setIgnoreOldLightData​(boolean ignoreOldLightData)  
      void setSections​(ChunkSection[] sections)  
    • Method Detail

      • getX

        int getX()
        Returns the chunk x coordinate.
        Returns:
        chunk x coordinate
      • getZ

        int getZ()
        Returns the chunk z coordinate.
        Returns:
        chunk z coordinate
      • isBiomeData

        boolean isBiomeData()
        Returns whether this chunk holds biome data, always true for 1.17+ chunks.
        Returns:
        true if this chunk holds biome data
      • isFullChunk

        boolean isFullChunk()
        Returns whether this is a full chunk, always true for 1.17+ chunks.
        Returns:
        true if this is a full chunk
      • isIgnoreOldLightData

        boolean isIgnoreOldLightData()
      • setIgnoreOldLightData

        void setIgnoreOldLightData​(boolean ignoreOldLightData)
      • getBitmask

        int getBitmask()
        Returns the chunk section bit mask for chunks < 1.17.
        Returns:
        chunk section bit mask for chunks < 1.17
        See Also:
        getChunkMask()
      • setBitmask

        void setBitmask​(int bitmask)
      • getChunkMask

        @Nullable java.util.BitSet getChunkMask()
        Returns the chunk section bit mask, only non-null for 1.17+ chunks.
        Returns:
        chunk section bit mask, only non-null for 1.17+ chunks
        See Also:
        getBitmask()
      • setChunkMask

        void setChunkMask​(java.util.BitSet chunkSectionMask)
      • getSections

        @Nullable ChunkSection[] getSections()
        Returns an array of nullable chunk section entries.
        Returns:
        array of nullable chunk sections
      • setSections

        void setSections​(ChunkSection[] sections)
      • getBiomeData

        int @Nullable [] getBiomeData()
        Returns the chunk's raw biome data. The format the biomes are stored may vary.
        Returns:
        raw biome data
      • setBiomeData

        void setBiomeData​(int @Nullable [] biomeData)
      • getHeightMap

        @Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag getHeightMap()
        Returns a compoundtag containing the chunk's heightmaps if present.
        Returns:
        compoundtag containing heightmaps if present
      • setHeightMap

        void setHeightMap​(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag heightMap)
      • getBlockEntities

        java.util.List<com.github.steveice10.opennbt.tag.builtin.CompoundTag> getBlockEntities()
        Returns a list of block entities.
        Returns:
        list of block entities