This commit is contained in:
shenjack 2024-03-10 14:26:35 +08:00
parent 5073d9780a
commit c367042d58
Signed by: shenjack
GPG Key ID: 7B1134A979775551
3 changed files with 11 additions and 6 deletions

View File

@ -9,11 +9,11 @@
- [x] JavaNetAfter1_20_2
- [x] BedrockDisk
- [x] BedrockNetVarInt
- [ ] 写入
- [x] 写入
- [x] Java
- [x] JavaNetAfter1_20_2
- [ ] BedrockDisk
- [ ] BedrockNetVarInt
- [x] BedrockDisk
- [x] BedrockNetVarInt
- [ ] `Serde` 支持
- [ ] `Serialize`
- [ ] `Deserialize`

View File

@ -200,7 +200,9 @@ fn test_v5(mut data: Vec<u8>) {
std::thread::sleep(std::time::Duration::from_secs(1));
test_lib!(
{
let _nbt_data = shen_nbt5::NbtValue::from_binary(data.as_mut_slice());
let _nbt_data = shen_nbt5::NbtValue::from_binary::<shen_nbt5::nbt_version::Java>(
data.as_mut_slice(),
);
},
"nbt v5",
len
@ -256,7 +258,10 @@ fn cli_read_test() {
std::thread::sleep(std::time::Duration::from_secs(1));
let start_time = std::time::Instant::now();
// let nbt_data = shen_nbt4::Value::from_vec(data);
let nbt_data = shen_nbt5::NbtValue::from_binary(data.as_mut_slice());
let nbt_data =
shen_nbt5::NbtValue::from_binary::<shen_nbt5::nbt_version::Java>(data.as_mut_slice())
.unwrap();
let end_time = std::time::Instant::now();
println!("=== shen nbt 5 ===");
println!("time: {:?}", end_time - start_time);

View File

@ -1,6 +1,6 @@
[package]
name = "shen-nbt5"
version = "0.2.0"
version = "0.4.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html