2022-09-24 05:45:13 +00:00
|
|
|
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
|
2022-11-10 00:05:46 +00:00
|
|
|
index 20f29f0570ceb077dbd92f19b27f36f2fdc925ed..21caac15a397bcbd5a170d71ace21dabd53f6694 100644
|
2022-09-24 05:45:13 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-09-26 08:02:51 +00:00
|
|
|
@@ -1141,6 +1141,7 @@ public class ServerPlayer extends Player {
|
2022-09-24 05:45:13 +00:00
|
|
|
|
|
|
|
// CraftBukkit end
|
|
|
|
this.setLevel(worldserver);
|
|
|
|
+ this.moveTo(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch()); // Paper - Set the location before
|
|
|
|
worldserver.addDuringPortalTeleport(this);
|
|
|
|
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
|
|
|
this.connection.resetPosition(); // CraftBukkit - sync position after changing it (from PortalTravelAgent#findAndteleport)
|