mojira.dev
MC-273910

Player's gravity is calculated twice on the tick they activate their elytra, causing lower jump height

The player's gravity is calculated twice on the tick they activate their elytra, causing jump height lower. This happens since 15w41a.

Steps to reproduce:

  1. Equip an elytra and switch to survival mode.

  2. Run /tick rate 1 (this happens on normal tick rate, but on low tick rates it can be seen clearly).

  3. Open the F3 debug screen, face directly down, jump and activate your elytra 2 ticks after you jump (your height should be 0.7532 blocks above ground 2 ticks after you jump).

  4. Observe your maximum height.

  5. After you land, jump again, don't activate your elytra.

  6. Observe your maximum height.

Expected result:
Maximum height in step 4 and step 6 are same. (when you face directly down, the elytra won't reduce your gravity and you should be free falling)

Actual result:
Maximum height in step 4 and step 6 are different. In step 4, the height is 1.00407 blocks. In step 6, the height is 1.25220 blocks.

Analysis:
On the first tick you activate your elytra, your gravity is calculated twice, cause your upward speed to be lower than normal (it has lowered from 0.3332b/t to 0.16477b/t, and normally it is from 0.3332 b/t to 0.24814b/t, so your jump height is lower).

Attachments

Comments 5

(0.3332-0.08)*0.98~0.24814

(0.24814-0.08)*0.98~0.16477

So it really calculates gravity and drag twice.

What is the gameplay impact of this issue? Please provide more info regarding this.

Normally player's jump height is 1.25 blocks. But if your pitch angle is greater than 45°, this will cause your jump height lower. 

And at 80° pitch, it might not allow you jump onto 1 block and stuck until jump again(Sometimes players may accidentally tapped space after auto jumping, and it may cause this)

COMETC2021A1

(Unassigned)

Community Consensus

Platform

Low

Player

elytra, gravity, movement, player

1.21, 1.21.1, 24w33a, 24w34a, 24w36a, ..., 1.21.5, 25w16a, 1.21.8, 25w33a, 25w34b

Retrieved