diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 252873629..0afb846b9 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -201,6 +201,7 @@ mcl_mobs.register_mob("mobs_mc:wither", { self._death_timer = self._death_timer + self.health - self._health_old if self.health == self._health_old then self._death_timer = self._death_timer + dtime end if self._death_timer > 100 then + self._removed = true self.object:remove() return false end diff --git a/mods/ITEMS/vl_projectile/init.lua b/mods/ITEMS/vl_projectile/init.lua index 84533dd78..416f5e275 100644 --- a/mods/ITEMS/vl_projectile/init.lua +++ b/mods/ITEMS/vl_projectile/init.lua @@ -276,6 +276,9 @@ local function handle_entity_collision(self, entity_def, projectile_def, object) if do_damage then object:punch(self.object, 1.0, projectile_def.tool or { full_punch_interval = 1.0, damage_groups = dmg }, dir ) + -- Guard against crashes when projectiles get destroyed in response to what it punched + if not self.object:get_pos() then return true end + -- Indicate damage damage_particles(vector.add(pos, vector.multiply(self.object:get_velocity(), 0.1)), self._is_critical)