Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3510

Velocity broken for Boats, Pigs with saddles and Horses when riding them.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None

      Velocities using Entity#getVelocity() and Entity#setVelocity() are broken when you are riding entities of the following types:

      • Boats
      • Horses
      • Saddled pigs, but only if you are controlling them using a Carrot on a Stick.

      I tried both getting and setting velocities on the player and vehicle, and neither seemed to work entirely correctly. Entity#getVelocity() on the vehicle just returned an empty vector no matter what I tried, and Entity#setVelocity() did not have an effect either.

      When trying Entity#getVelocity() on the riding player, I got the correct results, but only when the movement was caused by the player. Natural movement did not seem to have an effect. (IE, the only movement I could read was if I was using the WASD keys to control the horse, pushing the horse using water streams or anything of the like did not seem to produce an effect as long as I was riding). Entity#setVelocity() on the player while riding appears to do nothing at all.

      Do note that this behaviour isĀ only when players are riding the vehicles. As soon as I jump off (or in the case of the pig, remove the Carrot on a Stick), everything works as expected, at least as far as I can see.

            Unassigned Unassigned
            AlvinB Alvin Larsson Bringholm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: