public class BlockPalette extends Object
| Modifier and Type | Field and Description |
|---|---|
static BlockPalette |
INSTANCE |
| Constructor and Description |
|---|
BlockPalette() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(Identifier identifier,
BlockSerializer serializer,
BlockTrait<?>[] traits) |
BlockState |
getBlockState(int runtimeId) |
BlockState |
getBlockState(com.nukkitx.nbt.NbtMap tag) |
BlockState |
getDefaultState(Identifier blockType) |
int |
getRuntimeId(BlockState blockState) |
com.nukkitx.nbt.NbtMap |
getSerialized(BlockState state) |
Map<BlockState,com.nukkitx.nbt.NbtMap> |
getSerializedPalette() |
public static final BlockPalette INSTANCE
public void addBlock(Identifier identifier, BlockSerializer serializer, BlockTrait<?>[] traits)
public BlockState getDefaultState(Identifier blockType)
public BlockState getBlockState(int runtimeId)
@Nullable public BlockState getBlockState(com.nukkitx.nbt.NbtMap tag)
public int getRuntimeId(BlockState blockState)
public com.nukkitx.nbt.NbtMap getSerialized(BlockState state)
public Map<BlockState,com.nukkitx.nbt.NbtMap> getSerializedPalette()
Copyright © 2020. All rights reserved.