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

Horse temporarily stuck in jump animation if dismounted


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Minecraft 1.13
    • Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w39b, Minecraft 16w39c, Minecraft 16w41a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w48a, Minecraft 17w49a, Minecraft 17w49b, Minecraft 18w10d, Minecraft 18w16a, Minecraft 1.13.1, Minecraft 1.14.2, 1.14.4, 19w37a, 1.15.2, 20w10a, 1.16 Pre-release 6, 1.16.2, 1.16.4, 20w48a, 21w03a, 21w05b, 1.17.1, 1.19.2
    • Confirmed
    • Mob behaviour
    • Low
    • Gameplay

      The bug

      If you dismount a horse in mid jump, the horse will continue to do the jump animation even after landing on the ground for around 10 seconds. The horse will even start to walk away stuck in the animation until it ends.

      How to reproduce

      1. Tame a horse and put a saddle on it
      2. Start riding it
      3. Hold the jump key (space)
      4. Release the jump key and at the same time press the dismount key (shift)
        The horse remains in the jump animation

      The reason (by MC-104523)

      The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

      I assume that the reason for this is that rearing is only done client side. The method net.minecraft.entity.passive.EntityHorse.onUpdate() contains a part that causes the horse to stop rearing. The following conditions are used. Keep in mind that they are all required and in Java if one condition fails all following conditions are not tested.

      1. If controlling passenger is a player:
        1. True condition: Player is client player
        2. False condition: Code is run by server
      2. Horse is rearing for more than 0 ticks
      3. Add one to horse rearing time, new value has to be greater than 20

      If all these conditions are met the rearing value is set to false. This means that as soon as the player dismounts the horse, the rearing time stops incrementing.

      When the client receives a SPacketEntityMetadata packet, the rearing state updates, because the value if the horse is rearing or not is stored with other states in the data watcher as one value (single bits of the value representing the value of the states) and rearing is only client side.

      Removing the condition that the controlling passenger has to be a player would probably fix this bug.

            Unassigned Unassigned
            goody2shoos goody2shoos
            20 Vote for this issue
            10 Start watching this issue