public class ChunkSection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private short |
blockRefCount |
private short |
blockTickRefCount |
private PalettedContainer<BlockState> |
data |
private short |
fluidRefCount |
private static IPalette<BlockState> |
REGISTRY_PALETTE |
private int |
yBase |
Constructor and Description |
---|
ChunkSection(int yBaseIn) |
ChunkSection(int yBaseIn,
short blockRefCountIn,
short blockTickRefCountIn,
short fluidRefCountIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(BlockState state) |
BlockState |
getBlockState(int x,
int y,
int z) |
PalettedContainer<BlockState> |
getData() |
IFluidState |
getFluidState(int x,
int y,
int z) |
int |
getSize() |
int |
getYLocation() |
boolean |
isEmpty() |
static boolean |
isEmpty(ChunkSection section) |
void |
lock() |
boolean |
needsRandomTick() |
boolean |
needsRandomTickAny() |
boolean |
needsRandomTickFluid() |
void |
read(PacketBuffer packetBufferIn) |
void |
recalculateRefCounts() |
BlockState |
setBlockState(int x,
int y,
int z,
BlockState blockStateIn) |
BlockState |
setBlockState(int x,
int y,
int z,
BlockState state,
boolean useLocks) |
void |
unlock() |
void |
write(PacketBuffer packetBufferIn) |
private static final IPalette<BlockState> REGISTRY_PALETTE
private final int yBase
private short blockRefCount
private short blockTickRefCount
private short fluidRefCount
private final PalettedContainer<BlockState> data
public ChunkSection(int yBaseIn)
public ChunkSection(int yBaseIn, short blockRefCountIn, short blockTickRefCountIn, short fluidRefCountIn)
public BlockState getBlockState(int x, int y, int z)
public IFluidState getFluidState(int x, int y, int z)
public void lock()
public void unlock()
public BlockState setBlockState(int x, int y, int z, BlockState blockStateIn)
public BlockState setBlockState(int x, int y, int z, BlockState state, boolean useLocks)
public boolean isEmpty()
public static boolean isEmpty(@Nullable ChunkSection section)
public boolean needsRandomTickAny()
public boolean needsRandomTick()
public boolean needsRandomTickFluid()
public int getYLocation()
public void recalculateRefCounts()
public PalettedContainer<BlockState> getData()
public void read(PacketBuffer packetBufferIn)
public void write(PacketBuffer packetBufferIn)
public int getSize()
public boolean contains(BlockState state)