Skip to content

Commit

Permalink
reword comment for calculated_bits_per_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Feb 23, 2024
1 parent 87658ac commit ad33d06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azalea-world/src/palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit ad33d06

Please sign in to comment.