public abstract class BlockTranslator extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.fasterxml.jackson.databind.JsonNode |
BLOCKS_JSON
Stores the raw blocks JSON until it is no longer needed.
|
static int |
JAVA_AIR_ID
The Java block runtime ID of air
|
static int |
JAVA_BELL_BLOCK_ID |
static int |
JAVA_COBWEB_BLOCK_ID |
static it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> |
JAVA_ID_TO_JAVA_IDENTIFIER_MAP
Java numeric ID to java unique identifier, used for block names in the statistics screen
|
static int |
JAVA_RUNTIME_FURNACE_ID |
static int |
JAVA_RUNTIME_FURNACE_LIT_ID |
static int |
JAVA_RUNTIME_SPAWNER_ID |
static int |
JAVA_WATER_ID |
| Constructor and Description |
|---|
BlockTranslator(String paletteFile) |
| Modifier and Type | Method and Description |
|---|---|
protected com.nukkitx.nbt.NbtMapBuilder |
adjustBlockStateForVersion(String bedrockIdentifier,
com.nukkitx.nbt.NbtMapBuilder statesBuilder) |
com.nukkitx.nbt.NbtList<com.nukkitx.nbt.NbtMap> |
getAllBedrockBlockStates() |
static String[] |
getAllBlockIdentifiers() |
int |
getBedrockAirId() |
int |
getBedrockBlockId(int state) |
String |
getBedrockBlockIdentifier(String javaIdentifier) |
com.nukkitx.nbt.NbtMap |
getBedrockBlockNbt(String cleanJavaIdentifier) |
int |
getBedrockWaterId() |
static BlockMapping |
getBlockMapping(int javaRuntimeId) |
abstract int |
getBlockStateVersion() |
byte[] |
getEmptyChunkData() |
ChunkSection |
getEmptyChunkSection() |
Map<String,com.nukkitx.nbt.NbtMap> |
getFlowerPotBlocks()
Get the map of contained flower pot plants to Bedrock CompoundTag
|
int |
getItemFrame(com.nukkitx.nbt.NbtMap tag) |
int |
getJavaBlockState(int bedrockId) |
static int |
getJavaBlockState(String javaId) |
static com.google.common.collect.BiMap<String,Integer> |
getJavaIdBlockMap() |
static void |
init() |
boolean |
isItemFrame(int bedrockBlockRuntimeId) |
static boolean |
isWaterlogged(int state) |
public static final int JAVA_AIR_ID
public static final int JAVA_WATER_ID
public static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> JAVA_ID_TO_JAVA_IDENTIFIER_MAP
public static final int JAVA_COBWEB_BLOCK_ID
public static final int JAVA_BELL_BLOCK_ID
public static final int JAVA_RUNTIME_FURNACE_ID
public static final int JAVA_RUNTIME_FURNACE_LIT_ID
public static final int JAVA_RUNTIME_SPAWNER_ID
public static com.fasterxml.jackson.databind.JsonNode BLOCKS_JSON
public BlockTranslator(String paletteFile)
public static void init()
protected com.nukkitx.nbt.NbtMapBuilder adjustBlockStateForVersion(String bedrockIdentifier, com.nukkitx.nbt.NbtMapBuilder statesBuilder)
public int getBedrockBlockId(int state)
public int getJavaBlockState(int bedrockId)
public String getBedrockBlockIdentifier(String javaIdentifier)
javaIdentifier - the Java identifier of the block to search forpublic int getItemFrame(com.nukkitx.nbt.NbtMap tag)
public boolean isItemFrame(int bedrockBlockRuntimeId)
public Map<String,com.nukkitx.nbt.NbtMap> getFlowerPotBlocks()
public int getBedrockAirId()
public int getBedrockWaterId()
public com.nukkitx.nbt.NbtList<com.nukkitx.nbt.NbtMap> getAllBedrockBlockStates()
public abstract int getBlockStateVersion()
public byte[] getEmptyChunkData()
public ChunkSection getEmptyChunkSection()
public static int getJavaBlockState(String javaId)
javaId - the Java string identifier to search forJAVA_AIR_ID if there is no valid entry.public static boolean isWaterlogged(int state)
public static BlockMapping getBlockMapping(int javaRuntimeId)
javaRuntimeId - the Java runtime ID of the block to search for.public static String[] getAllBlockIdentifiers()
public com.nukkitx.nbt.NbtMap getBedrockBlockNbt(String cleanJavaIdentifier)
cleanJavaIdentifier - the clean Java identifier of the block to look upCopyright © 2021 GeyserMC. All rights reserved.