Fix elytra rocket crash (#4801)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4801
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
teknomunk 2025-01-03 11:43:20 +01:00 committed by the-real-herowl
parent 96957da5cf
commit 96469f8518

@ -165,6 +165,7 @@ local firework_def = {
on_use = function(itemstack, user, pointed_thing)
local elytra = mcl_playerplus.elytra[user]
if elytra.active and elytra.rocketing <= 0 then
local meta = itemstack:get_meta()
elytra.rocketing = meta:get_float("vl_fireworks:duration")
if not core.is_creative_enabled(user:get_player_name()) then
itemstack:take_item()