#execute if block Comand not working
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1724562597: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
You're sure the block is at those coordinates?
yes
In what dimension?
setblock 0 60 0 barrel[facing=up]{LootTable:"gamerz_riot:trial_ominous_supplies",CustomName:'{"color":"red","italic":false,"text":"Supply Crate"}'} replace barrier
In Overworld
Okay, try checking the block without the data
then working
Is this what you used to set the block?
ya
The data you're checking is not the same as the data you set for it
I have to set whole data ?
You can do just the CustomName
But it has the be the whole CustomName, can't do a partial check for that because it's technically all one string
Not working execute if block 0 60 0 minecraft:barrel{CustomName:'{"text":"Supply Crate"}'} run say hi
That's not the whole CustomName, I just told you...
You need the color and italics too, just like up here
setblock 0 60 0 barrel[facing=up]{CustomName:'{"color":"red","italic":false,"text":"Supply Crate"}'} replace barrier
Why are you sharing that again?
no working with "execute if block 0 60 0 barrel[facing=up]{CustomName:'{"color":"red","italic":false,"text":"Supply Crate"}'} run say hi"
That's not super surprising, but was worth a try. Checking data like that isn't always going to be super accurate
Why do you need to check the data if the barrel?
If you know it's at those coordinates, whether it's a barrel named Supply Crate or not should be irrelevant
If block spawns there then a Particle will run at that pos..
Seems to me that you can just check if it's a barrel
execute if block 0 60 0 chest{CustomName:'{"text":"Musical Chest","color":"dark_aqua"}'} run particle minecraft:note ~ ~0.1 ~ 0.4 0.3 0.4 1 1 force
this command works
Or, alternatively, you can also spawn a marker with a tag at that position along with the barrel, and run the command as that instead
marker ?