MC ToolboxMC TOOLBOX

April 14, 2026

Minecraft 26.x Data Components Guide: Transitioning from NBT

Learn how Minecraft 26.x replaced raw item NBT tags with structured Data Components like custom_data, item_name, and enchantment_glint_override.

If you have updated your map or server to Minecraft 26.x, you likely noticed that old NBT commands like /give @p diamond_sword{display:{Name:'"Excalibur"'}} no longer work! Mojang completely overhauled the item syntax by replacing unstructured NBT with type-safe Data Components.

Why Mojang Replaced NBT Tags

Old NBT tags were fragile. Different items used different tag structures, leading to bugs and slow server parsing. Data Components standardize all item data into explicit, pre-compiled properties.

Command block with data components syntax brackets and item tags
Screenshot from the matching MC Toolbox tool.

Key 1.21 Component Changes

1. Custom Names & Lore

Old: {display:{Name:'{"text":"Hero Sword"}',Lore:['{"text":"Legendary"}']}}

New: [item_name='"Hero Sword"',lore=['"Legendary"']]

2. Custom Unbreakable Tag

Old: {Unbreakable:1b}

New: [unbreakable={}]

3. Custom Data Storage (NBT Storage)

All custom NBT keys that do not belong to vanilla components now go inside the custom_data component:

[custom_data={my_quest_id:42,rarity:"epic"}]

Save hours of syntax errors by building 1.21 commands visually in our 1.21 /give Command Generator!

Gio Nui

Gio Nui

I'm an independent developer and long-time Minecraft creator. Since 2011, I've been focused on building high-performance, browser-based tools for the community.

More Guides