Components
As of Minecraft 1.20.6, items now use what is called Components, or DataComponents, to specify specific features. This covers anything from consumable items, tool-properties and death protection. Due to the nature of these they are very version-specific, so there are some differences and new additions between Minecraft version changes.
Each component below has a hover-click to show an example of how to use it, with additional info.
- Sets the maximum slot-size for the NexoItem - Sets an override-state for the enchantment glint - Sets whether this NexoItem is immune to fire and lava - Sets the durability of this NexoItem - Hides all tooltips from the given NexoItem on hover - Makes this item consumable with several different properties - Makes your item into a tool with configurable behaviour for blocks its breaking
- Defines custom properties to add to the item - Lets this item be inserted into a Jukebox and play a given song
- Makes an item consumable, with bunch of sub-properties - Makes an item equippable, like armor - Specify a damage-type this item is invulnerable to - Set the maximum enchantment-cost for this item - Allows the player to glide, like with elytras, when equipped - Defines the base model-properties of this item - Used to make custom tooltip-styles for your item - Applies a cooldown to all matching items when used - Replaces the item with a remainder item if its stack count has decreased after use - What item(s) should be allowed in anvils to repair durability - Protects the player from when equipped on death. Optionally applies effects too - Used for all the new formatting for 1.21.4 CMD component
- Sets the Components to hide tooltips from. This should be used instead of ItemFlags
New properties for 1.21.8+:
- Used with the new Custom Paintings feature to specify which painting to place
Last updated