So the new 1.14 update seems to have changed a lot of commands (again). All I'm trying to do is detect when the player breaks a spawner in a specific location. Say for example the spawner is at -200 20 10, how can I check if that spawner is broken and run a command?

I've tried the command /execute if block -217 64 -220 #minecraft:spawner run say hello as a test in a repeating command block, and for some reason, it won't check for one. I've even tried entity, but the only option is checking for a minecart spawner. I've looked everywhere but can't seem to find the answer.

  • Why did you use a #? There is no "spawner" tag. Commented May 6, 2019 at 20:40

1 Answer 1


If you know there is a spawner at certain coordinates, you can test if there's air there instead of testing if there's a spawner. Logically, there will be air in the place of the spawner when it breaks, so we don't need to identify spawners using commands at all.

Here's what the command looks like if there's a spawner at coordinates x:0 y:70 z:0:

/execute if block 0 70 0 minecraft:air

By the way, the following command worked for me:

/execute if block 0 70 0 minecraft:spawner
  • Thank you, that's really strange, I must've set the wrong location or something, but I tried that command and nothing worked. Oh well, it's working now, thanks for your help. :) Commented May 6, 2019 at 18:49
  • 3
    This solution is unreliable, someone might instantly put another block there. I recommend /execute unless block 0 70 0 spawner. Commented May 6, 2019 at 20:41
  • @FabianRoling Yeah, I’m pretty sure that there’s at least one mod that lets you overwrite the blocks in a location with blocks of the player’s choosing. Or without mods, they might bury the spawned with fluid blocks then break the spawned, causing it to be filled with a flowing fluid block.
    – nick012000
    Commented May 7, 2019 at 2:10
  • 1
    @nick012000 Much easier, just use your "use" key with a block in your offhand as soon as you're done mining. If it's withing 0.05 seconds, it's instant for the server. Commented May 7, 2019 at 2:47
  • 1
    Thanks everyone for the solutions. Commented May 8, 2019 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .