Why? I understand some people are using 1.8, because they don't like 1.9 combat changes, but why are you still using 1.9? Move to 1.13 and learn new command format. It might be difficult at first, but it allows you to do so many things so much easier.
Also, the thing you are trying to do can be accomplished with loot tables, but it's quite complicated. You will have to run a command, that gives all zombies certain score in a custom objective.
/scoreboard players set @e[type=minecraft:zombie] isZombie 1
Then create a loot table for villagers to make them drop a specific item when killed by zombie.
Hi, I want to know if it is possible if you could make a scoreboard objectives that counts how many villagers are killed by zombies.
The only stats are for players, not mobs. So, there is no way I can create a scoreboard called Kills with stat.killEntity.Villager for zombies.
BTW I am using 1.9, Thanks!
Why? I understand some people are using 1.8, because they don't like 1.9 combat changes, but why are you still using 1.9? Move to 1.13 and learn new command format. It might be difficult at first, but it allows you to do so many things so much easier.
Also, the thing you are trying to do can be accomplished with loot tables, but it's quite complicated. You will have to run a command, that gives all zombies certain score in a custom objective.
Then create a loot table for villagers to make them drop a specific item when killed by zombie.
{ "pools": [ { "rolls": 1, "entries": [ { "type": "item", "weight": 1, "name": "minecraft:diamond", "conditions": [ { "condition": "entity_scores", "entity": "killer", "scores": { "isZombie": 1 } } ], "functions": [ { "function": "set_nbt", "tag": "{DetectVillagerDeath:1b}" } ] } ] } ] }Now you just need to detect that item, increase value of your custom objective and kill that item.