diff --git a/mods/ITEMS/mcl_fire/fire_charge.lua b/mods/ITEMS/mcl_fire/fire_charge.lua index 4d18e44edc..5c33288f7b 100644 --- a/mods/ITEMS/mcl_fire/fire_charge.lua +++ b/mods/ITEMS/mcl_fire/fire_charge.lua @@ -49,11 +49,13 @@ minetest.register_craftitem("mcl_fire:fire_charge", { local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51)) local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball") local ent = fireball:get_luaentity() - ent._shot_from_dispenser = true - local v = ent.velocity or 1 - fireball:set_velocity(vector.multiply(dropdir, v)) - ent.switch = 1 - stack:take_item() + if ent then + ent._shot_from_dispenser = true + local v = ent.velocity or 1 + fireball:set_velocity(vector.multiply(dropdir, v)) + ent.switch = 1 + stack:take_item() + end end, })