From 9099f3ac7a8f8bd3d6088dec71704f03ce210db0 Mon Sep 17 00:00:00 2001 From: epCode Date: Mon, 31 Oct 2022 23:10:51 +0000 Subject: [PATCH 1/3] Fix mobs flopping for the first second when in thier own element --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 19d627c91..567ece152 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -531,7 +531,7 @@ local flight_check = function(self) end for _,checknode in pairs(fly_in) do - if nod == checknode then + if nod == checknode or nod == "ignore" then return true end end @@ -2468,7 +2468,7 @@ local follow_flop = function(self) -- swimmers flop when out of their element, and swim again when back in if self.fly then local s = self.object:get_pos() - if not flight_check(self, s) then + if flight_check(self, s) == false then self.state = "flop" self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0}) From 8a2962cd46046caa2952228c4ca66cd565d5f319 Mon Sep 17 00:00:00 2001 From: epCode Date: Mon, 31 Oct 2022 23:22:14 +0000 Subject: [PATCH 2/3] Fix all mobs being givin armor list (Fix Villager loosing jobs) --- mods/ENTITIES/mcl_mobs/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 567ece152..13db14f18 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -4096,7 +4096,7 @@ local mob_activate = function(self, staticdata, def, dtime) self.on_spawn_run = true -- if true, set flag to run once only end end - if not self._run_armor_init then + if not self._run_armor_init and self.wears_armor then self.armor_list={helmet="",chestplate="",boots="",leggings=""} set_armor_texture(self) self._run_armor_init = true From 4575fd0d81171ddc267b3ee3ab74fe2c7e8b3dae Mon Sep 17 00:00:00 2001 From: epCode Date: Mon, 31 Oct 2022 23:41:49 +0000 Subject: [PATCH 3/3] Fix prexisting villagers getting rid of job clothes --- mods/ENTITIES/mcl_mobs/api.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 13db14f18..5742ebb85 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -4096,6 +4096,11 @@ local mob_activate = function(self, staticdata, def, dtime) self.on_spawn_run = true -- if true, set flag to run once only end end + + if not self.wears_armor and self.armor_list then + self.armor_list = nil + end + if not self._run_armor_init and self.wears_armor then self.armor_list={helmet="",chestplate="",boots="",leggings=""} set_armor_texture(self)