Merge pull request 'Fix passive mobs despawning' (#1458) from slaesvuo/MineClone2:master into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1458
This commit is contained in:
commit
f54f4ebcf9
|
@ -3741,6 +3741,8 @@ function mobs:register_mob(name, def)
|
||||||
local can_despawn
|
local can_despawn
|
||||||
if def.can_despawn ~= nil then
|
if def.can_despawn ~= nil then
|
||||||
can_despawn = def.can_despawn
|
can_despawn = def.can_despawn
|
||||||
|
elseif def.spawn_class == "passive" then
|
||||||
|
can_despawn = false
|
||||||
else
|
else
|
||||||
can_despawn = true
|
can_despawn = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user