So I am trying to be able to detect if a specific mob is dead and then execute a command. I have already tagged the mob "boss1" and I know that you need a tag to detect the entity but I don't know the commands to actually detect it.

1 Answer 1


You will need to check for the entity using /execute.

/execute unless entity @e[tag=boss1] run ...

Run the command unless there is an entity with the tag boss1.

When the boss dies, you can put the command to run after the run parameter.

  • Is there a way to make it only run once?
    – Firestryke
    Jun 2, 2020 at 17:26
  • I figured it out
    – Firestryke
    Jun 2, 2020 at 17:51
  • 1
    I had a repeating blinking circuit activating 2 command blocks with the /execute unless entity @e[tag=boss1] run ... command but one had the command I wanted to run and the other had a fill command that stopped the circuit by replacing certain blocks with air.
    – Firestryke
    Jun 2, 2020 at 17:54
  • 1
    Great job, you figured it out! Please consider clicking the check button on the answer you find most useful. Thanks! Jun 2, 2020 at 17:56
  • @ExpertCoder14 placing or removing a redstone block next to a repeating command block in order to turn it on or off isn't that bad. There are other ways to turn a repeating command block on and off, such as setting "Needs Redstone" when there isn't any power around to stop the chain, though.
    – MBraedley
    Jun 2, 2020 at 18:29

You must log in to answer this question.

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