Preload important classes such as Logger and JLine
This is for 2 reasons: 1) Ensuring our log4j is mostly loaded at OUR version. I've seen stack traces with line numbers that do not match our version. This means that some plugin has shaded in log4j and their loaded version is mixing with ours.... So by at least trying to load a bunch of log4j classes before we load plugins, we can be more sure mixed versions are not loading. 2) If the jar file is replaced while the server is runnimg class not found errors galore This will preloaod a bunch of classes commonly seen to error during shutdown due to this. The goal here is to help let the server shutdown gracefully as possible. Some plugins will still blow up here if they access a class that hadn't been loaded yet, but goal is to at least stop freezing the shutdown process as it does with JLine and Log4j errors requiring an external kill. Ideally you should not replace jars while the server is running, but it is something that happens in development for testing. Updated test server to do a copy though to avoid this happening in Paper development.
This commit is contained in:
@@ -393,6 +393,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
j = SectionPosition.a(j, EnumDirection.UP);
|
||||
++k;
|
||||
if (k >= l) {
|
||||
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
||||
@@ -0,0 +0,0 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
||||
}
|
||||
|
||||
private void a(int i, int j, IntSupplier intsupplier, LightEngineThreaded.Update lightenginethreaded_update, Runnable runnable) {
|
||||
- this.e.a((Object) ChunkTaskQueueSorter.a(() -> {
|
||||
+ this.e.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile error
|
||||
this.c.add(Pair.of(lightenginethreaded_update, runnable));
|
||||
if (this.c.size() >= this.f) {
|
||||
this.b();
|
||||
@@ -0,0 +0,0 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
||||
|
||||
public void queueUpdate() {
|
||||
if ((!this.c.isEmpty() || super.a()) && this.g.compareAndSet(false, true)) {
|
||||
- this.b.a((Object) (() -> {
|
||||
+ this.b.a((() -> { // Paper - decompile error
|
||||
this.b();
|
||||
this.g.set(false);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
|
||||
Reference in New Issue
Block a user