diff --git a/src/data.rs b/src/data.rs index 06467b2..c052ef9 100644 --- a/src/data.rs +++ b/src/data.rs @@ -156,6 +156,12 @@ impl NbtValue { export_data!(as_f64, NbtDouble, f64); export_data!(as_string, NbtString, Arc); + pub fn from_end(value: &mut Reader) -> Self { + let mut buff = [0_u8]; + _ = value.read(&mut buff).unwrap(); + Self::NbtEnd + } + read_data!(from_bool, NbtByte, bool, 1); read_data!(from_i16, NbtShort, i16, 2); read_data!(from_i32, NbtInt, i32, 4);