mojira.dev
MC-295417

"LifeTime" NBT with value of "0" in "firework_rocket" data not working as intended

Using datapack I created a command that summons a firework that instantly explodes, in theory:

/summon firework_rocket ~ ~ ~ {LifeTime:0,FireworksItem:{id:"minecraft:firework_rocket",count:1,components:{"minecraft:fireworks":{explosions:[{shape:"large_ball",has_twinkle:true,has_trail:true,colors:[I;16711680]}]}}}}

Then on the next line of the function I used “tp“ command to teleport it 100 blocks below a player. To my surprise, the firework explosion wasn’t on a player’s location but on a new one where it got tp’ed.

I decided to check how many ticks it takes to make an explosion. The answer is 2. You can check it by creating 2 functions: in the first one paste a command that summons firework_rocket and on the next line insert schedule command that calls the second function with a delay of 2 ticks that contains, for example, “tp“ command. It was working on 1.20.4 but since then it doesn’t. If you need more info, feel free to ask.

  • Use the attached datapack.
    Steps to Reproduce:
    1. Add the attached datapack into your world’s datapack folder.
    2. Reload datapacks with command “/reload“.
    3. Run a command:

  • /function firework:function1
  • The function will summon a firework that is supposed to explode right after summoning and teleport rocket to -100 by Y axis.

Observed Results: It summons a firework rocket and teleports it to -100 by Y axis and then the explosion happens.

Expected Results: As in 1.20.4, there should be an explosion first and then teleport a rocket to -100 by Y axis because of LifeTime NBT is set to 0.

Attachments

Comments 13

We do not have enough resources to reproduce this issue.

Please attach a minimal setup data pack that can be used to reproduce this issue.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Sure, here’s an easy way to reproduce the issue: you can download this datapack or create a datapack that only has two functions in it, for example, function1.mcfunction & function2.mcfunction.
[mediaInline]


function1.mcfunction

summon firework_rocket ~ ~ ~ {LifeTime:0,FireworksItem:{id:"minecraft:firework_rocket",count:1,components:{"minecraft:fireworks":{explosions:[{shape:"large_ball",has_twinkle:true,has_trail:true,colors:[I;16711680]}]}}}}
# You can change the delay to 1t to compare results
schedule function firework:function2 2t

function2.mcfunction

tp @e[type=firework_rocket] ~ -100 ~

Then, call a function “function1.mcfunction“ from chat or a command block and compare results with 1 tick and 2 ticks delay. You can notice that it takes 1 additional tick before explosion that wasn't noticed in 1.20.4.

We do not have enough information to find the cause of this issue.

Please record a video of this happening and attach it to this report.
If you are on Windows, you can use Windows+Alt+R to open a built-in app for recording game footage.
If you are on Mac (Mojave or later), you can use Shift+Command+5 to open a built-in app for recording your screen.
In case you don't have a program to record videos, we recommend using the free recording software OBS.
In case the resulting video file is too large to be uploaded to the bug tracker directly, please upload it elsewhere (e.g. as unlisted video on YouTube) and link to it here.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- ✍️ Feedback and Suggestions -- 📖 Game Wiki

function1.mcfunction file that is called in the video:

[media]

Version 1.20.4:

[media]

Version 1.21.5-rc1 (also previous snapshots):

[media]

I’m unable to replicate this behaviour.

When running

/function firework:function1

the firework spawns just below me, as it did in your 1.20.4 video

[media]
3 more comments

Thanks.

I’m still unclear what I am meant to be doing here however, and what the issue is.

It seems the functions set off fireworks, but what is the issue here? Please can you elobrate/edit the description to match this format:

Steps to Reproduce:

  1. (Explain what needs to be done for the issue to happen)

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.

Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- 📓 Project Summary -- ✍️ Feedback and Suggestions -- 📖 Game Wiki

  1. Use the attached datapack.
    Steps to Reproduce:
    1. Add the attached datapack into your world’s datapack folder.
    2. Reload datapacks with command “/reload“.
    3. Run a command:

  2. /function firework:function1
  3. The function will summon a firework that is supposed to explode right after summoning and teleport rocket to -100 by Y axis.

    Observed results:

Observed Results: It summons a firework rocket and teleports it to -100 by Y axis and then the explosion happens.

Expected Results: As in 1.20.4, there should be an explosion first and then teleport a rocket to -100 by Y axis because of LifeTime NBT is set to 0.

Sorry for the previous incomplete message and formatting.

Can confirm that 1.20.5 had different behavior here, and can confirm that the firework does explode below the world instead of before the teleport.

You are teleporting the firework in the same tick it was created though, so I am not sure this actually will be seen as a bug.

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Former user

(Unassigned)

Confirmed

Commands, Entities

1.21.4, 1.21.5 Pre-release 2, 25w20a

Retrieved