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.

Max Stack Size - Sets the maximum slot-size for the NexoItem Enchantment Glint Override - Sets an override-state for the enchantment glint Fire Resistant - Sets whether this NexoItem is immune to fire and lava Max Damage - Sets the maximum amount of damage the NexoItem can take Hide Tooltip - Hides all tooltips from the given NexoItem on hover Food - Makes this item consumable with several different properties Tool - Makes your item into a tool with configurable behaviour for blocks its breaking

Custom Data - Defines custom properties to add to the item Jukebox Playable - Lets this item be inserted into a Jukebox and play a given song

Consumable - Makes an item consumable, with bunch of sub-properties Equippable - Makes an item equippable, like armor Damage Resistant - Specify a damage-type this item is invulnerable to Enchantable - Set the maximum enchantment-cost for this item Glider - Allows the player to glide, like with elytras, when equipped Item Model - Defines the base model-properties of this item Tooltip Style - Used to make custom tooltip-styles for your item Use Cooldown - Applies a cooldown to all matching items when used Use Remainder - Replaces the item with a remainder item if its stack count has decreased after use Repairable - What item(s) should be allowed in anvils to repair durability Death Protection - Protects the player from when equipped on death. Optionally applies effects too Custom Model Data - Used for all the new formatting for 1.21.4 CMD component

Tooltip Display - Sets the Components to hide tooltips from. This should be used instead of ItemFlags Break Sound - Set the sound to play when the item loses all its durability Weapon - Makes the item act like a weapon Blocks Attacks - Makes the item act as a shield & can block attacks CanPlaceOn/CanBreak - Defines what this item can break or be placed on in Adventure Mode

Painting Variant - Used with the new Custom Paintings feature to specify which painting to place

New properties for 1.21.11+:

Kinetic Weapon - Enables charge-type attack when using item Piercing Weapon - Actions done when weapon pierces target Attack Range - The range and hitbox margin of a weapon Swing Animation - The Animation to play when swinging item Use Effects - Vibration & player movement penalties when continuously using item Damage Type - The type of damage the item deals Minimum Attack Charge - Minimum attack-indicator value required to attack with item

Last updated