diff options
| author | mat <github@matdoes.dev> | 2022-12-08 18:39:35 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-12-08 18:39:35 -0600 |
| commit | 70e2dfed16da8d5130460ea15b47701e622f4a9f (patch) | |
| tree | 41f670baf3a05ed180880ec2a11d8e5f6a1a1599 /azalea-world/src/palette.rs | |
| parent | f2076daba5cfcce81399b075ba9258fbdc2012fa (diff) | |
| download | azalea-drasl-70e2dfed16da8d5130460ea15b47701e622f4a9f.tar.xz | |
wrap_comments = true
Diffstat (limited to 'azalea-world/src/palette.rs')
| -rwxr-xr-x | azalea-world/src/palette.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index e359e7bc..f78b2082 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -83,7 +83,8 @@ impl PalettedContainer { .get_and_set(self.get_index(x, y, z), paletted_value as u64) as u32 } - /// Sets the id at the given index and return the previous id. You probably want `.set` instead. + /// Sets the id at the given index and return the previous id. You probably + /// want `.set` instead. pub fn set_at_index(&mut self, index: usize, value: u32) { let paletted_value = self.id_for(value); self.storage.set(index, paletted_value as u64) @@ -110,7 +111,8 @@ impl PalettedContainer { // sanity check debug_assert_eq!(storage.size(), self.container_type.size()); - // let palette = new_palette_type.as_empty_palette(1usize << (bits_per_entry as usize)); + // let palette = new_palette_type.as_empty_palette(1usize << (bits_per_entry as + // usize)); let palette = new_palette_type.as_empty_palette(); PalettedContainer { bits_per_entry, @@ -197,7 +199,8 @@ pub enum PaletteType { pub enum Palette { /// ID of the corresponding entry in its global palette SingleValue(u32), - // in vanilla this keeps a `size` field that might be less than the length, but i'm not sure it's actually needed? + // in vanilla this keeps a `size` field that might be less than the length, but i'm not sure + // it's actually needed? Linear(Vec<u32>), Hashmap(Vec<u32>), Global, |
