JAVA 1.21.5

Item component
reference.

This is the contract NBT.GG currently compiles. It is intentionally version-specific: modern Java item components change over time, so this reference documents the exact feature set the site is prepared to emit as one standalone /give command.

Names and lore

NBT.GG compiles custom names and lore into inline text components. It can apply named Minecraft colors or exact #RRGGBB values, toggle bold/italic styling, use a custom font id for lore, and generate per-character gradients.

Gradient names are not delegated to the model. The compiler interpolates an exact RGB color for each Unicode character, then emits each character as its own text element.
ComponentNBT.GG supportNotes
minecraft:custom_nameFull current generator supportPlain text, named/hex color, bold, italic, per-character gradients.
minecraft:loreFull current generator supportMultiple lines, color/style, fonts, literal ASCII/Braille preservation.

Visual identity and presentation

The item model can be replaced independently from the base item. NBT.GG also supports forced glint behavior, rarity, leather dye color, and tooltip visibility controls. These components change how the item looks or how its metadata is presented; they do not create arbitrary event logic.

minecraft:item_modelUses a namespaced model id.
minecraft:enchantment_glint_overrideForce glint on or off, or leave vanilla behavior untouched.
minecraft:rarityCommon, uncommon, rare, or epic.
minecraft:dyed_colorExact RGB color converted to Minecraft's integer representation.
minecraft:tooltip_displayHide the whole tooltip or selected component entries.

Durability, stacks, enchantments

NBT.GG can add enchantments, mark an item unbreakable, define a custom maximum damage value, set current damage, set repair cost, and change maximum stack size. The compiler rejects incompatible requests it can identify, such as combining a damageable item definition with a stack size greater than one.

minecraft:enchantmentsLevels 0–255 in the current compiler.
minecraft:unbreakableNative unbreakable component.
minecraft:max_damage + minecraft:damageCustom durability plus current damage.
minecraft:max_stack_sizeCustom stack cap.
minecraft:repair_costAnvil repair cost metadata.
minecraft:break_soundNamespaced break sound event.

Equippable and glider items

The minecraft:equippable component can make non-armor items occupy equipment slots. NBT.GG exposes the equipment slot, equip sound, optional equipment asset, camera overlay, allowed entities, dispenser behavior, swapping behavior, damage-on-hurt behavior, and equip-on-interact flag.

This is why something as ordinary as paper can be made head-equippable or chest-equippable in a single command. The minecraft:glider component can also be added when the item is intended to behave as a glider.

An equip sound is a native item behavior. “Run /ban when equipped” is not. One is data on the item; the other requires event-driven command logic outside the item.

Attribute modifiers and weapon metadata

Attribute modifiers are compiled as explicit entries with a namespaced attribute type, unique modifier id, numeric amount, operation, and slot. NBT.GG supports add_value, add_multiplied_base, and add_multiplied_total.

The weapon component is narrower than its name suggests. In the current compiler it controls item durability consumed per attack and the duration for disabling blocking. It is not a generic on-hit scripting hook.

Food and consumables

Food data and consumption behavior are separate concepts. NBT.GG can supply nutrition, saturation, and “always edible” behavior, then separately configure use duration, animation, sound, consume particles, and native consume effects.

Supported native effects currently include applying status effects, removing selected effects, clearing all effects, randomly teleporting the consumer within a diameter, and playing a sound. It can also define a use remainder such as leaving a stick after consumption.

minecraft:foodNutrition, saturation, always-edible.
minecraft:consumableUse time, animation, sound, particles, native on-consume effects.
minecraft:use_remainderLeaves a specified item behind after use.
minecraft:use_cooldownCooldown duration and optional shared cooldown group.

Custom data and utility components

NBT.GG can write a small typed custom-data object using strings, integers, floats, doubles, and booleans. This is useful for tagging an item for later recognition, archiving, or interoperability with systems that intentionally read custom item data.

Custom data by itself does not execute anything. It is metadata until another system chooses to read it.

The one-command boundary

NBT.GG is designed around properties that remain on the item after one /give. It therefore refuses to pretend that item components can perform arbitrary server commands.

Requests such as “ban whoever I hit,” “run a command when this is dropped,” “summon lightning every time I left-click,” “change gamemode on kill,” or “keep checking a scoreboard” require logic outside the item. A datapack, function, command-block system, plugin, or mod may implement those ideas, but they are outside this product's one-command contract.

The generator can still build the item-only portion and return a warning for the unsupported behavior.