mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Don't allow for supporting block checks to load chunks
I cannot test this due to lack of hardware (took 30 minutes getting paper updated and loaded into IJ on this machine...), however, this is the easiest patch for now. Ideally, some form of distance check would probably be added to improve invalidation of this cache.
This commit is contained in:
@@ -21216,8 +21216,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end - rewrite chunk system
|
||||
+
|
||||
@Nullable ChunkAccess getChunkIfLoadedImmediately(int x, int z); // Paper - ifLoaded api (we need this since current impl blocks if the chunk is loading)
|
||||
@Nullable default ChunkAccess getChunkIfLoadedImmediately(BlockPos pos) { return this.getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4);}
|
||||
|
||||
/** @deprecated */
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
|
Reference in New Issue
Block a user