Paper/patches/server/0899-Set-position-before-player-sending-on-dimension-chan.patch
Nassim Jahnke 20503beee5
Remove guardian beam render issue workaround
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
2022-12-15 14:19:09 +01:00

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 e235037de74c9d0a3ba136902a599b06d24a134d..95841722fd6a87f0bdea650f44535a717bb7f867 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1163,6 +1163,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);