Skip to content

Use previous ender pearl position for teleport destinations - #529

Open
strobil wants to merge 1 commit into
PaperMC:ver/26.3.xfrom
strobil:fix/pearl-previous-position-26.3
Open

strobil wants to merge 1 commit into
PaperMC:ver/26.3.xfrom
strobil:fix/pearl-previous-position-26.3

Conversation

@strobil

@strobil strobil commented Oct 19, 2026

Copy link
Copy Markdown

Folia passes this.position() to attemptTeleport when an ender pearl hits, while Paper uses this.oldPosition(). At a wall impact, the current position can lie on the collision surface and place the player's bounding box partly inside the wall.

Use oldPosition() to match Paper's destination selection. The asynchronous teleport flow is unchanged.

Testing

Twelve identical server-side pearl launches toward a barrier wall:

Server Trials Player bounding box overlaps wall
Folia 26.3 build 3 12 12
Paper 26.3 build 206 12 3
Patched Folia 12 3

All 12 patched destination coordinates matched Paper within 1e-7. createPaperclipJar passed with Java 25.0.4.1.

Test harness, reproduction instructions and original JSON results.

The remaining overlaps also occur on Paper. These tests measure landing positions and overlap, not actual wall traversal; this is not a complete wall-phasing fix.

@Dueris Dueris left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hell yeah, nice catch man

R00tB33rMan added a commit to MagnoliaLLC/Canvas that referenced this pull request Oct 19, 2026
Folia teleports the owner of a landed ender pearl to the pearl's current position, where vanilla and Paper use its position before the move that hit: at a wall the current position can lie on the hit surface and put the player's bounding box partly inside the wall. From PaperMC/Folia#529 by strobil.
Dueris added a commit to CraftCanvasMC/Canvas that referenced this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants