#Help with give.mcfunction

1 messages · Page 1 of 1 (latest)

long harness
#

I am making a custom sword and this is the code for it:

give @a wooden_sword[max_damage=1,custom_name='"Earth Sword"',lore=['"Made From DIRT"'],enchantments={levels:{"minecraft:unbreaking":3}}] 1

However, when i change it the namespacegive function in minecraft just disappears Does anyone know why:

give @p wooden_sword[max_damage=500,custom_name='"Earth Sword"',item_name='"Earth Sword"',lore=['"Made From DIRT"'],rarity="epic",repair_cost=3,custom_model_data=1234,attribute_modifiers=[{id:"attack_damage",type:"generic.attack_damage",amount:20,operation:"add_value"},{id:"sweeping_damage_ratio",type:"player.sweeping_damage_ratio",amount:5,operation:"add_value"},{id:"attack_speed",type:"generic.attack_speed",amount:0.4,operation:"add_value"}]] 1

celest galeBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1724384089:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

hazy tulip
#

So the real issue has nothing to do with the first command, it's just the second command, right?

#

You don't need custom name and item name, you can just do item name. But the actual problem is that the syntax for both is not correct. It needs to be in JSON format, so either "\"Earth Sword\"" or "{\"text\":\"Earth Sword\"}"

oblique acorn
hazy tulip