This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I am trying to detect if there is a gold nugget in a chest named coin, unitalicized, and gold color. Here's the command I use:
/execute if block ~ ~1 ~ minecraft:chest{Items:[{id:"minecraft:gold_nugget",Count:1b,tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"italic\":\"false\"}"}}}]}
But when I put a gold nugget in with those traits, it doesn't detect it. Help is much appreciated!
If you are in the Minecraft 1.16 snapshots or 1.15 this command should work:
execute if block ~ ~1 ~ chest{Items:[{id:"minecraft:gold_nugget",Count:1b,tag:{display:{Name:'{"text":"Coin","color":"gold","italic":false}'}}}]}
Put that in a repeating command block attach a conditional chain command block after it or run a command after the test for your output.
Thanks you! I figured out the problem. The item I was trying to detect had the nbt written as italic,color,text instead of text,color,italic.
I am trying to detect if there is a gold nugget in a chest named coin, unitalicized, and gold color. Here's the command I use:
/execute if block ~ ~1 ~ minecraft:chest{Items:[{id:"minecraft:gold_nugget",Count:1b,tag:{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\",\"italic\":\"false\"}"}}}]}
But when I put a gold nugget in with those traits, it doesn't detect it. Help is much appreciated!
If you are in the Minecraft 1.16 snapshots or 1.15 this command should work:
execute if block ~ ~1 ~ chest{Items:[{id:"minecraft:gold_nugget",Count:1b,tag:{display:{Name:'{"text":"Coin","color":"gold","italic":false}'}}}]}
Put that in a repeating command block attach a conditional chain command block after it or run a command after the test for your output.
Thanks you! I figured out the problem. The item I was trying to detect had the nbt written as italic,color,text instead of text,color,italic.