aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch')
-rw-r--r--patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch20
1 files changed, 10 insertions, 10 deletions
diff --git a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch
index 3a3b5f4d79..2f406412e9 100644
--- a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch
+++ b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1861708d7 100644
+index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95e29be9a8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -658,7 +658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -661,7 +661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}
@@ -18,7 +18,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above
d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above
-@@ -666,6 +666,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -669,6 +669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag1 = entity.verticalCollisionBelow;
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
@@ -26,7 +26,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
double d11 = d7;
d6 = d3 - entity.getX();
-@@ -679,16 +680,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -682,16 +683,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag2 = false;
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
@@ -54,7 +54,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
entity.absMoveTo(d0, d1, d2, f, f1);
this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
this.connection.send(new ClientboundMoveVehiclePacket(entity));
-@@ -774,7 +783,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -777,7 +786,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
private boolean noBlocksAround(Entity entity) {
@@ -88,7 +88,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
}
@Override
-@@ -1354,7 +1388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -1357,7 +1391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (this.awaitingPositionFromClient != null) {
@@ -97,7 +97,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
this.awaitingTeleportTime = this.tickCount;
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
}
-@@ -1448,7 +1482,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -1451,7 +1485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
@@ -106,7 +106,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above
d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above
-@@ -1489,6 +1523,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -1492,6 +1526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag1 = this.player.verticalCollisionBelow;
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
@@ -114,7 +114,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
// Paper start - prevent position desync
if (this.awaitingPositionFromClient != null) {
-@@ -1508,12 +1543,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -1511,12 +1546,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
boolean flag2 = false;
if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
@@ -140,7 +140,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // 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.
} else {
// CraftBukkit start - fire PlayerMoveEvent
-@@ -1599,6 +1645,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
+@@ -1602,6 +1648,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}