From 5c9fc7f289e80cb9859f9f9bf2d45f28f833606a Mon Sep 17 00:00:00 2001 From: "Sofiane H. Djerbi" <46628754+kugge@users.noreply.github.com> Date: Mon, 10 Jul 2023 05:19:22 +0300 Subject: [PATCH] This patch was useless --- ... => 0039-Skip-event-if-no-listeners.patch} | 0 .../0039-Toggle-Fix-large-move-vector.patch | 82 ------------------- ...c-if-we-cannot-move-entity-off-main.patch} | 0 ...> 0041-Add-back-worldborder-command.patch} | 0 ...patch => 0042-Add-back-data-command.patch} | 0 5 files changed, 82 deletions(-) rename patches/server/{0040-Skip-event-if-no-listeners.patch => 0039-Skip-event-if-no-listeners.patch} (100%) delete mode 100644 patches/server/0039-Toggle-Fix-large-move-vector.patch rename patches/server/{0041-Teleport-async-if-we-cannot-move-entity-off-main.patch => 0040-Teleport-async-if-we-cannot-move-entity-off-main.patch} (100%) rename patches/server/{0042-Add-back-worldborder-command.patch => 0041-Add-back-worldborder-command.patch} (100%) rename patches/server/{0043-Add-back-data-command.patch => 0042-Add-back-data-command.patch} (100%) diff --git a/patches/server/0040-Skip-event-if-no-listeners.patch b/patches/server/0039-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0040-Skip-event-if-no-listeners.patch rename to patches/server/0039-Skip-event-if-no-listeners.patch diff --git a/patches/server/0039-Toggle-Fix-large-move-vector.patch b/patches/server/0039-Toggle-Fix-large-move-vector.patch deleted file mode 100644 index d0a1f8e..0000000 --- a/patches/server/0039-Toggle-Fix-large-move-vector.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Sofiane H. Djerbi" <46628754+kugge@users.noreply.github.com> -Date: Sat, 8 Jul 2023 01:23:21 +0300 -Subject: [PATCH] Toggle Fix large move vector - - -diff --git a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java -index e2fb7d7a7b3126d386b46442c115085d1974ac4e..9e02bc343422b68cdaeb2e2e40b304e9c84e565c 100644 ---- a/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java -+++ b/src/main/java/dev/kaiijumc/kaiiju/KaiijuWorldConfig.java -@@ -169,6 +169,7 @@ public class KaiijuWorldConfig { - public boolean fixTripWireStateInconsistency = true; - public boolean safeTeleporting = true; - public boolean sandDuplication = false; -+ public boolean fixLargeMoveVector = true; - - private void gameplaySettings() { - fixVoidTrading = getBoolean("gameplay.fix-void-trading", fixVoidTrading); -@@ -176,5 +177,6 @@ public class KaiijuWorldConfig { - fixTripWireStateInconsistency = getBoolean("gameplay.fix-tripwire-state-inconsistency", fixTripWireStateInconsistency); - safeTeleporting = getBoolean("gameplay.safe-teleportation", safeTeleporting); - sandDuplication = getBoolean("gameplay.sand-duplication", sandDuplication); -+ fixLargeMoveVector = getBoolean("gameplay.fix-large-move-vector", fixLargeMoveVector); - } - } -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c261a6c566eb24ded856a8db57623dd77339d003..b97e2c786a16ebafc8f2b5ba62ca81cceea13034 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -632,11 +632,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - double d7 = d4 - this.vehicleFirstGoodY; - double d8 = d5 - this.vehicleFirstGoodZ; - double d9 = entity.getDeltaMovement().lengthSqr(); -+ // Kaiiju start - Toggle fix large move vector -+ double d10; -+ if (!this.player.level().kaiijuConfig.fixLargeMoveVector) d10 = d6 * d6 + d7 * d7 + d8 * d8; -+ else { -+ // Kaiiju end - // Paper start - fix large move vectors killing the server - double currDeltaX = toX - fromX; - double currDeltaY = toY - fromY; - double currDeltaZ = toZ - fromZ; -- double d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1); -+ d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1); // Kaiiju - Toggle fix large move vector - // Paper end - fix large move vectors killing the server - - // Paper start - fix large move vectors killing the server -@@ -645,7 +650,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - double otherFieldZ = d5 - this.vehicleLastGoodZ; - d10 = Math.max(d10, (otherFieldX * otherFieldX + otherFieldY * otherFieldY + otherFieldZ * otherFieldZ) - 1); - // Paper end - fix large move vectors killing the server -- -+ } // Kaiiju - Toggle fix large move vector - // CraftBukkit start - handle custom speeds and skipped ticks - int currTick = (int)(Util.getMillis() / 50); // Folia - region threading - this.allowedPlayerTicks += currTick - this.lastTick; // Folia - region threading -@@ -1467,11 +1472,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - double d7 = d1 - this.firstGoodY; - double d8 = d2 - this.firstGoodZ; - double d9 = this.player.getDeltaMovement().lengthSqr(); -+ // Kaiiju start - Toggle fix large move vector -+ double d10; -+ if (!this.player.level().kaiijuConfig.fixLargeMoveVector) d10 = d6 * d6 + d7 * d7 + d8 * d8; -+ else { -+ // Kaiiju end - // Paper start - fix large move vectors killing the server - double currDeltaX = toX - prevX; - double currDeltaY = toY - prevY; - double currDeltaZ = toZ - prevZ; -- double d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1); -+ d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1); // Kaiiju - Toggle fix large move vector - // Paper end - fix large move vectors killing the server - // Paper start - fix large move vectors killing the server - double otherFieldX = d0 - this.lastGoodX; -@@ -1479,6 +1489,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - double otherFieldZ = d2 - this.lastGoodZ; - d10 = Math.max(d10, (otherFieldX * otherFieldX + otherFieldY * otherFieldY + otherFieldZ * otherFieldZ) - 1); - // Paper end - fix large move vectors killing the server -+ } // Kaiiju - Toggle fix large move vector - - if (this.player.isSleeping()) { - if (d10 > 1.0D) { diff --git a/patches/server/0041-Teleport-async-if-we-cannot-move-entity-off-main.patch b/patches/server/0040-Teleport-async-if-we-cannot-move-entity-off-main.patch similarity index 100% rename from patches/server/0041-Teleport-async-if-we-cannot-move-entity-off-main.patch rename to patches/server/0040-Teleport-async-if-we-cannot-move-entity-off-main.patch diff --git a/patches/server/0042-Add-back-worldborder-command.patch b/patches/server/0041-Add-back-worldborder-command.patch similarity index 100% rename from patches/server/0042-Add-back-worldborder-command.patch rename to patches/server/0041-Add-back-worldborder-command.patch diff --git a/patches/server/0043-Add-back-data-command.patch b/patches/server/0042-Add-back-data-command.patch similarity index 100% rename from patches/server/0043-Add-back-data-command.patch rename to patches/server/0042-Add-back-data-command.patch