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

fix writing nbt

This commit is contained in:
mat 2023-12-02 13:45:51 -06:00
parent 2b9b16d28f
commit c898fa5921

View file

@ -262,7 +262,7 @@ impl McBufWritable for simdnbt::owned::NbtTag {
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
let mut data = Vec::new();
self.write(&mut data);
data.write_into(buf)
buf.write_all(&data)
}
}
@ -270,7 +270,7 @@ impl McBufWritable for simdnbt::owned::NbtCompound {
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
let mut data = Vec::new();
simdnbt::owned::NbtTag::Compound(self.clone()).write(&mut data);
data.write_into(buf)
buf.write_all(&data)
}
}
@ -278,6 +278,6 @@ impl McBufWritable for simdnbt::owned::Nbt {
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
let mut data = Vec::new();
self.write_unnamed(&mut data);
data.write_into(buf)
buf.write_all(&data)
}
}