mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-24 17:51:28 +01:00
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:
parent
96957da5cf
commit
96469f8518
@ -165,6 +165,7 @@ local firework_def = {
|
|||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
local elytra = mcl_playerplus.elytra[user]
|
local elytra = mcl_playerplus.elytra[user]
|
||||||
if elytra.active and elytra.rocketing <= 0 then
|
if elytra.active and elytra.rocketing <= 0 then
|
||||||
|
local meta = itemstack:get_meta()
|
||||||
elytra.rocketing = meta:get_float("vl_fireworks:duration")
|
elytra.rocketing = meta:get_float("vl_fireworks:duration")
|
||||||
if not core.is_creative_enabled(user:get_player_name()) then
|
if not core.is_creative_enabled(user:get_player_name()) then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
|
Loading…
Reference in New Issue
Block a user