mojira.dev
MC-111480

Firework boosting doesn't work in the first world loaded after a game start / if player has entity id 0

The bug

You cannot use fireworks to boost while you fly with an elytra if your entity id is 0, which is typically right after you started the game.

How to reproduce

  1. Start the game

  2. Open a world with no other entities

  3. Start flying with an elytra and try to use fireworks to boost
    → The fireworks are used but fly straight in the air even if you are not right clicking a block

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The data parameter net.minecraft.entity.item.EntityFireworkRocket.field_191512_b stores the entity id of the entity being boosted. The problem is that it treats 0 as not set, but stores the entity id without adding 1. Therefor a player with entity id 0 will not be boosted.

Linked issues

MC-111512 Can still place fireworks while flying with the elytra Resolved MC-111563 Firework boosting doesn't work in superflat worlds Resolved MC-111780 Rocket Elytra Wont work. Resolved MC-111824 Elyta Boosting Broken Resolved MC-112113 fireworks are not working Resolved

Comments 21

so annoying.. I really wanted to try the new feature but it wouldn't work..
Windows 10 Home
Intel Core i7

I have the same issue but only on old worlds. Maybe it is by design, because they removed the Mending/ Infinity combo?

[Mod] redstonehelper

This bug doesn't require old worlds for me.

Video: https://youtu.be/0Tpta3dRZv4
A reload of the world fix this.

Still in 1.11.2 🙂

11 more comments

Still in 17w45b.

Affects 18w01a.

Affects 18w10d

Affects 1.13

0x5e3371ebe11e

This bug does not only affect the first player that enters the game. After about two weeks of running a busy server, the entity IDs will overflow, which results in no player being able to use fireworks. Negative entity IDs are also ignored by this function (from 1.12.1 decompiled with MCP):

public boolean isAttachedToEntity() {
      return ((Integer)this.dataManager.get(BOOSTED_ENTITY_ID)).intValue() > 0;
   }

[Mod] redstonehelper

coschevi

Confirmed

boost, elytra, fireworks, fireworks_rocket

Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12 Pre-Release 3, ..., Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b

Minecraft 18w49a

Retrieved