Use getChunkIfLoadedImmediately in places
This prevents us from hitting chunk loads for chunks at or less-than ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case).
This commit is contained in:
@@ -28,3 +28,12 @@
|
||||
int j = SectionPos.blockToSectionCoord(blockposition.getX() - i);
|
||||
int k = SectionPos.blockToSectionCoord(blockposition.getY() - i);
|
||||
int l = SectionPos.blockToSectionCoord(blockposition.getZ() - i);
|
||||
@@ -42,7 +56,7 @@
|
||||
|
||||
for (int l1 = j; l1 <= i1; ++l1) {
|
||||
for (int i2 = l; i2 <= k1; ++i2) {
|
||||
- LevelChunk chunk = this.level.getChunkSource().getChunkNow(l1, i2);
|
||||
+ LevelChunk chunk = (LevelChunk) this.level.getChunkIfLoadedImmediately(l1, i2); // Paper - Use getChunkIfLoadedImmediately
|
||||
|
||||
if (chunk != null) {
|
||||
for (int j2 = k; j2 <= j1; ++j2) {
|
||||
|
||||
Reference in New Issue
Block a user