forked from VoxeLibre/VoxeLibre
Fix passive mobs despawning
According to the wiki most passive mobs do not despawn. The ones that do have already been explicity marked as despawning. <https://minecraft.fandom.com/wiki/Spawn#Despawning> <https://minecraft.fandom.com/wiki/Mob#Despawning>
This commit is contained in:
parent
ac87e0604e
commit
4a085c9526
|
@ -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