public class ChunkSection extends Object
Modifier and Type | Field and Description |
---|---|
private PalettedContainer<BlockState> |
container |
private short |
nonEmptyBlockCount |
private short |
nonEmptyFluidCount |
private static Palette<BlockState> |
PALETTE |
private short |
randomTickableBlockCount |
private int |
yOffset |
Constructor and Description |
---|
ChunkSection(int yOffset) |
ChunkSection(int yOffset,
short nonEmptyBlockCount,
short randomTickableBlockCount,
short nonEmptyFluidCount) |
Modifier and Type | Method and 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() |
private static final Palette<BlockState> PALETTE
private final int yOffset
private short nonEmptyBlockCount
private short randomTickableBlockCount
private short nonEmptyFluidCount
private final PalettedContainer<BlockState> container
public ChunkSection(int yOffset)
public ChunkSection(int yOffset, short nonEmptyBlockCount, short randomTickableBlockCount, short nonEmptyFluidCount)
public BlockState getBlockState(int x, int y, int z)
public FluidState getFluidState(int x, int y, int z)
public void lock()
public void unlock()
public BlockState setBlockState(int x, int y, int z, BlockState state)
public BlockState setBlockState(int x, int y, int z, BlockState state, boolean lock)
public boolean isEmpty()
public static boolean isEmpty(@Nullable ChunkSection section)
public boolean hasRandomTicks()
public boolean hasRandomBlockTicks()
public boolean hasRandomFluidTicks()
public int getYOffset()
public void calculateCounts()
public PalettedContainer<BlockState> getContainer()
@Environment(value=CLIENT) public void fromPacket(PacketByteBuf packetByteBuf)
public void toPacket(PacketByteBuf packetByteBuf)
public int getPacketSize()
public boolean hasAny(Predicate<BlockState> predicate)