I am trying to make a mob arena. The arena is already built obviously. I'm just trying to figure out how to make a working scoreboard for different mobs. I saw a few people mention changing the loot table for specific mobs but I have no idea how to do that. I also looked up some videos but those were relatively useless as they based it off the mobs loot such as rotten flesh, and we all know that zombies don't always drop rotten flesh.
2 Answers
Besides for those janky mob drop systems, you really cannot. I do have an idea though.
Command
As long as it doesn’t matter who gets credit for it (i.e. You killed it vs. your friend killed it), you can simply test for a certain count (i.e. /testfor @e[type=zombie,c=]
) and then have another c=4, c=3, etc.. Then once the highest one stops returning true, you know a zombie has died. Make sure the highest one is then disabled, and the next highest becomes the tester. This is also pretty janky but should work better than mob drops.
Selector
@e
= All Entities (i.e. Minecarts, Armor Stands, Players, Zombies)[ ... ]
= Additional Selectors to narrow down the searchtype=zombie
= Look for an entity of type “zombie”c=5
= Look for 5 zombies. If five or more are found this will return true.
You can just create a scoreboard that detects, for example, zombies killed:
/scoreboard objectives add zombie_kills minecraft.killed:minecraft.zombie
.
I hope I typed everything correctly. But