Skip to content

Commit

Permalink
fix: return VOID_AIR for client-side unloaded chunks instead of AIR
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed May 17, 2024
1 parent 9a89b2a commit a29281a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public BlockState getBlockState(BlockPos pos) {
int z = pos.getZ();

int chunkY = this.getSectionIndex(y);
if (chunkY < 0 || chunkY >= sections.length) {
//worldChunk.isEmpty() for EmptyChunk which is only VOID_AIR, used for client-side unloaded chunk
if (chunkY < 0 || chunkY >= sections.length || worldChunk.isEmpty()) {
return OUTSIDE_WORLD_BLOCK;
}

Expand Down

0 comments on commit a29281a

Please sign in to comment.