From 518ae65609142a2f015325afa45ddee70b76ddf3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 17 Jul 2020 13:24:12 -0400 Subject: [PATCH] Use consistent priorities for light tasks Should fix high priority chunk loads prioritizing over urgent sync loads Also fixes build Kenny broke! Bad Kenny. --- .../Implement-Chunk-Priority-Urgency-System-for-Chunks.patch | 2 +- Spigot-Server-Patches/Optimize-Light-Engine.patch | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 167f513bb0..d33d9a7019 100644 --- a/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1169,7 +1169,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class PlayerList { // CraftBukkit end - worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper + worldserver1.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper + entityplayer1.forceCheckHighPriority(); // Player while (avoidSuffocation && !worldserver1.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); diff --git a/Spigot-Server-Patches/Optimize-Light-Engine.patch b/Spigot-Server-Patches/Optimize-Light-Engine.patch index fb85cb52b1..88aed89c09 100644 --- a/Spigot-Server-Patches/Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/Optimize-Light-Engine.patch @@ -1162,8 +1162,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + long pair = chunkcoordintpair.pair(); + CompletableFuture 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