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:
parent
2b9b16d28f
commit
c898fa5921
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue