Package com.nexomc.nexo.nms
Interface IItemUtils
-
- All Implemented Interfaces:
public interface IItemUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classIItemUtils.Companionpublic final classIItemUtils.EmptyItemUtils
-
Method Summary
Modifier and Type Method Description abstract ColorableasColorable(ItemStack itemStack)UnitfoodComponent(ItemBuilder itemBuilder, ConfigurationSection foodSection)ObjectconsumableComponent(ItemStack itemStack)UnitconsumableComponent(ItemBuilder itemBuilder, ConfigurationSection consumableSection)UnitconsumableComponent(ItemStack itemStack, Object consumable)ObjectrepairableComponent(ItemStack itemStack)UnitrepairableComponent(ItemBuilder itemBuilder, List<String> repairableWith)UnitrepairableComponent(ItemStack itemStack, Object repairable)Map<String, String>blockstateComponent(ItemStack itemStack)UnitblockstateComponent(ItemStack itemStack, Map<String, String> blockstates)UnithandleItemFlagToolTips(ItemStack itemStack, Set<ItemFlag> itemFlags)abstract ItemStackcopyItemNBTTags(ItemStack oldItem, ItemStack newItem)Copies over all NBT-Tags from oldItem to newItem Useful for plugins that might register their own NBT-Tags outside the ItemStacks PersistentDataContainer -
-
Method Detail
-
asColorable
abstract Colorable asColorable(ItemStack itemStack)
-
foodComponent
Unit foodComponent(ItemBuilder itemBuilder, ConfigurationSection foodSection)
-
consumableComponent
Object consumableComponent(ItemStack itemStack)
-
consumableComponent
Unit consumableComponent(ItemBuilder itemBuilder, ConfigurationSection consumableSection)
-
consumableComponent
Unit consumableComponent(ItemStack itemStack, Object consumable)
-
repairableComponent
Object repairableComponent(ItemStack itemStack)
-
repairableComponent
Unit repairableComponent(ItemBuilder itemBuilder, List<String> repairableWith)
-
repairableComponent
Unit repairableComponent(ItemStack itemStack, Object repairable)
-
blockstateComponent
Map<String, String> blockstateComponent(ItemStack itemStack)
-
blockstateComponent
Unit blockstateComponent(ItemStack itemStack, Map<String, String> blockstates)
-
handleItemFlagToolTips
Unit handleItemFlagToolTips(ItemStack itemStack, Set<ItemFlag> itemFlags)
-
copyItemNBTTags
abstract ItemStack copyItemNBTTags(ItemStack oldItem, ItemStack newItem)
Copies over all NBT-Tags from oldItem to newItem Useful for plugins that might register their own NBT-Tags outside the ItemStacks PersistentDataContainer
- Parameters:
oldItem- The old ItemStack to copy the NBT-Tags fromnewItem- The new ItemStack to copy the NBT-Tags to- Returns:
The new ItemStack with the copied NBT-Tags
-
-
-
-