Fix off-by-one in async lighting neighbor loop

This commit is contained in:
Byteflux 2015-07-04 17:42:28 -07:00
parent 5ceee0e6e0
commit f1652c14d8

View file

@ -157,8 +157,8 @@ index b681a9f..8ee0cec 100644
+ chunk.lightUpdateTime = chunk.world.getTime();
+
+ final List<Chunk> neighbors = new ArrayList<Chunk>();
+ 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) {