This commit is contained in:
Wagyourtail
2021-11-11 12:49:47 -07:00
parent 749fd4fac3
commit 9a9358bc78
6 changed files with 9 additions and 9 deletions

View File

@@ -147,7 +147,7 @@ public enum WorldScanner implements IWorldScanner {
boolean foundWithinY = false;
for (int y0 : coordinateIterationOrder) {
LevelChunkSection section = chunkInternalStorageArray[y0];
if (section == null || LevelChunkSection.isEmpty(section)) {
if (section == null || section.hasOnlyAir()) {
continue;
}
int yReal = y0 << 4;

View File

@@ -169,7 +169,7 @@ public class BlockStateInterface {
// get the block at x,y,z from this chunk WITHOUT creating a single blockpos object
public static BlockState getFromChunk(LevelChunk chunk, int x, int y, int z) {
LevelChunkSection section = chunk.getSections()[y >> 4];
if (LevelChunkSection.isEmpty(section)) {
if (section.hasOnlyAir()) {
return AIR;
}
return section.getBlockState(x & 15, y & 15, z & 15);