From f1652c14d803a5f60609403c2bbc23dd891294f0 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Sat, 4 Jul 2015 17:42:28 -0700 Subject: [PATCH] Fix off-by-one in async lighting neighbor loop --- .../0042-Configurable-async-light-updates.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0042-Configurable-async-light-updates.patch b/Spigot-Server-Patches/0042-Configurable-async-light-updates.patch index 893801e7b..29add223e 100644 --- a/Spigot-Server-Patches/0042-Configurable-async-light-updates.patch +++ b/Spigot-Server-Patches/0042-Configurable-async-light-updates.patch @@ -157,8 +157,8 @@ index b681a9f..8ee0cec 100644 + chunk.lightUpdateTime = chunk.world.getTime(); + + final List neighbors = new ArrayList(); -+ for (int cx = (x >> 4) - 1; cx < (x >> 4) + 1; ++cx) { -+ for (int cz = (z >> 4) - 1; cz < (z >> 4) + 1; ++cz) { ++ for (int cx = (x >> 4) - 1; cx <= (x >> 4) + 1; ++cx) { ++ for (int cz = (z >> 4) - 1; cz <= (z >> 4) + 1; ++cz) { + if (this.chunkProvider.isChunkLoaded(cx, cz)) { + Chunk neighbor = this.getChunkAt(cx, cz); + if (neighbor != chunk) {