execute if entity @e[type=item_frame,x=124,y=65,z=81,nbt={Item:{id:"minecraft:paper"},tag:{display:{Name:'{"text":"Hwacha","color":"blue","italic":false}',Lore:['{"text":"Masterwork Schematic","color":"white","italic":false}']},Enchantments:[{}]}}]

I have this in a repeating command block. I'm trying to test for a specific named piece of paper in an item frame. When I put the specified item in the item frame at the specified coordinates, it does nothing. The command shows up in blue so I don't know why it is not working? Any Ideas? Java edition 1.16.3.

  • The first thing to note is that the x, y, and z selector arguments don’t do what you think they do. They simply start the search at those coordinates, so in this case since no distance arguments or nearest is provided, ALL item frames will be selected that meet the rest of the criteria. – Penguin Nov 15 at 5:16
  • How do I select a certain item frame? – Broken Fence Nov 15 at 6:48
  • **I've figured out how to select the item frame, however, the commandblock won't recognize a paper with nbt tags. I can get it to work with a normal piece of paper but a named/enchanted piece of paper isn't recognized. – Broken Fence Nov 15 at 7:39

tag goes inside Item.

Wrong way:

0: {
1:     Item:{
2:         id:"minecraft:paper"
3:     },
4:     tag:{
5:          display:{
6:              Name:'{"text":"Test"}'
7:          }
8:     }
9: }

Right way:

0: {
1:     Item:{
2:         id:"minecraft:paper",
3:         tag:{
4:             display:{
5:                 Name:'{"text":"Test"}'
6:             }
7:         }
8:     }
9: }
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.