2022-09-24 07:45:13 +02: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.
|
|
|
|
|
2023-06-08 20:10:23 +02:00
|
|
|
Fixed in 1.19.4 (notice how addDuringPortalTeleport is now called AFTER movement is done now)
|
2023-06-08 10:47:19 +02:00
|
|
|
|
2022-09-24 07:45:13 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2023-05-12 13:10:08 +02:00
|
|
|
index b30972c3ab19795e26589cd0cdd54c43414fe368..c5dc769d13fbc2a88a731d42669d0906ee306e4b 100644
|
2022-09-24 07:45:13 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2023-05-12 13:10:08 +02:00
|
|
|
@@ -1176,6 +1176,7 @@ public class ServerPlayer extends Player {
|
2022-09-24 07:45:13 +02:00
|
|
|
|
|
|
|
// 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
|
2022-12-07 23:05:32 +01:00
|
|
|
this.connection.resetPosition();
|
|
|
|
worldserver.addDuringPortalTeleport(this);
|