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

Wrong player.getLocation() when player is in a boat, a pig, a horse, etc. Correct-return exception is player in a minecart.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • 3460-Spigot-ffceeae-9ed7e4f (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
    • Yes

      Player#getLocation() returns a wrong location where Location#getY() is always the ground level when the player is riding a pig, a horse, a boat, etc.

      The player's NBT Pos data shows the correct position the player should be in, and there can observe a vibration of NBT Pos Y flipping from the true value and the wrong value from the spigot.

       

      Example: a player riding on a boat on ground level 68.0;

      getLocation().getY() print:

      Player NBT Pos data flips:

       

      Example: a player riding on a horse on ground level 64.0;

      getLocation().getY() print:

      Player NBT Pos data flips:

       

       

      There is an exception that it returns the right value when the player is riding on a minecart:

       

      In the vanilla game without a spigot, there is no NBT data fluctuation, as shown below:

            Unassigned Unassigned
            Tarcadia XU KE
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: