Class NbtItemStackTranslator
java.lang.Object
org.geysermc.geyser.translator.inventory.item.NbtItemStackTranslator
- Direct Known Subclasses:
AxolotlBucketTranslator
,BasicItemTranslator
,BookPagesTranslator
,CrossbowTranslator
,EnchantedBookTranslator
,EnchantmentTranslator
,FireworkBaseTranslator
,LeatherArmorTranslator
,LodestoneCompassTranslator
,MapItemTranslator
,PlayerHeadTranslator
,ShulkerBoxItemTranslator
,TropicalFishBucketTranslator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptItem(ItemMapping mapping)
Gets whether this nbt translator takes in this item.void
translateToBedrock(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)
Translate the item NBT to Bedrockvoid
translateToJava(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)
Translate the item NBT to Java.
-
Constructor Details
-
NbtItemStackTranslator
public NbtItemStackTranslator()
-
-
Method Details
-
translateToBedrock
public void translateToBedrock(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)Translate the item NBT to Bedrock- Parameters:
session
- the client's current sessionitemTag
- the item's CompoundTagmapping
- Geyser's item mapping
-
translateToJava
public void translateToJava(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)Translate the item NBT to Java.- Parameters:
itemTag
- the item's CompoundTagmapping
- Geyser's item mapping
-
acceptItem
Gets whether this nbt translator takes in this item.- Parameters:
mapping
- Geyser's item mapping- Returns:
- if the item should be processed under this class
-