From 6266516ea1540cd93e5c93ffd042a550eb88f7d6 Mon Sep 17 00:00:00 2001 From: codiac Date: Mon, 11 Sep 2023 15:18:39 +1000 Subject: [PATCH] Do not go home if attacking --- mods/ENTITIES/mobs_mc/iron_golem.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/iron_golem.lua b/mods/ENTITIES/mobs_mc/iron_golem.lua index 9cdb6aa10..2d081e4fe 100644 --- a/mods/ENTITIES/mobs_mc/iron_golem.lua +++ b/mods/ENTITIES/mobs_mc/iron_golem.lua @@ -91,7 +91,7 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", { if self.home_timer > 10 then self.home_timer = 0 - if self._home then + if self._home and self.state ~= "attack" then local dist = vector.distance(self._home,self.object:get_pos()) if dist >= tele_dist then self.object:set_pos(self._home)