From 8ff69dda0c5480082abaa6e4291f5f91582e6e98 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 31 Jan 2019 22:00:43 +0100 Subject: [PATCH] Despawn animals, too --- mods/ENTITIES/mcl_mobs/api.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 2ec6657fd..7ff966e27 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2558,6 +2558,7 @@ local mob_staticdata = function(self) and ((not self.nametag) or (self.nametag == "")) and self.lifetimer <= 20 then + minetest.log("action", "Mob "..name.." despawns in mob_staticdata at "..minetest.pos_to_string(self.object.get_pos())) self.object:remove() return ""-- nil @@ -2776,6 +2777,7 @@ local mob_step = function(self, dtime) end end + minetest.log("action", "Mob "..name.." despawns in mob_step at "..minetest.pos_to_string(pos)) self.object:remove() return @@ -2960,11 +2962,7 @@ local can_despawn if def.can_despawn ~= nil then can_despawn = def.can_despawn else - if def.type == "monster" then - can_despawn = true - else - can_despawn = false - end + can_despawn = true end minetest.register_entity(name, { @@ -3223,6 +3221,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, if objs[n]:is_player() then -- player too close + minetest.log("info", "Mob spawn of ".. name .. " failed, player too close") return end end