Back to All Technical Guides
Minecraft Guides & Commands
10 min read
Updated 2026-08-24

How to Use /give with Custom NBT Tags, Enchantments, Lore & Attributes (1.20 - 1.21+)

Master Minecraft's item creation commands. Learn how to generate unbreakable god weapons, custom colored leather armor, multi-line lore with RGB styling, custom potion effects, and attribute modifiers.

V
Veles B.H
Lead Systems Architect & Core Developer
Advertisement

1. The 1.20.5 / 1.21 Item Components Overhaul

In 1.21+, item NBT has been replaced with modular components. Here is how to create an Unbreakable Netherite Sword with Sharpness 10, Custom RGB Name, and Multi-line Lore:

MCFUNCTION
# Modern 1.20.5 / 1.21+ Component Give Command:
/give @p netherite_sword[
  custom_name='{"text":"Voidrender Greatsword","color":"#b2ff00","bold":true}',
  lore=['{"text":"Forged in the depths of the End","color":"#aaaaaa","italic":true}','{"text":"Level 100 Boss Weapon","color":"#ff5555"}'],
  enchantments={levels:{"minecraft:sharpness":10,"minecraft:looting":5,"minecraft:fire_aspect":3}},
  unbreakable={},
  attribute_modifiers=[{type:"minecraft:generic.attack_damage",amount:25.0,operation:"add_value",slot:"mainhand",id:"enzonic:god_weapon"}]
] 1
Advertisement
#minecraft give command generator#custom sword with lore give command#unbreakable sword minecraft 1.21#custom enchantments give#custom model data give command