resource: make BlockTypeMap return BlockType without reference

This commit is contained in:
Matthias Schiffer 2023-03-01 21:54:40 +01:00
parent 0673c89bd8
commit cbbc6d8f35
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
2 changed files with 15 additions and 6 deletions

View file

@ -110,7 +110,7 @@ pub fn top_layer(chunk: &Chunk, block_types: &BlockTypeMap) -> Result<Box<BlockI
let coords = SectionBlockCoords { xz, y };
let block_id = section.block_id_at(coords)?;
let Some(&block_type) = block_types.get(block_id) else {
let Some(block_type) = block_types.get(block_id) else {
eprintln!("Unknown block type: {}", block_id);
continue;
};