public abstract class ItemTranslator extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ItemTranslator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack itemStack,
com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack equalsItemStack,
boolean checkAmount,
boolean trueIfAmountIsGreater,
boolean checkNbt)
Checks if an
ItemStack is equal to another item stack |
abstract List<ItemMapping> |
getAppliedItems() |
static void |
init() |
static com.github.steveice10.opennbt.tag.builtin.CompoundTag |
translateDisplayProperties(GeyserSession session,
com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
ItemMapping mapping)
Translates the display name of the item
|
static com.github.steveice10.opennbt.tag.builtin.CompoundTag |
translateDisplayProperties(GeyserSession session,
com.github.steveice10.opennbt.tag.builtin.CompoundTag tag,
ItemMapping mapping,
char translationColor) |
com.nukkitx.nbt.NbtMap |
translateNbtToBedrock(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag) |
static com.nukkitx.protocol.bedrock.data.inventory.ItemData |
translateToBedrock(GeyserSession session,
com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack stack) |
com.nukkitx.protocol.bedrock.data.inventory.ItemData.Builder |
translateToBedrock(com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack itemStack,
ItemMapping mapping,
ItemMappings mappings) |
com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack |
translateToJava(com.nukkitx.protocol.bedrock.data.inventory.ItemData itemData,
ItemMapping mapping,
ItemMappings mappings) |
static com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack |
translateToJava(com.nukkitx.protocol.bedrock.data.inventory.ItemData data,
ItemMappings mappings) |
com.github.steveice10.opennbt.tag.builtin.CompoundTag |
translateToJavaNBT(String name,
com.nukkitx.nbt.NbtMap tag) |
public static void init()
public static com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack translateToJava(com.nukkitx.protocol.bedrock.data.inventory.ItemData data,
ItemMappings mappings)
mappings - item mappings to use while translating. This can't just be a Geyser session as this method is used
when loading recipes.@Nonnull public static com.nukkitx.protocol.bedrock.data.inventory.ItemData translateToBedrock(GeyserSession session, com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack stack)
public com.nukkitx.protocol.bedrock.data.inventory.ItemData.Builder translateToBedrock(com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack itemStack,
ItemMapping mapping,
ItemMappings mappings)
public com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack translateToJava(com.nukkitx.protocol.bedrock.data.inventory.ItemData itemData,
ItemMapping mapping,
ItemMappings mappings)
public abstract List<ItemMapping> getAppliedItems()
public com.nukkitx.nbt.NbtMap translateNbtToBedrock(com.github.steveice10.opennbt.tag.builtin.CompoundTag tag)
public com.github.steveice10.opennbt.tag.builtin.CompoundTag translateToJavaNBT(String name, com.nukkitx.nbt.NbtMap tag)
public static com.github.steveice10.opennbt.tag.builtin.CompoundTag translateDisplayProperties(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, ItemMapping mapping)
session - the Bedrock client's sessiontag - the tag to translatemapping - the item entry, in case it requires translationpublic static com.github.steveice10.opennbt.tag.builtin.CompoundTag translateDisplayProperties(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, ItemMapping mapping, char translationColor)
translationColor - if this item is not available on Java, the color that the new name should be.
Normally, this should just be white, but for shulker boxes this should be gray.public boolean equals(com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack itemStack,
com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack equalsItemStack,
boolean checkAmount,
boolean trueIfAmountIsGreater,
boolean checkNbt)
ItemStack is equal to another item stackitemStack - the item stack to checkequalsItemStack - the item stack to check if equal tocheckAmount - if the amount should be taken into accounttrueIfAmountIsGreater - if this should return true if the amount of the
first item stack is greater than that of the secondcheckNbt - if NBT data should be checkedCopyright © 2021 GeyserMC. All rights reserved.