Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
moom0o authored Oct 16, 2020
1 parent c88b794 commit 68ee80c
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Spigot-Server-Patches/0401-Test-Patch-Entityspeed.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From e1e75e659a24d8440d1bf66b3ef75b2325efad8e Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

34 changes: 34 additions & 0 deletions Spigot-Server-Patches/0402-Test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 844da9011770a352dc47503deb47f44dfb929afe Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

21 changes: 21 additions & 0 deletions Spigot-Server-Patches/0403-Test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 2071d4d3e7a483122c82354a74cf9feec41f98dd Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

24 changes: 24 additions & 0 deletions Spigot-Server-Patches/0404-anothertest.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From ba28a030f76cceabd6f53084c30ea6ff5d8aca13 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

21 changes: 21 additions & 0 deletions Spigot-Server-Patches/0405-aNoThErtESt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 230b54bdaa4214706dd90e312e69496dc8e043fa Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

116 changes: 116 additions & 0 deletions Spigot-Server-Patches/0406-Hopefully-the-final-patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
From 79404b5d30148392727e8c88ede09b00621842b1 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

22 changes: 22 additions & 0 deletions Spigot-Server-Patches/0407-aNoTher.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 7001fa553a01a643bc6c6531dcb9463b6df98c65 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

25 changes: 25 additions & 0 deletions Spigot-Server-Patches/0408-Update-Config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From dce5ae4b91dd9c6deedc35ce7bf45a2d62f5d204 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
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

0 comments on commit 68ee80c

Please sign in to comment.