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:
parent
3b1fe490b0
commit
a477a84c6e
1 changed files with 5 additions and 0 deletions
|
@ -141,6 +141,11 @@ impl<'a> BlockCollisionsState<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_block_state(&mut self, block_pos: BlockPos) -> BlockState {
|
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_pos = ChunkSectionPos::from(block_pos);
|
||||||
let section_block_pos = ChunkSectionBlockPos::from(block_pos);
|
let section_block_pos = ChunkSectionBlockPos::from(block_pos);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue