diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 16f4343b1..6f3a4f13c 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1949,7 +1949,7 @@ local monster_attack = function(self) -- find specific mob to attack, failing that attack player/npc/animal if specific_attack(self.specific_attack, name) - and (type == "player" or type == "npc" + and (type == "player" or ( type == "npc" and self.attack_npcs ) or (type == "animal" and self.attack_animals == true)) then p = player:get_pos() @@ -4033,6 +4033,7 @@ minetest.register_entity(name, { dogshoot_count_max = def.dogshoot_count_max or 5, dogshoot_count2_max = def.dogshoot_count2_max or (def.dogshoot_count_max or 5), attack_animals = def.attack_animals or false, + attack_npcs = def.attack_npcs or false, specific_attack = def.specific_attack, runaway_from = def.runaway_from, owner_loyal = def.owner_loyal, diff --git a/mods/ENTITIES/mobs_mc/villager_zombie.lua b/mods/ENTITIES/mobs_mc/villager_zombie.lua index cd0e89215..cbb4fa1d3 100644 --- a/mods/ENTITIES/mobs_mc/villager_zombie.lua +++ b/mods/ENTITIES/mobs_mc/villager_zombie.lua @@ -133,6 +133,7 @@ mcl_mobs:register_mob("mobs_mc:villager_zombie", { view_range = 16, fear_height = 4, harmed_by_heal = true, + attack_npcs = true, }) mcl_mobs:spawn_specific( diff --git a/mods/ENTITIES/mobs_mc/zombie.lua b/mods/ENTITIES/mobs_mc/zombie.lua index 4bb77e5f9..5ae7e922f 100644 --- a/mods/ENTITIES/mobs_mc/zombie.lua +++ b/mods/ENTITIES/mobs_mc/zombie.lua @@ -101,6 +101,7 @@ local zombie = { self.object:set_properties({visual_size = self.visual_size}) self.base_size = self.visual_size end, + attack_npcs = true, } mcl_mobs:register_mob("mobs_mc:zombie", zombie)