1.14.2 Weapon and armor Generation [closed]
Solution 1:
There are online easy-to-use command generators, for this purpose I used minecraftcommand.science.
Because this command generator is a bit outdated for now, we are going to take two steps to achieve our goal: generating the command, and converting it into 1.13+ format.
Let's say I want a golden helmet with the name "Welcome to Arqade", lore (description) "Read the tour page" and second lore "Please", a Thorns II
enchantment, and I want the helmet to be Unbreakable.
Here's the generated command from the minecraftcommand.science armor generator:
/give @p golden_helmet 1 0 {display:{Name:"Welcome to Arqade",Lore:["Go read the tour page","Please"]},ench:[{id:7,lvl:2}],Unbreakable:1}
And here's the converted version:
/give @p golden_helmet{display:{Name:"{\"text\":\"Welcome to Arqade\"}",Lore:["Go read the tour page","Please"]},Enchantments:[{id:thorns,lvl:2}],Unbreakable:1}
First of all, the JSON formatting for Name:"<name>"
has changed in 1.13. Next up, the enchantment NBT formatting has changed from ench:[{id:'numberID',lvl:'level'}]
to Enchantments:[{id:'nameID',lvl:'level'}]
. Finally, the last change needed is putting the NBT before the item count in the command.
This is how the item looks in-game: