From 68ee80c8da85ed8a7b1b29597349a29e9b57c156 Mon Sep 17 00:00:00 2001 From: moom0o <48740106+moom0o@users.noreply.github.com> Date: Fri, 16 Oct 2020 17:59:42 -0400 Subject: [PATCH] Add files via upload --- .../0401-Test-Patch-Entityspeed.patch | 35 ++++++ Spigot-Server-Patches/0402-Test.patch | 34 +++++ Spigot-Server-Patches/0403-Test.patch | 21 ++++ Spigot-Server-Patches/0404-anothertest.patch | 24 ++++ Spigot-Server-Patches/0405-aNoThErtESt.patch | 21 ++++ .../0406-Hopefully-the-final-patch.patch | 116 ++++++++++++++++++ Spigot-Server-Patches/0407-aNoTher.patch | 22 ++++ .../0408-Update-Config.patch | 25 ++++ 8 files changed, 298 insertions(+) create mode 100644 Spigot-Server-Patches/0401-Test-Patch-Entityspeed.patch create mode 100644 Spigot-Server-Patches/0402-Test.patch create mode 100644 Spigot-Server-Patches/0403-Test.patch create mode 100644 Spigot-Server-Patches/0404-anothertest.patch create mode 100644 Spigot-Server-Patches/0405-aNoThErtESt.patch create mode 100644 Spigot-Server-Patches/0406-Hopefully-the-final-patch.patch create mode 100644 Spigot-Server-Patches/0407-aNoTher.patch create mode 100644 Spigot-Server-Patches/0408-Update-Config.patch diff --git a/Spigot-Server-Patches/0401-Test-Patch-Entityspeed.patch b/Spigot-Server-Patches/0401-Test-Patch-Entityspeed.patch new file mode 100644 index 000000000000..bb02fe5363b5 --- /dev/null +++ b/Spigot-Server-Patches/0401-Test-Patch-Entityspeed.patch @@ -0,0 +1,35 @@ +From e1e75e659a24d8440d1bf66b3ef75b2325efad8e Mon Sep 17 00:00:00 2001 +From: moo +Date: Sun, 13 Sep 2020 22:48:41 -0400 +Subject: [PATCH] Test-Patch-Entityspeed + + +diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +index 4701c3173..0a638ea5e 100644 +--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java ++++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +@@ -184,4 +184,8 @@ public class ccSpigotConfig { + private static void ChunkRelocation() { + DisableChunkRelocation = getBoolean("experimental.disable-chunk-relocation", DisableChunkRelocation); + } ++ public static Double MaxEntitySpeed = 1.0D; ++ private static void EntitySpeed() { ++ MaxEntitySpeed = getDouble("settings.light-update-max-time", MaxEntitySpeed); ++ } + } +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 59d526329..da969aa2b 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -350,7 +350,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + } + // Paper end + +- if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot ++ if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot + // CraftBukkit end + PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); + this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0402-Test.patch b/Spigot-Server-Patches/0402-Test.patch new file mode 100644 index 000000000000..4305e2c8cb6f --- /dev/null +++ b/Spigot-Server-Patches/0402-Test.patch @@ -0,0 +1,34 @@ +From 844da9011770a352dc47503deb47f44dfb929afe Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 00:12:09 -0400 +Subject: [PATCH] Test + + +diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +index 0a638ea5e..eb12da30d 100644 +--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java ++++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +@@ -186,6 +186,6 @@ public class ccSpigotConfig { + } + public static Double MaxEntitySpeed = 1.0D; + private static void EntitySpeed() { +- MaxEntitySpeed = getDouble("settings.light-update-max-time", MaxEntitySpeed); ++ MaxEntitySpeed = getDouble("settings.max-entity-speed", MaxEntitySpeed); + } + } +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index da969aa2b..2f12f885d 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -349,7 +349,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + return; + } + // Paper end +- ++ PlayerConnection.LOGGER.warn(Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName())).toString()) + if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot + // CraftBukkit end + PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0403-Test.patch b/Spigot-Server-Patches/0403-Test.patch new file mode 100644 index 000000000000..15c98f5a3cd1 --- /dev/null +++ b/Spigot-Server-Patches/0403-Test.patch @@ -0,0 +1,21 @@ +From 2071d4d3e7a483122c82354a74cf9feec41f98dd Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 00:24:43 -0400 +Subject: [PATCH] Test + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 2f12f885d..e563c49f0 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -349,6 +349,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + return; + } + // Paper end ++ PlayerConnection.LOGGER.warn((d10 - d9).toString()) + PlayerConnection.LOGGER.warn(Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName())).toString()) + if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot + // CraftBukkit end +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0404-anothertest.patch b/Spigot-Server-Patches/0404-anothertest.patch new file mode 100644 index 000000000000..c5aeec37f18a --- /dev/null +++ b/Spigot-Server-Patches/0404-anothertest.patch @@ -0,0 +1,24 @@ +From ba28a030f76cceabd6f53084c30ea6ff5d8aca13 Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 00:57:28 -0400 +Subject: [PATCH] anothertest + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index e563c49f0..6334f2a29 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -349,8 +349,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + return; + } + // Paper end +- PlayerConnection.LOGGER.warn((d10 - d9).toString()) +- PlayerConnection.LOGGER.warn(Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName())).toString()) ++ PlayerConnection.LOGGER.warn((d10 - d9)); ++ PlayerConnection.LOGGER.warn(Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName())).toString()); + if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot + // CraftBukkit end + PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0405-aNoThErtESt.patch b/Spigot-Server-Patches/0405-aNoThErtESt.patch new file mode 100644 index 000000000000..ab7bef94eb83 --- /dev/null +++ b/Spigot-Server-Patches/0405-aNoThErtESt.patch @@ -0,0 +1,21 @@ +From 230b54bdaa4214706dd90e312e69496dc8e043fa Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 01:19:59 -0400 +Subject: [PATCH] aNoThErtESt + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 6334f2a29..d637223fd 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -350,7 +350,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + } + // Paper end + PlayerConnection.LOGGER.warn((d10 - d9)); +- PlayerConnection.LOGGER.warn(Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName())).toString()); + if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot + // CraftBukkit end + PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0406-Hopefully-the-final-patch.patch b/Spigot-Server-Patches/0406-Hopefully-the-final-patch.patch new file mode 100644 index 000000000000..bcae30eff3a3 --- /dev/null +++ b/Spigot-Server-Patches/0406-Hopefully-the-final-patch.patch @@ -0,0 +1,116 @@ +From 79404b5d30148392727e8c88ede09b00621842b1 Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 02:02:11 -0400 +Subject: [PATCH] Hopefully-the-final-patch + + +diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +index eb12da30d..6136334a3 100644 +--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java ++++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +@@ -184,7 +184,23 @@ public class ccSpigotConfig { + private static void ChunkRelocation() { + DisableChunkRelocation = getBoolean("experimental.disable-chunk-relocation", DisableChunkRelocation); + } +- public static Double MaxEntitySpeed = 1.0D; ++ ++ public static boolean LimitEntitySpeed = true; ++ private static void EntitySpeedLimit() { ++ LimitEntitySpeed = getBoolean("settings.limit-entity-speed", LimitEntitySpeed); ++ } ++ ++ public static boolean DebugEntitySpeed = true; ++ private static void EntitySpeedDebug() { ++ DebugEntitySpeed = getBoolean("debug.debug-entity-speed", DebugEntitySpeed); ++ } ++ ++ public static boolean RemoveConsoleSpam = true; ++ private static void ConsoleSpam() { ++ RemoveConsoleSpam = getBoolean("debug.remove-console-spam", RemoveConsoleSpam); ++ } ++ ++ public static Double MaxEntitySpeed = 4.0D; + private static void EntitySpeed() { + MaxEntitySpeed = getDouble("settings.max-entity-speed", MaxEntitySpeed); + } +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index d637223fd..6a66c098a 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import com.destroystokyo.paper.ccSpigotConfig; + import com.google.common.collect.Lists; + import com.google.common.primitives.Doubles; + import com.google.common.primitives.Floats; +@@ -349,12 +350,27 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + return; + } + // Paper end +- PlayerConnection.LOGGER.warn((d10 - d9)); +- if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot +- // CraftBukkit end +- PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); +- this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); +- return; ++ if(ccSpigotConfig.LimitEntitySpeed){ ++ if(d10 - d9 > ccSpigotConfig.MaxEntitySpeed){ ++ if(!ccSpigotConfig.RemoveConsoleSpam){ ++ PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); ++ } ++ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); ++ return; ++ } ++ if(ccSpigotConfig.DebugEntitySpeed){ ++ PlayerConnection.LOGGER.warn((d10 - d9)); ++ } ++ ++ } else { ++ if (d10 - d9 > Math.max(100.0D, Math.pow((double) (com.destroystokyo.paper.ccSpigotConfig.MaxEntitySpeed * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) { // Spigot ++ // CraftBukkit end ++ if(!ccSpigotConfig.RemoveConsoleSpam){ ++ PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); ++ } ++ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); ++ return; ++ } + } + + boolean flag = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D)).isEmpty(); +@@ -377,7 +393,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + + if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot + flag1 = true; +- PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved wrongly!"); // Paper - More informative ++ if(!ccSpigotConfig.RemoveConsoleSpam){ ++ PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved wrongly!"); // Paper - More informative ++ } + } + Location curPos = this.getPlayer().getLocation(); // Spigot + +@@ -600,7 +618,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + + if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) { // Spigot + // CraftBukkit end +- PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getName(), Double.valueOf(d7), Double.valueOf(d8), Double.valueOf(d9)); ++ if(!ccSpigotConfig.RemoveConsoleSpam){ ++ PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getName(), Double.valueOf(d7), Double.valueOf(d8), Double.valueOf(d9)); ++ } + this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch); + return; + } +@@ -658,7 +678,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + + if (!this.player.L() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot + flag1 = true; +- PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getName()); ++ if(!ccSpigotConfig.RemoveConsoleSpam){ ++ PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getName()); ++ } + } + + this.player.setLocation(d4, d5, d6, f, f1); +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0407-aNoTher.patch b/Spigot-Server-Patches/0407-aNoTher.patch new file mode 100644 index 000000000000..f4c578989a70 --- /dev/null +++ b/Spigot-Server-Patches/0407-aNoTher.patch @@ -0,0 +1,22 @@ +From 7001fa553a01a643bc6c6531dcb9463b6df98c65 Mon Sep 17 00:00:00 2001 +From: moo +Date: Mon, 14 Sep 2020 17:12:00 -0400 +Subject: [PATCH] aNoTher + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 6a66c098a..d1f6502f6 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -351,7 +351,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + } + // Paper end + if(ccSpigotConfig.LimitEntitySpeed){ +- if(d10 - d9 > ccSpigotConfig.MaxEntitySpeed){ ++ if(d10 - d9 > ccSpigotConfig.MaxEntitySpeed && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))){ + if(!ccSpigotConfig.RemoveConsoleSpam){ + PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getName(), this.player.getName(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8)); + } +-- +2.22.0.windows.1 + diff --git a/Spigot-Server-Patches/0408-Update-Config.patch b/Spigot-Server-Patches/0408-Update-Config.patch new file mode 100644 index 000000000000..15d4f2add75f --- /dev/null +++ b/Spigot-Server-Patches/0408-Update-Config.patch @@ -0,0 +1,25 @@ +From dce5ae4b91dd9c6deedc35ce7bf45a2d62f5d204 Mon Sep 17 00:00:00 2001 +From: moo +Date: Fri, 16 Oct 2020 17:30:30 -0400 +Subject: [PATCH] Update-Config + + +diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +index 6136334a3..9f67b151b 100644 +--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java ++++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java +@@ -185,9 +185,9 @@ public class ccSpigotConfig { + DisableChunkRelocation = getBoolean("experimental.disable-chunk-relocation", DisableChunkRelocation); + } + +- public static boolean LimitEntitySpeed = true; ++ public static boolean LimitEntitySpeed = false; + private static void EntitySpeedLimit() { +- LimitEntitySpeed = getBoolean("settings.limit-entity-speed", LimitEntitySpeed); ++ LimitEntitySpeed = getBoolean("experimental.limit-entity-speed", LimitEntitySpeed); + } + + public static boolean DebugEntitySpeed = true; +-- +2.22.0.windows.1 +