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

Cross-world entity teleportation is limited to block positions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • OS: Windows 10

    • git-Paper-41 (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: a22eb67)
    • Yes

      When teleporting a CraftEntity across dimensions, it seems that BlockPosition is used for the destination, which overwrites any intent to teleport precisely.

       

      Even if i intend to teleport my entity to (x + 0.5, y + 0.5, z + 0.5), with x, y, and z integers, it will round down (floor function) to (x, y, z). This can sometimes cause the entity to suffocate if there are walls around that corner of the destination block.

       

      This only happens for cross-world teleportation.

       

      Attachment explanation

      I'm working on a custom portal plugin.

      For any entity, I perform **

      Entity.teleport()

      Notice how the player (me) teleports correctly.

      The pig, despite being teleported with the same method, to the same location, gets teleported in the corner, for the coordinates have been rounded down.

            Doc Doc
            Deathcofi Rares Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: