mojira.dev
MC-111602

Firework boost remains after landing

:info: I used a firework rocket with a flight duration of 127 to demonstrate the bug, but it also occurs in survival mode without any cheats and with a flight duration of 3 (or less).

What I expected to happen:
The boost of a firework rocket vanishes after landing

What actually happened:
After landing, particles still come out of my body. When I launch myself up again, I am immediately boosted

How to reproduce

  1. Equip an elytra and give yourself a long duration rocket.

    /give @s minecraft:firework_rocket{Fireworks:{Flight:127b}}
  2. Active the elytra and shoot a firework rocket.

  3. Land on the ground and active the elytra again.
    → ❌ You are being boosted again

Code analysis

Code analysis by @unknown can be found in this comment

Linked issues

MC-119753 Firework boosting on elytra does not end when touching ground Resolved MC-166690 Flight duration "boost" of firework rocket continues even after landing with an elytra Resolved MC-170310 Firework Rocket boost works after touching ground and re-deploying elytra Resolved MC-204642 Firework flight duration boost works after landing Resolved MC-235500 Fireworks don't cancel when you exit and elytra Resolved

Attachments

Comments 5

Can confirm for MC 1.12.1.

This is only for fireworks that last long enough for players to not use another one. This find can be used to benefit custom maps that require a specific function in the game to make it unique. Plus, the firework itself will eventually end, making infinite flight unachievable.

The player can still activate this in survival mode with a duration 3 rocket.

 

Also, the bug is still active in 1.13-pre4

this bug is still active in 1.14.4

The following is based on yarn 1.15.1 names.

In the method net.minecraft.entity.FireworkEntity.tick the if-statement where it kills the firework does not check for if the player is not flying anymore. It only checks if the life of the firework is greater than the lifetime and kills it if true. To fix this, a check should be added for if the player is still elytra flying as so

if (!this.world.isClient && this.life > this.lifeTime || !this.shooter.isFallFlying()) {
            ...
        }

This kills the entity if life is greater than lifetime OR if the shooter isn't flying the elytra. Hope this helps fixing the issue!😃

fmease

(Unassigned)

Confirmed

(Unassigned)

elytra, fireworks

Minecraft 16w50a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13a, Minecraft 17w15a, ..., Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 1, 1.14.4, 1.15.1

Retrieved