Skip to content

Commit

Permalink
fix writing nbt
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Dec 2, 2023
1 parent 2b9b16d commit c898fa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azalea-buf/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,22 @@ 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)
}
}

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)
}
}

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)
}
}

0 comments on commit c898fa5

Please sign in to comment.