aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-02-23 10:15:45 -0600
committermat <git@matdoes.dev>2024-02-23 10:15:45 -0600
commitad33d06e5fa4498e9c37d88308e4077af94c9381 (patch)
treec187cea957bde2bd8227e6d34e613461ebceba83
parent87658ac4869f1fe458bc87009bc159f8e3362b69 (diff)
downloadazalea-drasl-ad33d06e5fa4498e9c37d88308e4077af94c9381.tar.xz
reword comment for calculated_bits_per_entry
-rwxr-xr-xazalea-world/src/palette.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs
index 278524ca..2b3cdc53 100755
--- a/azalea-world/src/palette.rs
+++ b/azalea-world/src/palette.rs
@@ -49,9 +49,9 @@ impl PalettedContainer {
let size = container_type.size();
let data = Vec::<u64>::read_from(buf)?;
- // if there's too much data that the bits per entry would be global, we have to
- // figure out the bits per entry ourselves by checking the number of bits in the
- // length of the data.
+ // we can only trust the bits per entry that we're sent if there's enough data
+ // 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
let calculated_bits_per_entry = math::ceil_log2(data.len() as u32) as u8;
let calculated_bits_per_entry_palette_kind =