1

I have been trying to get this command to trigger when I have a piece of dirt in the first slot but it hasn't worked.

/execute if block ~ ~ ~ minecraft:chest{Items:[{id:"dirt",Slot:0,Count:1}]} run say hi

I've tried this so far but it just won't work. Any ideas?

Edit: There's another post with an answer but it uses /testforblock which isn't a valid command anymore.

1
  • 1
    it's worth looking at the other answers on that question - there's one specifically for 1.13+.
    – Corsaka
    Commented Nov 2, 2023 at 11:25

0