-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Kevin Raneri <kevin.raneri@gmail.com> | ||
Date: Thu, 22 Jun 2023 03:49:56 -0400 | ||
Subject: [PATCH] Fix Paper 9372 | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java | ||
index 9d46536f80b5b3e6641fd377c02166a431edfd77..0a4b9921d00c76f8893c53a0bfe7bdf6055bf803 100644 | ||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java | ||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java | ||
@@ -1245,6 +1245,7 @@ public class ServerPlayer extends Player { | ||
this.setServerLevel(worldserver); | ||
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event | ||
this.connection.resetPosition(); | ||
+ this.mainSupportingBlockPos = Optional.empty(); // Pufferfish - Fix paper 9372 | ||
worldserver.addDuringPortalTeleport(this); | ||
worldserver1.getProfiler().pop(); | ||
this.triggerDimensionChangeTriggers(worldserver1); | ||
@@ -1907,6 +1908,7 @@ public class ServerPlayer extends Player { | ||
public void moveTo(double x, double y, double z) { | ||
super.moveTo(x, y, z); | ||
this.connection.resetPosition(); | ||
+ this.mainSupportingBlockPos = Optional.empty(); // Pufferfish - Fix paper 9372 | ||
} | ||
|
||
@Override | ||
@@ -2143,6 +2145,7 @@ public class ServerPlayer extends Player { | ||
|
||
this.connection.send(new ClientboundSetCameraPacket(this.camera)); | ||
this.connection.resetPosition(); | ||
+ this.mainSupportingBlockPos = Optional.empty(); // Pufferfish - Fix paper 9372 | ||
} | ||
} | ||
|
||
@@ -2595,6 +2598,7 @@ public class ServerPlayer extends Player { | ||
public void forceSetPositionRotation(double x, double y, double z, float yaw, float pitch) { | ||
this.moveTo(x, y, z, yaw, pitch); | ||
this.connection.resetPosition(); | ||
+ this.mainSupportingBlockPos = Optional.empty(); // Pufferfish - Fix paper 9372 | ||
} | ||
|
||
@Override |