1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

exit get_block_state early if below the world

This commit is contained in:
mat 2024-12-23 01:31:17 +00:00
parent 3b1fe490b0
commit a477a84c6e

View file

@ -141,6 +141,11 @@ impl<'a> BlockCollisionsState<'a> {
}
fn get_block_state(&mut self, block_pos: BlockPos) -> BlockState {
if block_pos.y < self.world.chunks.min_y {
// below the world
return BlockState::AIR;
}
let section_pos = ChunkSectionPos::from(block_pos);
let section_block_pos = ChunkSectionBlockPos::from(block_pos);