Mobs don't follow food in hand in love mode
This commit is contained in:
parent
0d7e957694
commit
1362730dbf
|
@ -592,14 +592,16 @@ local update_tag = function(self)
|
||||||
if mobs_debug then
|
if mobs_debug then
|
||||||
tag = "nametag = '"..tostring(self.nametag).."'\n"..
|
tag = "nametag = '"..tostring(self.nametag).."'\n"..
|
||||||
"state = '"..tostring(self.state).."'\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"..
|
"health = "..tostring(self.health).."\n"..
|
||||||
"breath = "..tostring(self.breath).."\n"..
|
"breath = "..tostring(self.breath).."\n"..
|
||||||
"gotten = "..tostring(self.gotten).."\n"..
|
"gotten = "..tostring(self.gotten).."\n"..
|
||||||
"tamed = "..tostring(self.tamed).."\n"..
|
"tamed = "..tostring(self.tamed).."\n"..
|
||||||
"horny = "..tostring(self.horny).."\n"..
|
"horny = "..tostring(self.horny).."\n"..
|
||||||
"hornytimer = "..tostring(self.hornytimer).."\n"..
|
"hornytimer = "..tostring(self.hornytimer).."\n"..
|
||||||
"runaway_timer = "..tostring(self.runaway_timer)
|
"runaway_timer = "..tostring(self.runaway_timer).."\n"..
|
||||||
|
"following = "..tostring(self.following)
|
||||||
else
|
else
|
||||||
tag = self.nametag
|
tag = self.nametag
|
||||||
end
|
end
|
||||||
|
@ -2024,10 +2026,12 @@ local follow_flop = function(self)
|
||||||
self.following = nil
|
self.following = nil
|
||||||
end
|
end
|
||||||
else
|
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
|
if self.following
|
||||||
and self.following:is_player()
|
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
|
self.following = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user