Affects Version/s: 1.16.3, 1.16.4 Pre-release 1
Fix Version/s: 1.16.4 Pre-release 2
Mojang Priority:Very Important
Summoning any living entity on the wings of the ender dragon (same position as the middle of the wing) will give the entity infinite velocity and crash the server. This is due to a divide by zero case with the wings and a living entity.
- Create a new world
- Go to the end
- Give yourself a command block and set it to repeat
- Enter this command in the command block and power the block:
- Summon armor stands on the dragon:
→ The server crashing after a minute or two
Using 1.16.3 yarn mappings.
We will be looking at the EnderDragonEntity code today.
Let’s go to:
Inside this function there is the launchLivingEntities function. Let’s explore this.
This function takes in the entities around the dragon wing (will later be limited to Living Entities )
From this function call, it takes the wing and finds the middle of it. For the next part, let's say we have an entity at the same location as the middle of the wing and it is a living entity. As the x and z are the same, f and g will be zero. As f and g are zero, h will be zero. Now, as h is zero, the lv.addVelocity will make the x and z velocity infinite as in java a float divide by zero will make a value infinity.