Remove two mob-related crashes logged by publicly listed server

This commit is contained in:
kay27 2021-07-13 00:50:25 +04:00
parent ae3b433098
commit 33b63e7511
2 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,8 @@ mobs:register_mob("mobs_mc:creeper", {
if self._forced_explosion_countdown_timer then
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
if self._forced_explosion_countdown_timer <= 0 then
mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength)
-- mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength)
mcl_explosions.explode(self.object:get_pos(), self.explosion_strength, { drop_chance = 1.0 })
end
end
end,

View File

@ -388,7 +388,7 @@ end
local init_trades = function(self, inv)
local profession = professions[self._profession]
local trade_tiers = profession.trades
local trade_tiers = profession and profession.trades
if trade_tiers == nil then
-- Empty trades
self._trades = false