I recently started working on a map and I encountered a problem when it comes to Mob death detection. I tried this setup but it just didn't work for me because I got really confused with it. So I'm asking if anyone knows how to do this?
I want to make something like a Mob Detection System. For example: the player kills a mob, the mob's death somehow sends a Redstone signal to a command block, which then teleports the player.

  • Rather than track mob death, why not track player mob kills? – aytimothy Mar 22 at 7:44
  • 1
    What kind of mob, how many mobs, please give some more information – Bloodbeast 234 Mar 22 at 9:06
  • 3
    Duplicate of How do I detect the death of a mob? – Fabian Röling Mar 22 at 11:48
  • "it just didn't work for me because I got really confused with it" is not a proper statement of your problem. What part of it didn't work? In what way? What have you tried yourself beyond that? – Fabian Röling Mar 22 at 11:48

Type this command into the chat:

/scoreboard objectives add mobKilled minecraft.killed:minecraft.zombie

Then in a repeating always active command block put this command in it:

/tp @a[scores={mobKilled=1..}] *your location here*

Then in a chain, conditional, always active command block connected to the repeating one:

/scoreboard players set @a[scores={mobKilled=1..}] mobKilled 0

The first command creates a scoreboard which tracks zombie deaths,

Then the repeating command block teleports all players who have killed a zombie to your location,

Then the chain command block resets the players score (The mob can be changed in the first command if you want, like this: minecraft.killed:minecraft.mobhere instead of zombie

|improve this answer|||||
  • Worked like a charm! Thank you! – Quarix _CZ Mar 22 at 9:40
  • Thanks, I would appreciate it if you marked it as answer – Bloodbeast 234 Mar 22 at 10:49

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.