aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0847-Implement-PlayerFailMoveEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0847-Implement-PlayerFailMoveEvent.patch')
-rw-r--r--patches/server/0847-Implement-PlayerFailMoveEvent.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0847-Implement-PlayerFailMoveEvent.patch b/patches/server/0847-Implement-PlayerFailMoveEvent.patch
index 1a73a0110a..1bed027fcc 100644
--- a/patches/server/0847-Implement-PlayerFailMoveEvent.patch
+++ b/patches/server/0847-Implement-PlayerFailMoveEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bdeebce464e 100644
+index 8130db188a7014cff572743b06ca14806bbacdc2..a8d6d032605d2da10c84c71fca67998705ff27ff 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1259,8 +1259,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1260,8 +1260,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
@@ -19,7 +19,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
-@@ -1327,8 +1327,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1328,8 +1328,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Paper start - Prevent moving into unloaded chunks
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
@@ -36,7 +36,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
}
// Paper end - Prevent moving into unloaded chunks
-@@ -1337,9 +1343,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1338,9 +1344,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end
@@ -56,7 +56,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
}
}
}
-@@ -1401,14 +1414,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1402,14 +1415,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
d8 = d2 - this.player.getZ();
d10 = d6 * d6 + d7 * d7 + d8 * d8;
@@ -91,7 +91,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
} else {
-@@ -3465,4 +3495,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3466,4 +3496,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
}