Dispensers work with fireworks

This commit is contained in:
the-real-herowl 2024-12-24 22:56:47 +01:00 committed by the-real-herowl
parent 93a6ce6824
commit 9ef0738a2e

@ -6,7 +6,7 @@ local description = S("Firework Rocket")
local function explode(self, pos)
-- temp code
vl_fireworks.generic_particle_explosion(pos)
mcl_mobs.mob_class.boom(self, pos, 1)
mcl_mobs.mob_class.safe_boom(self, pos, 1)
end
local firework_entity = {
@ -132,6 +132,12 @@ local function register_rocket(n, duration, force)
velocity=vector.new(0,1,0)
})
end,
_on_dispense = function(dropitem, pos, droppos, dropnode, dropdir)
vl_projectile.create("vl_fireworks:rocket_" .. n, {
pos=pos,
velocity=vector.new(0,1,0)
})
end,
})
end