Fix mob despawn

This commit is contained in:
kay27 2022-03-13 08:34:12 +04:00
parent 7ad310a848
commit 21f7738b4d
2 changed files with 9 additions and 5 deletions

View File

@ -902,10 +902,14 @@ function mobs.mob_step(self, dtime)
object = self.object,
max_hear_distance = 5
}, true)
self.object:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.lava_damage}
}, nil)
--[[ if not mcl_burning.is_burning(self.object) then
mcl_burning.set_on_fire(self.object, 1.1)
else
]] self.object:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.lava_damage}
}, nil)
-- end
self.lava_counter = 0
self.health = self.health - lava_damage
self:teleport()

View File

@ -21,7 +21,7 @@ mobs.can_despawn = function(self)
if new_distance < distance then
distance = new_distance
if distance < 33 then return false end
if distance < 128 and math_random(1, 200) == 19 then return true end
if distance < 128 and math_random(1, 42) ~= 11 then return false end
end
end
end