From 9ef0738a2ef7f915c1ff16aeac0cd43dd89f78a1 Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Tue, 24 Dec 2024 22:56:47 +0100 Subject: [PATCH] Dispensers work with fireworks --- mods/ITEMS/vl_fireworks/register.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/vl_fireworks/register.lua b/mods/ITEMS/vl_fireworks/register.lua index e02647e1e..b6259ed56 100644 --- a/mods/ITEMS/vl_fireworks/register.lua +++ b/mods/ITEMS/vl_fireworks/register.lua @@ -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