Guides
Version guideGiveItemLoot

Java 1.20.4 NBT vs 1.20.5+ item components

8 min read

Minecraft Java 1.20.5 moved many item features from legacy NBT into item components. That change affects give commands, item replacement, loot rewards, custom names, lore, enchantments, custom data, and many resource-pack workflows. NBTForge keeps the version selector visible because this is not just formatting.

Start the comparison with the legacy Java 1.20.4 target so old item NBT assumptions stay visible.
Switch the same reward item to a modern Java target and compare the generated component syntax.
Use the loot workflow and Project naming to keep legacy and modern reward entries separated.

Guide result

A clear decision rule for when to use legacy item NBT and when to use modern item components.

Open related workflowGive, Item, LootChoosing correct Java item syntax

Recommended path

  1. Pick the exact Java version before editing the item stack.
  2. Build the item once, then switch between 1.20.4 and 1.20.5+ only to compare output intentionally.
  3. Treat custom name, lore, enchantments, unbreakable, rarity, glint, and custom data as version-sensitive fields.
  4. Use Project entries to keep a legacy and modern version side by side when supporting multiple worlds.
  5. Document the target version beside commands you share with other creators.

When legacy item NBT is still the right target

Use legacy item NBT when the command must run in Java 1.20.4 or older. In that world family, many item details live inside the old NBT structure, and component output is not the target syntax.

Legacy output is also useful when migrating an older command library. Import the old command, compare the parsed fields, and then regenerate only after choosing the new target version.

When item components are the right target

Use component output for Java 1.20.5 and later. Component syntax is the modern format for many item features, including names, lore, enchantments, custom data, and display behavior.

If you are building new map content for current Java versions, start with component output and only generate legacy syntax when you know an older server needs it.

  • Modern Java item commands should be generated with the current version selected.
  • Loot and reward workflows should use the same version as the world datapack.
  • Do not mix a legacy give command with a component-era item modifier unless you are intentionally migrating.

How to compare safely

Switching versions can change field names, nesting, and sometimes which fields are representable. Use the output diff panel after a version switch instead of scanning a long command by eye.

For shared templates, keep the version in the article title, preset name, or Project entry name. A command named "reward sword" is ambiguous; a command named "reward sword Java 1.21" is much easier to support.

Ship the copied artifact

Use this guide to produce the artifact a player or map maker will actually run: a copied command, ordered Project pack, or datapack resource. The final review should happen on that copied output, not only on the editable builder state.

When the workflow is version-sensitive, label the target version beside the command. When it uses selectors, scoreboards, bossbars, tags, loot tables, or project order, test those dependencies in a clean world before publishing the setup.

  • Copy from Output for one command and from Project for ordered packs.
  • Keep Java, Bedrock, and snapshot variants separate.
  • Test destructive selectors with harmless output first.
  • Update related presets when the guide becomes the canonical workflow.

Related guides and presets

FAQ

Is Java 1.20.5 output always better?

It is better only for worlds that run 1.20.5 or later. Older Java worlds need legacy syntax, so the correct output depends on the target world.

Can I keep both formats?

Yes. Save separate Project entries for the legacy and modern version, label them clearly, and update both when the underlying item design changes.

When should this guide become a Project pack?

Use Project when the workflow needs more than one command, has setup and cleanup order, or must be edited again after testing. One-off commands can stay in Output.