minedmap/tile_renderer: avoid calling block_color() more often than necessary

Collect all biome indices/weights for a chunk and deduplicate using a
hash map.
This commit is contained in:
Matthias Schiffer 2023-08-03 23:02:49 +02:00
parent fb712cd2f5
commit deb33814ee
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 29 additions and 9 deletions

7
Cargo.lock generated
View file

@ -401,6 +401,7 @@ dependencies = [
"indexmap",
"itertools",
"num-integer",
"rustc-hash",
"serde",
"serde_json",
"zstd",
@ -489,6 +490,12 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustix"
version = "0.38.4"