mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-23 00:49:23 +00:00
44 lines
2.3 KiB
Diff
44 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Tue, 4 Jul 2023 14:03:03 +0800
|
|
Subject: [PATCH] Fix Paper#9372
|
|
|
|
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index 7cd939bd90cf047e7bd4f894906c2af4198534d2..cd68b7b969a7b06181a7c2d92ed6a1a2a3897f3a 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1259,6 +1259,7 @@ public class ServerPlayer extends Player {
|
|
this.setServerLevel(worldserver);
|
|
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
|
this.connection.resetPosition();
|
|
+ if (top.leavesmc.leaves.LeavesConfig.fixPaper9372) this.mainSupportingBlockPos = Optional.empty(); // Leaves - fix paper 9372
|
|
worldserver.addDuringPortalTeleport(this);
|
|
worldserver1.getProfiler().pop();
|
|
this.triggerDimensionChangeTriggers(worldserver1);
|
|
@@ -1975,6 +1976,7 @@ public class ServerPlayer extends Player {
|
|
public void moveTo(double x, double y, double z) {
|
|
super.moveTo(x, y, z);
|
|
this.connection.resetPosition();
|
|
+ if (top.leavesmc.leaves.LeavesConfig.fixPaper9372) this.mainSupportingBlockPos = Optional.empty(); // Leaves - fix paper 9372
|
|
}
|
|
|
|
@Override
|
|
@@ -2214,6 +2216,7 @@ public class ServerPlayer extends Player {
|
|
|
|
this.connection.send(new ClientboundSetCameraPacket(this.camera));
|
|
this.connection.resetPosition();
|
|
+ if (top.leavesmc.leaves.LeavesConfig.fixPaper9372) this.mainSupportingBlockPos = Optional.empty(); // Leaves - fix paper 9372
|
|
}
|
|
}
|
|
|
|
@@ -2652,6 +2655,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();
|
|
+ if (top.leavesmc.leaves.LeavesConfig.fixPaper9372) this.mainSupportingBlockPos = Optional.empty(); // Leaves - fix paper 9372
|
|
}
|
|
|
|
@Override
|