Upstream update

This commit is contained in:
Bjarne Koll 2024-10-24 19:29:35 +02:00
parent fc05430719
commit 9047541397
No known key found for this signature in database
GPG key ID: 27F6CCCF55D2EE62
174 changed files with 468 additions and 468 deletions

View file

@ -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 5d261106b0cd12e9ed737833b1f6d2572d15ab4e..618c620b4bca535c454691f9a87c9b36a36021e2 100644
index eb81cd8421aa2fc011e5cb38e8a52b55fc1938b7..3b5beeb1599700fcc92f741613f84d6141078626 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1263,8 +1263,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1271,8 +1271,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 5d261106b0cd12e9ed737833b1f6d2572d15ab4e..618c620b4bca535c454691f9a87c9b36
if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
@@ -1331,8 +1331,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1339,8 +1339,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 5d261106b0cd12e9ed737833b1f6d2572d15ab4e..618c620b4bca535c454691f9a87c9b36
}
// Paper end - Prevent moving into unloaded chunks
@@ -1341,9 +1347,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1349,9 +1355,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2))) {
// CraftBukkit end
@ -56,7 +56,7 @@ index 5d261106b0cd12e9ed737833b1f6d2572d15ab4e..618c620b4bca535c454691f9a87c9b36
}
}
}
@@ -1405,14 +1418,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1413,14 +1426,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
d8 = d2 - this.player.getZ();
d10 = d6 * d6 + d7 * d7 + d8 * d8;
@ -91,7 +91,7 @@ index 5d261106b0cd12e9ed737833b1f6d2572d15ab4e..618c620b4bca535c454691f9a87c9b36
this.internalTeleport(d3, d4, d5, f, f1); // 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 {
@@ -3529,4 +3559,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3537,4 +3567,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
}