From a077e4535fc173bda23013b71d65f98117b9d2fb Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 17 Jul 2022 00:32:06 +0200 Subject: [PATCH] Fix non-monsters being unable to attack A check in the relevant function excluded all non-monsters from looking for targets to attack. This removes that check and relies on the passive attribute of the entity --- mods/ENTITIES/mcl_mobs/api.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 5485e7cc1..61bed6901 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1905,11 +1905,10 @@ local specific_attack = function(list, what) return false end --- monster find someone to attack +-- find someone to attack local monster_attack = function(self) - if self.type ~= "monster" - or not damage_enabled + if not damage_enabled or minetest.is_creative_enabled("") or self.passive or self.state == "attack"