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
- Start the game
- Open a world with no other entities
- 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.
2016-12-16, 07:13 PM
2020-04-27, 09:54 PM
2018-12-04, 09:09 AM
55
28
boost, elytra, fireworks, fireworks_rocket
Minecraft 16w50a - Minecraft 18w48b
Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12 Pre-Release 3, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45b, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w15a, Minecraft 18w16a, Minecraft 18w20a, Minecraft 18w21a, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b