geforkt von Mirrors/Paper
Lookup neighbor chunks more efficiently in async lighting
Dieser Commit ist enthalten in:
Ursprung
c17ecdd93f
Commit
963925b8ea
@ -159,9 +159,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ 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) {
|
||||
+ if (this.chunkProvider.isChunkLoaded(cx, cz)) {
|
||||
+ Chunk neighbor = this.getChunkAt(cx, cz);
|
||||
+ if (neighbor != chunk) {
|
||||
+ if (cx != x >> 4 && cz != z >> 4) {
|
||||
+ Chunk neighbor = this.getChunkIfLoaded(cx, cz);
|
||||
+ if (neighbor != null) {
|
||||
+ neighbor.pendingLightUpdates.incrementAndGet();
|
||||
+ neighbor.lightUpdateTime = chunk.world.getTime();
|
||||
+ neighbors.add(neighbor);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren