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 |
CARPET |
static int |
JAVA_AIR_ID
The Java block runtime ID of air
|
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_COBWEB_ID |
static int |
JAVA_RUNTIME_FURNACE_ID |
static int |
JAVA_RUNTIME_FURNACE_LIT_ID |
static it.unimi.dsi.fastutil.ints.Int2BooleanMap |
JAVA_RUNTIME_ID_TO_CAN_HARVEST_WITH_HAND |
static it.unimi.dsi.fastutil.ints.Int2IntMap |
JAVA_RUNTIME_ID_TO_COLLISION_INDEX |
static it.unimi.dsi.fastutil.ints.Int2DoubleMap |
JAVA_RUNTIME_ID_TO_HARDNESS |
static it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> |
JAVA_RUNTIME_ID_TO_TOOL_TYPE |
static int |
JAVA_RUNTIME_SPAWNER_ID |
static it.unimi.dsi.fastutil.ints.IntSet |
JAVA_RUNTIME_WOOL_IDS
A list of all Java runtime wool IDs, for use with block breaking math and shears
|
| 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) |
static String[] |
getAllBlockIdentifiers() |
int |
getBedrockAirId() |
int |
getBedrockBlockId(int state) |
String |
getBedrockBlockIdentifier(String javaIdentifier) |
int |
getBedrockWaterId() |
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 String |
getPickItem(int javaId)
Get the item a Java client would receive when pressing
the Pick Block key on a specific Java block state.
|
static void |
init() |
boolean |
isItemFrame(int bedrockBlockRuntimeId) |
static boolean |
isWaterlogged(int state) |
public static final int JAVA_AIR_ID
public static final int CARPET
public static final it.unimi.dsi.fastutil.ints.Int2DoubleMap JAVA_RUNTIME_ID_TO_HARDNESS
public static final it.unimi.dsi.fastutil.ints.Int2BooleanMap JAVA_RUNTIME_ID_TO_CAN_HARVEST_WITH_HAND
public static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> JAVA_RUNTIME_ID_TO_TOOL_TYPE
public static final it.unimi.dsi.fastutil.ints.Int2IntMap JAVA_RUNTIME_ID_TO_COLLISION_INDEX
public static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<String> JAVA_ID_TO_JAVA_IDENTIFIER_MAP
public static final it.unimi.dsi.fastutil.ints.IntSet JAVA_RUNTIME_WOOL_IDS
public static final int JAVA_RUNTIME_COBWEB_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 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 String getPickItem(int javaId)
javaId - The Java runtime id of the blockpublic static String[] getAllBlockIdentifiers()
Copyright © 2021 GeyserMC. All rights reserved.