1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Update last chunk position in findSupportingBlock

Fixes fetching chunks needlessly multiple times.

Thanks Lulu13022002 for pointing this out
This commit is contained in:
Spottedleaf 2024-07-13 11:44:52 -07:00
parent 1b20e12355
commit 7c3194af85

View file

@ -31694,6 +31694,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ final int newChunkZ = currZ >> 4;
+
+ if (((newChunkX ^ lastChunkX) | (newChunkZ ^ lastChunkZ)) != 0) {
+ lastChunkX = newChunkX;
+ lastChunkZ = newChunkZ;
+ lastChunk = (LevelChunk)chunkSource.getChunk(newChunkX, newChunkZ, ChunkStatus.FULL, false);
+ }
+