mojira.dev
MC-122814

'/data get' does not properly return player motion

The bug

Storing a player's movement in any format does not work as intended, with Y values negative when on the ground and positive when jumping, but not changing when flying. X and Z values only change when sprint jumping around.

Recreate first running:

Impulse

scoreboard objectives add move dummy
scoreboard objectives setdisplay sidebar move

then setting up:

Repeating

execute store result score x move run data get entity @p Motion[0] 1000
execute store result score y move run data get entity @p Motion[1] 1000
execute store result score z move run data get entity @p Motion[2] 1000

Linked issues

Comments 5

The server actually doesn't have this information if you dare to believe that :/

Motion for player is force that player is moved with. Force of gravity (- value on ground), of blast, of jump, waterstream, slide etc. Motion of player movement caused by controlling character is not stored in game.

@Grum isn't that a problem in itself? I mean it's probably easier to write something like an anticheat if you have that info. Also it's just very helpful for mapmaking etc. o.O

Just calculate the motion using scoreboards as the difference of the position now and the position a short time ago. 

Aidan Patterson

Nathan Adams

Confirmed

/execute-store

Minecraft 17w47b, Minecraft 17w48a

Retrieved