diff --git a/Changelog.md b/Changelog.md index 20b14a3..5ae8d1e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed -- Stopped using `PooledLongQueue` using `LongArrayFIFOQueue` instead, should be more optimized (Lower memory usage, faster & lighter lighting updates) +- Stopped using `PooledLongQueue` using `LongArrayFIFOQueue` instead, should be more optimized (faster & lighter lighting updates) - Skip spreading light neighbor checks early if the current light is lower than the neighbor light - Made minor changes to clamping (Shouldn't cause a difference) diff --git a/src/main/java/dev/redstudio/alfheim/lighting/LightingEngine.java b/src/main/java/dev/redstudio/alfheim/lighting/LightingEngine.java index a1405af..7d5d626 100644 --- a/src/main/java/dev/redstudio/alfheim/lighting/LightingEngine.java +++ b/src/main/java/dev/redstudio/alfheim/lighting/LightingEngine.java @@ -109,17 +109,17 @@ public LightingEngine(final World world) { this.world = world; profiler = world.profiler; - initialBrightenings = new LongArrayFIFOQueue(128); - initialDarkenings = new LongArrayFIFOQueue(128); + initialBrightenings = new LongArrayFIFOQueue(16384); + initialDarkenings = new LongArrayFIFOQueue(16384); for (int i = 0; i < EnumSkyBlock.values().length; ++i) - lightUpdateQueues[i] = new LongArrayFIFOQueue(128); + lightUpdateQueues[i] = new LongArrayFIFOQueue(16384); for (int i = 0; i < darkeningQueues.length; ++i) - darkeningQueues[i] = new LongArrayFIFOQueue(128); + darkeningQueues[i] = new LongArrayFIFOQueue(16384); for (int i = 0; i < brighteningQueues.length; ++i) - brighteningQueues[i] = new LongArrayFIFOQueue(128); + brighteningQueues[i] = new LongArrayFIFOQueue(16384); for (int i = 0; i < neighborInfos.length; ++i) neighborInfos[i] = new NeighborInfo();