#Detect a Custom name chest not working in 1.21
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
do you have a renamed chest in your world rn
come to that renamed chest, do data get block <cords of renamed chest> and show the result here
0, 60, 0 has the following block data: {CustomName:'{"text":"Variety Chest","color":"blue"}', x: 0, y: 60, Items: [], z: 0, id:"minecraft:chest"}
data sent ...
uh
isn't the issue the fact that 1.21 uses components and not NBT?
wait
I'm dumb lol
I thought this was an item
what exactly are you trying to detect?
renamed Chest
so you just want to know if the chest has a custom name?
I wand to detect a Renamed chest at a coordinate and run the command
execute if block ~ ~ ~ chest{CustomName:'{"text":"Name"}'} run
did this work before in earlier versions?
this works in previous version but not now
isn't your custom name "Variety Chest"?
yes it is
so try replicaing the "Name" over here with "Variety Chest"
yeah so you just do if block {CustomName:'{"text":"Variety Chest","color":"blue"}'}
and it should work
yk
wait
are you trying to check if the block has any custom name?
or specifically the custom name "Variety Chest"?
/execute if block 2 58 2 chest{CustomName:'{"text":"TEXT"}'}
Not work
the block is at 0, 60, 0, right?
I texted on other cordinatet
and the chest's custom name is "TEXT"?
THX It worked
that's literally what I said
Ok Ok My skill Issue.. 😂
If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D
Just to clarify here, the reason it wasn't working was because the actual chest's name had a blue colour, and so detecting for the name without a colour wouldn't properly detect it. Keep that in mind for the future, in case you change the colour or anything like that