Skip to content

Commit

Permalink
Attempt fixing PaperMC/Paper#9372
Browse files Browse the repository at this point in the history
  • Loading branch information
kev626 committed Jun 22, 2023
1 parent 2a6b66a commit a1ed6f7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions patches/server/0045-Fix-Paper-9372.patch
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

0 comments on commit a1ed6f7

Please sign in to comment.