Package com.nexomc.nexo.nms
Interface IItemUtils
-
- All Implemented Interfaces:
public interface IItemUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
IItemUtils.Companion
public final class
IItemUtils.EmptyItemUtils
-
Method Summary
Modifier and Type Method Description abstract Colorable
asColorable(ItemStack itemStack)
Unit
foodComponent(ItemBuilder itemBuilder, ConfigurationSection foodSection)
Object
consumableComponent(ItemStack itemStack)
Unit
consumableComponent(ItemBuilder itemBuilder, ConfigurationSection consumableSection)
Unit
consumableComponent(ItemStack itemStack, Object consumable)
Object
repairableComponent(ItemStack itemStack)
Unit
repairableComponent(ItemBuilder itemBuilder, List<String> repairableWith)
Unit
repairableComponent(ItemStack itemStack, Object repairable)
Map<String, String>
blockstateComponent(ItemStack itemStack)
Unit
blockstateComponent(ItemStack itemStack, Map<String, String> blockstates)
Unit
handleItemFlagToolTips(ItemStack itemStack, Set<ItemFlag> itemFlags)
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 -
-
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
-
-
-
-