public abstract class BlockEntityTranslator extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,String> |
BLOCK_ENTITY_TRANSLATIONS
Contains a list of irregular block entity name translations that can't be fit into the regex
|
static Map<String,BlockEntityTranslator> |
BLOCK_ENTITY_TRANSLATORS |
static it.unimi.dsi.fastutil.objects.ObjectArrayList<RequiresBlockState> |
REQUIRES_BLOCK_STATE_LIST
A list of all block entities that require the Java block state in order to fill out their block entity information.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BlockEntityTranslator() |
| Modifier and Type | Method and Description |
|---|---|
com.nukkitx.nbt.NbtMap |
getBlockEntityTag(String id,
com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
int blockState) |
protected com.nukkitx.nbt.NbtMap |
getConstantBedrockTag(String bedrockId,
int x,
int y,
int z) |
protected com.github.steveice10.opennbt.tag.builtin.CompoundTag |
getConstantJavaTag(String javaId,
int x,
int y,
int z) |
protected <T> T |
getOrDefault(com.github.steveice10.opennbt.tag.builtin.Tag tag,
T defaultValue) |
static void |
init() |
abstract void |
translateTag(com.nukkitx.nbt.NbtMapBuilder builder,
com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
int blockState) |
public static final Map<String,BlockEntityTranslator> BLOCK_ENTITY_TRANSLATORS
public static final it.unimi.dsi.fastutil.objects.ObjectArrayList<RequiresBlockState> REQUIRES_BLOCK_STATE_LIST
public static void init()
public abstract void translateTag(com.nukkitx.nbt.NbtMapBuilder builder,
com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
int blockState)
public com.nukkitx.nbt.NbtMap getBlockEntityTag(String id, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, int blockState)
protected com.github.steveice10.opennbt.tag.builtin.CompoundTag getConstantJavaTag(String javaId, int x, int y, int z)
protected com.nukkitx.nbt.NbtMap getConstantBedrockTag(String bedrockId, int x, int y, int z)
protected <T> T getOrDefault(com.github.steveice10.opennbt.tag.builtin.Tag tag,
T defaultValue)
Copyright © 2021 GeyserMC. All rights reserved.