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

Dismounted rearing horse continues rearing until client receives a SPacketEntityMetadata packet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.10.2, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.13.1
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When you dismount a horse that is rearing, the horse keeps rearing until the client receives the next SPacketEntityMetadata packet.

      How to reproduce

      While riding a horse press the key assigned to JUMP for a very short moment and dismount the horse right after that
      → The horse keeps rearing for a while

      The reason

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                3 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: