Package org.geysermc.geyser.util
Class ItemUtils
java.lang.Object
org.geysermc.geyser.util.ItemUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetCorrectBedrockDurability(Item item, int original) static @Nullable StringgetCustomName(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag) static intgetEnchantmentLevel(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag itemNBTData, String enchantmentId)
-
Constructor Details
-
ItemUtils
public ItemUtils()
-
-
Method Details
-
getEnchantmentLevel
public static int getEnchantmentLevel(@Nullable com.github.steveice10.opennbt.tag.builtin.CompoundTag itemNBTData, String enchantmentId) -
getCorrectBedrockDurability
- Returns:
- the correct Bedrock durability for this item.
-
getCustomName
public static @Nullable String getCustomName(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag) - Parameters:
itemTag- the NBT tag of the item- Returns:
- the custom name of the item
-