Update last chunk position in findSupportingBlock
Fixes fetching chunks needlessly multiple times. Thanks Lulu13022002 for pointing this out
This commit is contained in:
@@ -391,6 +391,8 @@ public abstract class LevelMixin implements CollisionLevel, LevelAccessor, AutoC
|
||||
final int newChunkZ = currZ >> 4;
|
||||
|
||||
if (((newChunkX ^ lastChunkX) | (newChunkZ ^ lastChunkZ)) != 0) {
|
||||
lastChunkX = newChunkX;
|
||||
lastChunkZ = newChunkZ;
|
||||
lastChunk = (LevelChunk)chunkSource.getChunk(newChunkX, newChunkZ, ChunkStatus.FULL, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.Overwrite;
|
||||
public abstract class FarmBlockMixin {
|
||||
|
||||
/**
|
||||
* @reason Avoid usage of betweenClsed, this can become very hot when
|
||||
* @reason Avoid usage of betweenClosed, this can become very hot when
|
||||
* there are significant numbers of farm blocks in the world
|
||||
* @author Spottedleaf
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user