aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-nbt/src')
-rwxr-xr-xazalea-nbt/src/encode.rs4
-rwxr-xr-xazalea-nbt/src/tag.rs4
2 files changed, 7 insertions, 1 deletions
diff --git a/azalea-nbt/src/encode.rs b/azalea-nbt/src/encode.rs
index 49c31192..87464fd9 100755
--- a/azalea-nbt/src/encode.rs
+++ b/azalea-nbt/src/encode.rs
@@ -193,6 +193,10 @@ impl Tag {
write_compound(writer, value, false)?;
Ok(())
}
+ Tag::End => {
+ 0u8.write_into(writer)?;
+ Ok(())
+ }
_ => Err(Error::InvalidTag),
}
}
diff --git a/azalea-nbt/src/tag.rs b/azalea-nbt/src/tag.rs
index de57b0a2..2bebe156 100755
--- a/azalea-nbt/src/tag.rs
+++ b/azalea-nbt/src/tag.rs
@@ -1,6 +1,8 @@
use ahash::AHashMap;
+use serde::{Deserialize, Serialize};
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
+#[serde(untagged)]
pub enum Tag {
End, // 0
Byte(i8), // 1