Use consistent priorities for light tasks

Should fix high priority chunk loads prioritizing over urgent sync loads

Also fixes build Kenny broke! Bad Kenny.
This commit is contained in:
Aikar
2020-07-17 13:24:12 -04:00
parent 1a755193a4
commit 518ae65609
2 changed files with 2 additions and 3 deletions

View File

@@ -1162,8 +1162,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ long pair = chunkcoordintpair.pair();
+ CompletableFuture<IChunkAccess> future = new CompletableFuture<>();
+ IntSupplier prioritySupplier1 = d.getPrioritySupplier(pair);
+ IntSupplier prioritySupplier = flag ? () -> Math.max(1, prioritySupplier1.getAsInt() - 10) : prioritySupplier1;
+ IntSupplier prioritySupplier = d.getPrioritySupplier(pair);
+ this.e.a(ChunkTaskQueueSorter.a(() -> {
+ this.queue.add(pair, prioritySupplier.getAsInt(), LightEngineThreaded.Update.PRE_UPDATE, SystemUtils.a(() -> {
+ // Paper end