Fix bug in async load order priority

accidently had priority inverted!

This will greatly improve visual chunk load speeds
This commit is contained in:
Aikar 2018-09-28 23:12:16 -04:00
parent 5b212525c7
commit 1b331d8534

View File

@ -64,7 +64,7 @@ index da710cc6fe..6b65364e22 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
new file mode 100644
index 0000000000..8dfed1a8cf
index 0000000000..0a9fd5d662
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
@@ -0,0 +0,0 @@
@ -258,7 +258,7 @@ index 0000000000..8dfed1a8cf
+ }
+
+ public enum Priority {
+ HIGH, NORMAL
+ NORMAL, HIGH
+ }
+
+ public class PendingTask <T> implements Runnable {
@ -316,7 +316,7 @@ index 0000000000..8dfed1a8cf
+ return;
+ }
+ if (this.submitted.compareAndSet(submitted, priority)) {
+ if (priority == 1) {
+ if (priority == Priority.HIGH.ordinal()) {
+ high.add(this);
+ } else {
+ normal.add(this);
@ -1718,7 +1718,7 @@ index fa99fe0146..4f49786aa3 100644
}
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f837e6c36c..409c7d6ee6 100644
index 14905fceb0..c0aeccffbf 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {