Update last chunk position in findSupportingBlock
Fixes fetching chunks needlessly multiple times. Thanks Lulu13022002 for pointing this out
This commit is contained in:
@@ -31694,6 +31694,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ final int newChunkZ = currZ >> 4;
|
+ final int newChunkZ = currZ >> 4;
|
||||||
+
|
+
|
||||||
+ if (((newChunkX ^ lastChunkX) | (newChunkZ ^ lastChunkZ)) != 0) {
|
+ if (((newChunkX ^ lastChunkX) | (newChunkZ ^ lastChunkZ)) != 0) {
|
||||||
|
+ lastChunkX = newChunkX;
|
||||||
|
+ lastChunkZ = newChunkZ;
|
||||||
+ lastChunk = (LevelChunk)chunkSource.getChunk(newChunkX, newChunkZ, ChunkStatus.FULL, false);
|
+ lastChunk = (LevelChunk)chunkSource.getChunk(newChunkX, newChunkZ, ChunkStatus.FULL, false);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user