Class ItemUtils

java.lang.Object
org.geysermc.geyser.util.ItemUtils

public final class ItemUtils extends Object
  • Method Details

    • getEnchantmentLevel

      @Deprecated public static int getEnchantmentLevel(GeyserSession session, @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, BedrockEnchantment bedrockEnchantment)
      Deprecated.
      Cheap hack. Proper solution is to read the enchantment effects.
    • hasEffect

      public static boolean hasEffect(GeyserSession session, @Nullable GeyserItemStack itemStack, EnchantmentComponent component)
    • getCorrectBedrockDurability

      public static int getCorrectBedrockDurability(Item item, int original)
      Returns:
      the correct Bedrock durability for this item.