public class BlockStateContainer extends java.lang.Object implements IBlockStatePaletteResizer
Modifier and Type | Field and Description |
---|---|
protected static IBlockState |
AIR_BLOCK_STATE |
private int |
bits |
protected IBlockStatePalette |
palette |
private static IBlockStatePalette |
REGISTRY_BASED_PALETTE |
protected BitArray |
storage |
Constructor and Description |
---|
BlockStateContainer() |
Modifier and Type | Method and Description |
---|---|
protected IBlockState |
get(int index) |
IBlockState |
get(int x,
int y,
int z) |
NibbleArray |
getDataForNBT(byte[] blockIds,
NibbleArray data) |
private static int |
getIndex(int x,
int y,
int z) |
int |
getSerializedSize() |
int |
onResize(int bits,
IBlockState state) |
void |
read(PacketBuffer buf) |
protected void |
set(int index,
IBlockState state) |
void |
set(int x,
int y,
int z,
IBlockState state) |
private void |
setBits(int bitsIn) |
private void |
setBits(int bitsIn,
boolean forceBits) |
void |
setDataFromNBT(byte[] blockIds,
NibbleArray data,
NibbleArray blockIdExtension) |
void |
write(PacketBuffer buf) |
private static final IBlockStatePalette REGISTRY_BASED_PALETTE
protected static final IBlockState AIR_BLOCK_STATE
protected BitArray storage
protected IBlockStatePalette palette
private int bits
private static int getIndex(int x, int y, int z)
private void setBits(int bitsIn)
private void setBits(int bitsIn, boolean forceBits)
public int onResize(int bits, IBlockState state)
onResize
in interface IBlockStatePaletteResizer
public void set(int x, int y, int z, IBlockState state)
protected void set(int index, IBlockState state)
public IBlockState get(int x, int y, int z)
protected IBlockState get(int index)
public void read(PacketBuffer buf)
public void write(PacketBuffer buf)
@Nullable public NibbleArray getDataForNBT(byte[] blockIds, NibbleArray data)
public void setDataFromNBT(byte[] blockIds, NibbleArray data, @Nullable NibbleArray blockIdExtension)
public int getSerializedSize()