1
0
Fork 0

fix crash when blaze attacks logged off player

new_mapgen_api
cora 2022-02-14 13:42:25 +01:00 committed by Gitea
parent 414e2e7725
commit 379972ea11
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ mobs:register_mob("mobs_mc:blaze", {
glow = 14,
fire_resistant = true,
do_custom = function(self)
if self.state == "attack" and vector.distance(self.object:get_pos(), self.attack:get_pos()) < 1.2 then
if self.state == "attack" and self.attack:get_pos() and vector.distance(self.object:get_pos(), self.attack:get_pos()) < 1.2 then
mcl_burning.set_on_fire(self.attack, 5)
end
local pos = self.object:get_pos()