From c51480494f273859b85f4eb7c34613724572fb6c Mon Sep 17 00:00:00 2001 From: shenjack-mac <3695888@qq.com> Date: Wed, 2 Aug 2023 20:06:07 +0800 Subject: [PATCH] from end --- src/data.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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);