Class ChunkSection

java.lang.Object
net.minecraft.world.chunk.ChunkSection

public class ChunkSection
extends Object
  • Field Details

    • PALETTE

      private static final Palette<BlockState> PALETTE
    • yOffset

      private final int yOffset
    • nonEmptyBlockCount

      private short nonEmptyBlockCount
    • randomTickableBlockCount

      private short randomTickableBlockCount
    • nonEmptyFluidCount

      private short nonEmptyFluidCount
    • container

      private final PalettedContainer<BlockState> container
  • Constructor Details

    • ChunkSection

      public ChunkSection​(int yOffset)
    • ChunkSection

      public ChunkSection​(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount)
  • Method Details

    • getBlockState

      public BlockState getBlockState​(int x, int y, int z)
    • getFluidState

      public FluidState getFluidState​(int x, int y, int z)
    • lock

      public void lock()
    • unlock

      public void unlock()
    • setBlockState

      public BlockState setBlockState​(int x, int y, int z, BlockState state)
    • setBlockState

      public BlockState setBlockState​(int x, int y, int z, BlockState state, boolean lock)
    • isEmpty

      public boolean isEmpty()
    • isEmpty

      public static boolean isEmpty​(@Nullable ChunkSection section)
    • hasRandomTicks

      public boolean hasRandomTicks()
    • hasRandomBlockTicks

      public boolean hasRandomBlockTicks()
    • hasRandomFluidTicks

      public boolean hasRandomFluidTicks()
    • getYOffset

      public int getYOffset()
    • calculateCounts

      public void calculateCounts()
    • getContainer

      public PalettedContainer<BlockState> getContainer()
    • fromPacket

      @Environment(CLIENT) public void fromPacket​(PacketByteBuf packetByteBuf)
    • toPacket

      public void toPacket​(PacketByteBuf packetByteBuf)
    • getPacketSize

      public int getPacketSize()
    • hasAny

      public boolean hasAny​(Predicate<BlockState> predicate)