diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 641348132..214ee5504 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -632,12 +632,15 @@ minetest.register_entity(":__builtin:item", { local fg = minetest.get_item_group(nn, "fire") local dg = minetest.get_item_group(nn, "destroys_items") if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then - if dg ~= 2 then - minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}, true) + --Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed. + if self.age > 2 then + if dg ~= 2 then + minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) + end + self._removed = true + self.object:remove() + return end - self._removed = true - self.object:remove() - return end -- Push item out when stuck inside solid opaque node diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 596843ac6..dffbd8b39 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2059,6 +2059,7 @@ local follow_flop = function(self) or self.order == "follow") and not self.following and self.state ~= "attack" + and self.order ~= "sit" and self.state ~= "runaway" then local s = self.object:get_pos() @@ -2079,6 +2080,7 @@ local follow_flop = function(self) if self.type == "npc" and self.order == "follow" and self.state ~= "attack" + and self.order ~= "sit" and self.owner ~= "" then -- npc stop following player if not owner @@ -2364,6 +2366,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else set_velocity(self, self.walk_velocity) @@ -2390,6 +2394,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else set_velocity(self, self.run_velocity) set_animation(self, "run") @@ -2622,6 +2628,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else if self.path.stuck then @@ -3516,6 +3524,8 @@ local mob_step = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) end -- Despawning: when lifetimer expires, remove mob