Minecraft – Can somebody help me with the execute commands in Minecraft

minecraft-commandsminecraft-java-edition

Recently, Minecraft had removed the /testfor command, which broke these sets of commands that I was trying to execute today.

/testfor @p[r=10] {SelectedItem:{id:"minecraft:feather",tag:{display:{Name:"Roc's Feather",Lore:[Jump higher using this feather.]}}}}`

Now normally, from Minecraft 1.13 onwards, the new /execute command would've been the replacement for the /testfor command, but as I soon found out, the command failed to detect my Roc's Feather and thus could not execute an /effect command that gave me a Jump Boost, for 1 second, at level 3.

I tried remaking my feather from scratch with this command here:

/give @p minecraft:feather{display:{Name:"{\"text\":\"Roc's Feather\",\"color\":\"light_purple\",\"bold\":true,\"italic\":true,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false}",Lore:["{\"text\":\"Jump higher using this feather.\",\"bold\":false,\"italic\":true,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false}"]}} 1

But the execute command I placed did not detect this type of uniqueness.

/execute if entity @p[distance=10,nbt={SelectedItem:{id:"minecraft:feather",Count:1b,tag:{display:{Name:"{\"text\":\"Roc's Feather\",\"color\":\"light_purple\",\"bold\":true,\"italic\":true,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false}",Lore:["{\"text\":\"Jump higher using this feather.\",\"bold\":false,\"italic\":true,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false}"]}}}}] run effect give @s minecraft:jump_boost 1 3 true

Can somebody tell me what I'm doing wrong here because I cannot even tell what's the issue.

Best Answer

One thing you might try in that final command is to change it from saying @a[distance=10] to @a[distance=..10] because in 1.13 they changed it so that ..10 is less than 10, 10 is exactly 10, and 10.. is greater than ten, with 1..10 being between 1 and 10. So unless you are exactly 10 blocks away nothing will happen.

Related Topic