Refactor Lighting Queue System

may help #284

Cleans up the lighting queue system, reducing diff and improving implementation.

We no longer stop chunk unloads due to lighting updates, and instead simply flush the lighting queue.
The cost of forcing the chunk (and its neighbors!) to stay loaded waiting for its
lighting work to finish is much greater than simply taking the hit and doing the work.

This change also helps reduce the diff and avoid bugs with missed diffs by removing
duplicated logic.

Also switches to a more effecient data structure (ArrayDeque instead of LinkedList) for the queue itself.
This commit is contained in:
Aikar
2016-05-15 18:48:39 -04:00
parent 433489ea32
commit e56bbcdcda
25 changed files with 266 additions and 260 deletions

View File

@@ -1,14 +1,14 @@
From b50ffe187045367a4cadb8abf7d4990bccc58038 Mon Sep 17 00:00:00 2001
From 60d48a782502bf6c276124acfd412f18390a4ac7 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:20:11 -0500
Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f5e26df..8d8e415 100644
index 3d2e0b6..842e364 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1626,4 +1626,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -1593,4 +1593,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null;
}
// CraftBukkit end