Package org.geysermc.geyser.util
Class ItemUtils
java.lang.Object
org.geysermc.geyser.util.ItemUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdyeColorFor(int javaId)Return the dye color associated with this Java item ID, if any.static intgetCorrectBedrockDurability(GeyserSession session, int javaId, int original)static StringgetCustomName(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemTag)static intgetEnchantmentLevel(com.github.steveice10.opennbt.tag.builtin.CompoundTag itemNBTData, String enchantmentId)static voidsetDyeColors(it.unimi.dsi.fastutil.ints.Int2IntMap dyeColors)
-
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
- Parameters:
itemTag- the NBT tag of the item- Returns:
- the custom name of the item
-
dyeColorFor
public static int dyeColorFor(int javaId)Return the dye color associated with this Java item ID, if any. Returns -1 if no dye color exists for this item. -
setDyeColors
public static void setDyeColors(it.unimi.dsi.fastutil.ints.Int2IntMap dyeColors)
-