public class BlockStatePaletteHashMap extends java.lang.Object implements IBlockStatePalette
Modifier and Type | Field and Description |
---|---|
private int |
bits |
private IBlockStatePaletteResizer |
paletteResizer |
private IntIdentityHashBiMap<IBlockState> |
statePaletteMap |
Constructor and Description |
---|
BlockStatePaletteHashMap(int bitsIn,
IBlockStatePaletteResizer paletteResizerIn) |
Modifier and Type | Method and Description |
---|---|
IBlockState |
getBlockState(int indexKey) |
int |
getSerializedSize() |
int |
idFor(IBlockState state) |
void |
read(PacketBuffer buf) |
void |
write(PacketBuffer buf) |
private final IntIdentityHashBiMap<IBlockState> statePaletteMap
private final IBlockStatePaletteResizer paletteResizer
private final int bits
public BlockStatePaletteHashMap(int bitsIn, IBlockStatePaletteResizer paletteResizerIn)
public int idFor(IBlockState state)
idFor
in interface IBlockStatePalette
@Nullable public IBlockState getBlockState(int indexKey)
getBlockState
in interface IBlockStatePalette
public void read(PacketBuffer buf)
read
in interface IBlockStatePalette
public void write(PacketBuffer buf)
write
in interface IBlockStatePalette
public int getSerializedSize()
getSerializedSize
in interface IBlockStatePalette