mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
6a7fef0e4a
* Allow entity effect modification off the main thread for worldgen * squash all async catcher patches
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
|
Date: Sat, 6 Aug 2022 18:10:14 -0400
|
|
Subject: [PATCH] Set position before player sending on dimension change
|
|
|
|
This causes a moment where the player entity is sent with the previous location, and the
|
|
teleport packet which is sent shortly after is meant to correct that.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index ad63ba47e8d48daa80e00ca3bc26d68672cef3b3..cf80b3cc36919b1ab448d472089b98c4edc9fe4d 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1174,6 +1174,7 @@ public class ServerPlayer extends Player {
|
|
|
|
// CraftBukkit end
|
|
this.setLevel(worldserver);
|
|
+ this.moveTo(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch()); // Paper - Set the location before
|
|
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
|
this.connection.resetPosition();
|
|
worldserver.addDuringPortalTeleport(this);
|