Package org.geysermc.geyser.util
Class ItemUtils
java.lang.Object
org.geysermc.geyser.util.ItemUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic intgetCorrectBedrockDurability(Item item, int original) static intgetEnchantmentLevel(GeyserSession session, @Nullable org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents components, BedrockEnchantment bedrockEnchantment) Deprecated.static booleanhasEffect(GeyserSession session, @Nullable GeyserItemStack itemStack, EnchantmentComponent component)
-
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
- Returns:
- the correct Bedrock durability for this item.
-