mojira.dev
MCPE-166075

Player velocity is sometimes incorrectly read as '0'

To preface:

  • There are several different equations used for y velocity downward acceleration

  • When a player begins to fall, one of these is selected at random

  • One of these equations incorrectly sends info indicating that the player has a velocity of '0.'

While the idea that there are several randomly selected downward acceleration functions being used whenever a player falls, and them being chosen at random, is strange, that is not the purpsoe of this bug report.

The attached mcpack will display a players velocity into chat every tick. If a player touches the ground, it will additionally ouput "PLAYER ON GROUND" in red for ease of visibility.

Note that this error only occurs within the first few seconds when acceleration has begun, and will not occur additional times in the same fall.

To reproduce this error is quite simple. Teleporting a player high enough to be able to free fall for a few seconds is enough.

/tp @s ~ ~30 ~

I am unable to replicate the exact scenario every time because of the random changes in the equation that I stated previously.

The following screenshot is the only sequence of player.velocity.y values where this error will occur.

[media]

For those unable to view the pack contents, it utilizes an animation controller running on the player. This controller runs the /scriptevent command every tick, which then outputs the player.velocity.y value into chat.

Attachments

Comments 3

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

The attached MCPack does not appear to be functional and cannot be imported. Are you certain it has been set up correctly?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki

Repaired the mcpack file

Is this still an issue? The attached pack is not working for me in 1.20.62 Hotfix. It first gives an error about the API version being invalid, because the pack is set to 1.1.0-beta, which is outdated. After I change it to 1.1.0 or 1.8.0 (latest non-beta version) it gives the following content log error:

[Scripting][error]-Plugin [Player.velocity.y Bug Example - 0.0.1] - [main.js] ran with error: [TypeError: cannot read property 'scriptEventReceive' of undefined at <anonymous> (main.js:3)
]

Estrongel

(Unassigned)

Unconfirmed

Windows

Windows 11

Script-API

1.19.70.22 Preview, 1.19.70.21 Preview, 1.19.60.26 Preview, 1.19.51

Retrieved