Trying to make a custom item for a server but it wont work
This command is supposed to give me a custom item for a server. Why won't it work?
give @p minecraft:netherite_sword
{
display: {
Name: "[{\"text\":\"Kindness (¾)\",\"color\":\"red\",\"italic\":false},
Lore: ["{\"text\":\"\",This sword was forged from the deep depths of The Blazing Tundra it was weilded by the greatest swordsman in the land but was sadly lost many years ago.\"color\":\"dark_purple\",\"italic\":false}",
Unbreakable: 1,
HideFlags: 7,
Health:32767s,
Age:-32768,
Enchantments: [
{id: sharpness, lvl: 10},
{id: smite, lvl:10},
{id: bane_of_arthropods, lvl: 10},
{id: fire_aspect, lvl: 10},
{id: knockback, lvl: 10},
{id: looting, lvl: 10},
{id: sweeping_edge, lvl:10}
]
}
}
Solution 1:
building off of ginkgo's answer, you do in fact have multiple syntax errors. i'll go through them one by one here.
- at
Name
, unclosed quotes; the full value needs to be wrapped in quotes - at
Name
, unexpected square brackets ([]);Name
does not use square brackets as those are only used in lists, and it can only support one value - at
Lore
, unclosed square brackets;Lore
is a list, and needs to be wrapped in square brackets - at
Lore
, malformed JSON string; there's an extra quote right aftertext
- at
Unbreakable
, bad formatting;Unbreakable
needs to be a Byte value, which means it needs to haveb
at the end of it (e.g.1b
instead of just1
) - at
HideFlags
, bad formatting;
there are also some tags that are simply not used in an item tag that you're giving to someone;
-
Health
; only used in entities (things like mobs, players, etc.) -
Age
; only used in entities
edit; it's good to try to put it in a single line the way ginkgo did, since that's how commands are typed in Minecraft, but i'll post the command here formatted the way you did;
give @p minecraft:netherite_sword
{
display: {
Name: "{\"text\":\"Kindness (¾)\",\"color\":\"red\",\"italic\":false}",
Lore: ["{\"text\":\"This sword was forged from the deep depths of The Blazing Tundra it was weilded by the greatest swordsman in the land but was sadly lost many years ago.\"color\":\"dark_purple\",\"italic\":false}"],
Unbreakable: 1b,
HideFlags: 7b,
Enchantments: [
{id: sharpness, lvl: 10},
{id: smite, lvl:10},
{id: bane_of_arthropods, lvl: 10},
{id: fire_aspect, lvl: 10},
{id: knockback, lvl: 10},
{id: looting, lvl: 10},
{id: sweeping_edge, lvl:10}
]
}
}