Mojira Archive
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.