XavilPergis/Notcraft

Assert panic on debug run

Closed this issue · 1 comments

Crashes after rendering only background on every debug run.
Every time it's the assert at line 160:

impl Index<$type> for PaddedChunk {
type Output = BlockId;
fn index(&self, $name: $type) -> &BlockId {
debug_assert!(in_chunk_bounds(Point3::new(
$x as i32, $y as i32, $z as i32
)));
&self.data[index_for_coord_size(34, $x, $y, $z)]
}
}

https://pastebin.com/rRC8AHL6

Didn't notice anything suspicious on --release run where that assert is skipped.

This should be fixed because PaddedChunk no longer exists :P