mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-04 06:39:07 +02:00
types: make CHUNKS_PER_REGION and BLOCKS_PER_CHUNK usize
Having these as usize is more convenient.
This commit is contained in:
parent
b918ff6106
commit
65c39ea153
2 changed files with 11 additions and 8 deletions
|
@ -135,7 +135,8 @@ pub struct OldSection<'a> {
|
|||
|
||||
impl<'a> OldSection<'a> {
|
||||
pub fn new(blocks: &'a fastnbt::ByteArray, data: &'a fastnbt::ByteArray) -> Result<Self> {
|
||||
const N: usize = BLOCKS_PER_CHUNK as usize;
|
||||
use BLOCKS_PER_CHUNK as N;
|
||||
|
||||
if blocks.len() != N * N * N {
|
||||
bail!("Invalid section block data");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue