Class EnchantedBookTranslator

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

public class EnchantedBookTranslator extends NbtItemStackTranslator
  • Constructor Details

    • EnchantedBookTranslator

      public EnchantedBookTranslator()
  • Method Details

    • translateToBedrock

      public void translateToBedrock(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)
      Description copied from class: NbtItemStackTranslator
      Translate the item NBT to Bedrock
      Overrides:
      translateToBedrock in class NbtItemStackTranslator
      Parameters:
      session - the client's current session
      itemTag - the item's CompoundTag
      mapping - Geyser's item mapping
    • translateToJava

      public void translateToJava(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag, ItemMapping mapping)
      Description copied from class: NbtItemStackTranslator
      Translate the item NBT to Java.
      Overrides:
      translateToJava in class NbtItemStackTranslator
      Parameters:
      itemTag - the item's CompoundTag
      mapping - Geyser's item mapping
    • acceptItem

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