From 1362730dbf67d9ecd1e5d5ebea8b0cf09af39c76 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 5 Dec 2020 02:07:43 +0100 Subject: [PATCH] Mobs don't follow food in hand in love mode --- mods/ENTITIES/mcl_mobs/api.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index a9afcf0f2..b09f0d4c1 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -592,14 +592,16 @@ local update_tag = function(self) if mobs_debug then tag = "nametag = '"..tostring(self.nametag).."'\n".. "state = '"..tostring(self.state).."'\n".. - "attack = '"..tostring(self.attack).."'\n".. + "order = '"..tostring(self.order).."'\n".. + "attack = "..tostring(self.attack).."\n".. "health = "..tostring(self.health).."\n".. "breath = "..tostring(self.breath).."\n".. "gotten = "..tostring(self.gotten).."\n".. "tamed = "..tostring(self.tamed).."\n".. "horny = "..tostring(self.horny).."\n".. "hornytimer = "..tostring(self.hornytimer).."\n".. - "runaway_timer = "..tostring(self.runaway_timer) + "runaway_timer = "..tostring(self.runaway_timer).."\n".. + "following = "..tostring(self.following) else tag = self.nametag end @@ -2024,10 +2026,12 @@ local follow_flop = function(self) self.following = nil end else - -- stop following player if not holding specific item + -- stop following player if not holding specific item, + -- mob is horny, fleeing or attacking if self.following and self.following:is_player() - and follow_holding(self, self.following) == false then + and (follow_holding(self, self.following) == false or + self.horny or self.state == "runaway") then self.following = nil end