Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-275450

Player Motion data no longer updates while riding another entity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w36a
    • 24w33a
    • None
    • Community Consensus
    • Creative
    • Commands, Entities
    • Important
    • Platform

      For the past few years, when the player rode an entity, their Motion NBT data would change depending on their WASD inputs. So if they pressed W (or whatever their forward key is), their Motion vector would point in the direction they're facing. If they pressed S, their Motion vector would point behind them. By comparing their motion vector with their rotation, we were able to detect WASD inputs using commands. 

      This has stopped working in snapshot 24w33a. In this snapshot, player motion NBT never updates based on their WASD inputs. This breaks a few years worth of existing projects.

      Steps to reproduce (both versions):

      1. Create a repeating command block with the command /tellraw @a {"nbt":"Motion","entity":"@p"}
      2. /summon minecraft:item_display ~ ~ ~ {Tags:[test]}
      3. /ride @s mount @n[tag=test]

      In 1.21.1, as you press different combinations of WASD, the command block will output different values in the Motion vector. In 24w33a, the printed Motion vector will never update. For me, I'm getting a consistent [0.0d,-0.0784000015258789d,0.0d]. This was not in any changelogs, and it seems like everyone who tries to reproduce it succeeds.

            HugoHagglund [Mojang] SHugoh
            howzieky Howzieky
            Votes:
            28 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: