1
0
Fork 0

Merge pull request 'Fix crash on ghast explosions' (#2339) from fix_ghast_crash into master

Reviewed-on: MineClone2/MineClone2#2339
This commit is contained in:
cora 2022-06-20 11:46:55 +00:00
commit 7429f5dc93
1 changed files with 6 additions and 1 deletions

View File

@ -107,7 +107,12 @@ mcl_mobs:register_arrow("mobs_mc:fireball", {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6},
}, nil)
mcl_mobs:boom(self, self.object:get_pos(), 1, true)
local p = self.object:get_pos()
if p then
mcl_mobs:boom(self, p, 1, true)
else
mcl_mobs:boom(self, player:get_pos(), 1, true)
end
end,
hit_mob = function(self, mob)