Class NbtItemStackTranslator

java.lang.Object
org.geysermc.geyser.translator.inventory.item.NbtItemStackTranslator

public abstract class NbtItemStackTranslator extends Object
  • 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 session
      itemTag - the item's CompoundTag (cloned from Geyser's cached copy)
      mapping - 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 CompoundTag
      mapping - Geyser's item mapping
    • acceptItem

      public boolean acceptItem(Item item)
      Gets whether this nbt translator takes in this item.
      Parameters:
      item - Geyser's item mapping
      Returns:
      if the item should be processed under this class