aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-08-12 17:39:05 +1200
committermat <git@matdoes.dev>2025-08-12 17:39:05 +1200
commit12aeae07d2667cd188acf88190ed5c3f7983926a (patch)
tree4f4549b8e37d76f098d4164398517813bb0dfcc6 /azalea-core/src
parentfa1050d6eedf80bbc20e91163b99c0306414e627 (diff)
downloadazalea-drasl-12aeae07d2667cd188acf88190ed5c3f7983926a.tar.xz
fix wrong chat styling sometimes when 'extra' field is used
Diffstat (limited to 'azalea-core/src')
-rw-r--r--azalea-core/src/checksum.rs157
1 files changed, 0 insertions, 157 deletions
diff --git a/azalea-core/src/checksum.rs b/azalea-core/src/checksum.rs
index 8265906f..4661d171 100644
--- a/azalea-core/src/checksum.rs
+++ b/azalea-core/src/checksum.rs
@@ -143,7 +143,6 @@ impl<'a, 'r> ser::Serializer for ChecksumSerializer<'a, 'r> {
fn serialize_none(self) -> Result<()> {
assert!(self.hasher.finish() == 0);
- println!("serialize none");
self.hasher.write_u8(1);
Ok(())
}
@@ -217,7 +216,6 @@ impl<'a, 'r> ser::Serializer for ChecksumSerializer<'a, 'r> {
fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq> {
assert!(self.hasher.finish() == 0);
- println!("serialize seq with len: {:?}", len);
Ok(ChecksumListSerializer {
hasher: self.hasher,
registries: self.registries,
@@ -654,7 +652,6 @@ fn update_hasher_for_list(h: &mut Crc32cHasher, values: &[Checksum]) {
h.write_u8(5);
}
fn update_hasher_for_map(h: &mut Crc32cHasher, entries: &[(Checksum, Checksum)]) {
- println!("getting checksum for map with {} entries", entries.len());
h.write_u8(2);
let mut entries = entries.to_vec();
entries.sort_by(|a, b| match a.0.cmp(&b.0) {
@@ -667,157 +664,3 @@ fn update_hasher_for_map(h: &mut Crc32cHasher, entries: &[(Checksum, Checksum)])
}
h.write_u8(3);
}
-
-// impl AzaleaChecksum for i8 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(6);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for i16 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(7);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for i32 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(8);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for i64 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(9);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for f32 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(10);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for f64 {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(11);
-// h.write(&self.to_le_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for &str {
-// fn azalea_checksum(&self) -> HashCode {
-// println!("doing checksum for str: {self:?}");
-// let mut h = Crc32cHasher::default();
-// h.write_u8(12);
-// h.write(&(self.len() as u32).to_le_bytes());
-// h.write(&self.as_bytes());
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for String {
-// fn azalea_checksum(&self) -> HashCode {
-// println!("doing checksum for String: {self:?}");
-// let mut h = Crc32cHasher::default();
-// h.write_u8(12);
-
-// let utf16 = self.encode_utf16().collect::<Vec<_>>();
-// h.write(&(utf16.len() as u32).to_le_bytes());
-// for c in utf16 {
-// h.write(&c.to_le_bytes());
-// }
-
-// println!("doing checksum for string: {self:?}");
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for bool {
-// fn azalea_checksum(&self) -> HashCode {
-// println!("doing checksum for bool: {self:?}");
-// let mut h = Crc32cHasher::default();
-// h.write_u8(13);
-// h.write_u8(*self as u8);
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<u8> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(14);
-// h.write(self);
-// h.write_u8(15);
-
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<i8> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(14);
-// for item in self {
-// h.write(&[*item as u8]);
-// }
-// h.write_u8(15);
-
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<u32> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(16);
-// for item in self {
-// h.write(&item.to_le_bytes());
-// }
-// h.write_u8(17);
-
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<i32> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(16);
-// for item in self {
-// h.write(&item.to_le_bytes());
-// }
-// h.write_u8(17);
-
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<u64> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(18);
-// for item in self {
-// h.write(&item.to_le_bytes());
-// }
-// h.write_u8(19);
-
-// HashCode(h.finish() as u32)
-// }
-// }
-// impl AzaleaChecksum for Vec<i64> {
-// fn azalea_checksum(&self) -> HashCode {
-// let mut h = Crc32cHasher::default();
-// h.write_u8(18);
-// for item in self {
-// h.write(&item.to_le_bytes());
-// }
-// h.write_u8(19);
-
-// HashCode(h.finish() as u32)
-// }
-// }