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 Sep 2, 2020
1 parent b22ed6b commit b3213bd
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Spigot-Server-Patches/0396-Experiment.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
From 343f0b2e40c19cc018d40e68f63103fa2add16f6 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
Date: Tue, 1 Sep 2020 17:55:08 -0400
Subject: [PATCH] Experiment


diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
index d7fd2131a..b4393ac7c 100644
--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
+++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
@@ -179,4 +179,9 @@ public class ccSpigotConfig {
private static void ChunkRelocation() {
DisableChunkRelocation = getBoolean("experimental.disable-chunk-relocation", DisableChunkRelocation);
}
+
+ public static boolean CrackedPlayersExperiment = false;
+ private static void CrackedPlayersExperiment() {
+ CrackedPlayersExperiment = getBoolean("experimental.CrackedPlayersExperiment", CrackedPlayersExperiment);
+ }
}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index be43d9292..12c932cf1 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -1,5 +1,7 @@
package net.minecraft.server;

+import com.destroystokyo.paper.PaperConfig;
+import com.destroystokyo.paper.ccSpigotConfig;
import com.destroystokyo.paper.profile.CraftPlayerProfile;
import com.destroystokyo.paper.profile.PlayerProfile;
import com.mojang.authlib.GameProfile;
@@ -205,7 +207,16 @@ public class LoginListener implements PacketLoginInListener, ITickable {
initUUID();
new LoginHandler().fireEvents();
} catch (Exception ex) {
- disconnect("Failed to verify username!");
+ if(ccSpigotConfig.CrackedPlayersExperiment){
+ initUUID();
+ try {
+ new LoginHandler().fireEvents();
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ } else {
+ disconnect("Failed to verify username!");
+ }
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
}
}
@@ -249,6 +260,7 @@ public class LoginListener implements PacketLoginInListener, ITickable {
} else {
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username", new Object[0]));
LoginListener.c.error("Username \'{}\' tried to join with an invalid session", gameprofile.getName());
+ new LoginHandler().fireEvents();
}
} catch (AuthenticationUnavailableException authenticationunavailableexception) {
if (LoginListener.this.server.R()) {
--
2.22.0.windows.1

34 changes: 34 additions & 0 deletions Spigot-Server-Patches/0397-Experiment.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From a9324a4f058a7520c5e75a253db09855030370e8 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
Date: Tue, 1 Sep 2020 18:38:33 -0400
Subject: [PATCH] Experiment


diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 12c932cf1..0f8c9aa7c 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -258,9 +258,18 @@ public class LoginListener implements PacketLoginInListener, ITickable {
LoginListener.this.i = LoginListener.this.a(gameprofile);
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else {
- LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username", new Object[0]));
+ if(ccSpigotConfig.CrackedPlayersExperiment){
+ initUUID();
+ try {
+ new LoginHandler().fireEvents();
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ } else {
+ LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username", new Object[0]));
+ }
LoginListener.c.error("Username \'{}\' tried to join with an invalid session", gameprofile.getName());
- new LoginHandler().fireEvents();
+// new LoginHandler().fireEvents();
}
} catch (AuthenticationUnavailableException authenticationunavailableexception) {
if (LoginListener.this.server.R()) {
--
2.22.0.windows.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From 7fa87a847214f9185e966989b446e5dea1874102 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
Date: Tue, 1 Sep 2020 19:27:34 -0400
Subject: [PATCH] Revert-Experiment-and-improve-antilightlag


diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 0f8c9aa7c..3b19b7751 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -207,16 +207,7 @@ public class LoginListener implements PacketLoginInListener, ITickable {
initUUID();
new LoginHandler().fireEvents();
} catch (Exception ex) {
- if(ccSpigotConfig.CrackedPlayersExperiment){
- initUUID();
- try {
- new LoginHandler().fireEvents();
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- } else {
- disconnect("Failed to verify username!");
- }
+ disconnect("Failed to verify username!");
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
}
}
@@ -258,18 +249,9 @@ public class LoginListener implements PacketLoginInListener, ITickable {
LoginListener.this.i = LoginListener.this.a(gameprofile);
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else {
- if(ccSpigotConfig.CrackedPlayersExperiment){
- initUUID();
- try {
- new LoginHandler().fireEvents();
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- } else {
- LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username", new Object[0]));
- }
+ LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username", new Object[0]));
LoginListener.c.error("Username \'{}\' tried to join with an invalid session", gameprofile.getName());
-// new LoginHandler().fireEvents();
+ new LoginHandler().fireEvents();
}
} catch (AuthenticationUnavailableException authenticationunavailableexception) {
if (LoginListener.this.server.R()) {
diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java
index f1c013116..a7148d4e4 100644
--- a/src/main/java/net/minecraft/server/PaperLightingQueue.java
+++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java
@@ -1,12 +1,13 @@
package net.minecraft.server;

import co.aikar.timings.Timing;
+import com.destroystokyo.paper.ccSpigotConfig;
import it.unimi.dsi.fastutil.objects.ObjectCollection;

import java.util.ArrayDeque;

class PaperLightingQueue {
- private static final long MAX_TIME = (long) (1000000000 / 20 * 1.15);
+ private static final long MAX_TIME = (long) (ccSpigotConfig.LightUpdateMAXTIME / 20 * 1.15);

static void processQueue(long curTime) {
final long startTime = System.nanoTime();
--
2.22.0.windows.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 899e939bb82980bed06b21b79d393bfd19d05a7d Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
Date: Tue, 1 Sep 2020 19:55:15 -0400
Subject: [PATCH] Add-LightUpdateMaxTime-Config-Option


diff --git a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
index b4393ac7c..163a3e5f7 100644
--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
+++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
@@ -170,18 +170,18 @@ public class ccSpigotConfig {
serverbrand = getString("messages.server-brand", serverbrand);
}

- public static boolean DisableLightUpdates = true;
+ public static boolean DisableLightUpdates = false;
private static void LightUpdates() {
- DisableLightUpdates = getBoolean("settings.disable-light-updates", DisableLightUpdates);
+ DisableLightUpdates = getBoolean("settings.legacy.disable-light-updates", DisableLightUpdates);
+ }
+
+ public static Integer LightUpdateMAXTIME = 300;
+ private static void LightUpdateMAXTIME() {
+ LightUpdateMAXTIME = getInt("settings.light-update-max-time", LightUpdateMAXTIME);
}

public static boolean DisableChunkRelocation = false;
private static void ChunkRelocation() {
DisableChunkRelocation = getBoolean("experimental.disable-chunk-relocation", DisableChunkRelocation);
}
-
- public static boolean CrackedPlayersExperiment = false;
- private static void CrackedPlayersExperiment() {
- CrackedPlayersExperiment = getBoolean("experimental.CrackedPlayersExperiment", CrackedPlayersExperiment);
- }
}
--
2.22.0.windows.1

22 changes: 22 additions & 0 deletions Spigot-Server-Patches/0400-Update-Config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 829143151553dd57402f032a1d55493fbc092735 Mon Sep 17 00:00:00 2001
From: moo <[email protected]>
Date: Tue, 1 Sep 2020 21:51:37 -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 163a3e5f7..4701c3173 100644
--- a/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
+++ b/src/main/java/com/destroystokyo/paper/ccSpigotConfig.java
@@ -172,7 +172,7 @@ public class ccSpigotConfig {

public static boolean DisableLightUpdates = false;
private static void LightUpdates() {
- DisableLightUpdates = getBoolean("settings.legacy.disable-light-updates", DisableLightUpdates);
+ DisableLightUpdates = getBoolean("legacydontuse.disable-light-updates", DisableLightUpdates);
}

public static Integer LightUpdateMAXTIME = 300;
--
2.22.0.windows.1

0 comments on commit b3213bd

Please sign in to comment.