Interface ChunkSection

All Known Implementing Classes:
ChunkSectionImpl

public interface ChunkSection
  • Field Details

    • SIZE

      static final int SIZE
      Size (dimensions) of blocks in a chunks section.
      See Also:
    • BIOME_SIZE

      static final int BIOME_SIZE
      Size (dimensions) of biomes in a chunks section.
      See Also:
  • Method Details

    • index

      static int index(int x, int y, int z)
    • xFromIndex

      static int xFromIndex(int idx)
    • yFromIndex

      static int yFromIndex(int idx)
    • zFromIndex

      static int zFromIndex(int idx)
    • getNonAirBlocksCount

      int getNonAirBlocksCount()
      Returns the number of non-air blocks in this section.
      Returns:
      non-air blocks in this section
    • setNonAirBlocksCount

      void setNonAirBlocksCount(int nonAirBlocksCount)
    • hasLight

      default boolean hasLight()
      Returns whether this section holds light data. Only true for < 1.14 chunks.
      Returns:
      whether this section holds light data
    • getLight

      @Nullable ChunkSectionLight getLight()
      Returns the light of the chunk section. Only present for < 1.14 chunks, otherwise sent separately.
      Returns:
      chunk section light if present
    • setLight

      void setLight(@Nullable ChunkSectionLight light)
    • palette

      @Nullable DataPalette palette(PaletteType type)
      Returns the palette of the given type if present.
      Parameters:
      type - type of the palette
      Returns:
      palette
    • addPalette

      void addPalette(PaletteType type, DataPalette blockPalette)
    • removePalette

      void removePalette(PaletteType type)