Minecraft – Command problem

minecraft-commandsminecraft-java-edition

I'm trying to make more weapons in one command, but there's somthing wrong

testfor @a {SelectedItem:{id:"minecraft:firework_charge",tag:{display:{Name:"Gravitize"},Lore:"A magic Gravitonic orb that allows the minipulation of gravity"}}}

will not give a positive output no matter what i do, if i hold said item, nothing happens. Please help!

heres all the commands, (in command combiner format)

FloorCrafting: fire_charge 0 {} emerald 0 {} RES:firework_charge 0 {display:{Name:"Gravitize"},Lore:"A magic Gravitonic orb that allows the minipulation of gravity"}

IF:testfor @a {SelectedItem:{id:"minecraft:firework_charge",tag:{display:{Name:"Gravitize"},Lore:"A magic Gravitonic orb that allows the minipulation of gravity"}}}

/*DO:

execute @p ~ ~ ~ effect @e[r=8,name=!@p] levitation 1 1

execute @p ~ ~ ~ summon ShulkerBullet ~ ~ ~

effect @p jump_boost 1 5

effect @p speed 1 2

*/

Best Answer

It looks like you have the Lore tag in the wrong place.

The fixed command:

testfor @a {SelectedItem:{id:"minecraft:firework_charge",tag:{display:{Name:"Gravitize",Lore:["A magic Gravitonic","orb that allows","the manipulation","of gravity"]}}}}

Be sure to change the /give command so that you have the correct item.