diff options
| author | mat <git@matdoes.dev> | 2025-02-04 05:29:18 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-02-04 05:29:18 +0000 |
| commit | 6020a2297fe398a7674c9c5d872614bb09d07e14 (patch) | |
| tree | 2f34e9547c7c36afc3f8973b9f65ce7f6f0327a8 | |
| parent | 858bec2081451a1926c2139c59bb7be8725b4d9a (diff) | |
| download | azalea-drasl-6020a2297fe398a7674c9c5d872614bb09d07e14.tar.xz | |
add todo about wrong calculated_bits_per_entry code
| -rwxr-xr-x | azalea-world/src/palette.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index c125a4f0..9b1a8642 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -55,6 +55,9 @@ impl PalettedContainer { // that it'd be global. if it's not global, then we have to calculate it // ourselves. // this almost never matters, except on some custom servers like hypixel limbo + // TODO: this is incorrect. we should be getting the log2 of the max blockstate + // or biome instead of data.len(). this code might be causing wrong data to be + // read. ¯\_(ツ)_/¯ let calculated_bits_per_entry = math::ceil_log2(data.len() as u32) as u8; let calculated_bits_per_entry_palette_kind = PaletteKind::from_bits_and_type(calculated_bits_per_entry, container_type); |
