1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

reword comment for calculated_bits_per_entry

This commit is contained in:
mat 2024-02-23 10:15:45 -06:00
parent 87658ac486
commit ad33d06e5f

View file

@ -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 =