From 379972ea110080144245847ceaf987e55f49c7c4 Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 14 Feb 2022 13:42:25 +0100 Subject: [PATCH] fix crash when blaze attacks logged off player --- mods/ENTITIES/mobs_mc/blaze.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 5340b804ea..5c6972872b 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -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()