From 21f7738b4db922af48ea6947164d919bc1c2379c Mon Sep 17 00:00:00 2001 From: kay27 Date: Sun, 13 Mar 2022 08:34:12 +0400 Subject: [PATCH] Fix mob despawn --- mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua | 12 ++++++++---- mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index cbbda43d5..ab91a0542 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -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() diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua index a0467f4d2..454794dda 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/set_up.lua @@ -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