Package net.minecraft.world.chunk
Class ChunkSection
java.lang.Object
net.minecraft.world.chunk.ChunkSection
public class ChunkSection extends Object
-
Field Summary
Fields Modifier and Type Field Description private PalettedContainer<BlockState>
container
private short
nonEmptyBlockCount
private short
nonEmptyFluidCount
private static Palette<BlockState>
PALETTE
private short
randomTickableBlockCount
private int
yOffset
-
Constructor Summary
Constructors Constructor Description ChunkSection(int yOffset)
ChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount)
-
Method Summary
Modifier and Type Method Description void
calculateCounts()
void
fromPacket(PacketByteBuf packetByteBuf)
BlockState
getBlockState(int x, int y, int z)
PalettedContainer<BlockState>
getContainer()
FluidState
getFluidState(int x, int y, int z)
int
getPacketSize()
int
getYOffset()
boolean
hasAny(Predicate<BlockState> predicate)
boolean
hasRandomBlockTicks()
boolean
hasRandomFluidTicks()
boolean
hasRandomTicks()
boolean
isEmpty()
static boolean
isEmpty(ChunkSection section)
void
lock()
BlockState
setBlockState(int x, int y, int z, BlockState state)
BlockState
setBlockState(int x, int y, int z, BlockState state, boolean lock)
void
toPacket(PacketByteBuf packetByteBuf)
void
unlock()
-
Field Details
-
PALETTE
-
yOffset
private final int yOffset -
nonEmptyBlockCount
private short nonEmptyBlockCount -
randomTickableBlockCount
private short randomTickableBlockCount -
nonEmptyFluidCount
private short nonEmptyFluidCount -
container
-
-
Constructor Details
-
ChunkSection
public ChunkSection(int yOffset) -
ChunkSection
public ChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount)
-
-
Method Details
-
getBlockState
-
getFluidState
-
lock
public void lock() -
unlock
public void unlock() -
setBlockState
-
setBlockState
-
isEmpty
public boolean isEmpty() -
isEmpty
-
hasRandomTicks
public boolean hasRandomTicks() -
hasRandomBlockTicks
public boolean hasRandomBlockTicks() -
hasRandomFluidTicks
public boolean hasRandomFluidTicks() -
getYOffset
public int getYOffset() -
calculateCounts
public void calculateCounts() -
getContainer
-
fromPacket
-
toPacket
-
getPacketSize
public int getPacketSize() -
hasAny
-