aboutsummaryrefslogtreecommitdiff
path: root/azalea-core
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2024-07-05 00:45:45 -0500
committerGitHub <noreply@github.com>2024-07-05 00:45:45 -0500
commitea64fba7f655b9afa03d57e8590c16e024f396f3 (patch)
tree728293b8cc852bf6b50a55594589a3b93b96c286 /azalea-core
parent350e32d0a9f21103e271e80e63daa5711a78e1d7 (diff)
downloadazalea-drasl-ea64fba7f655b9afa03d57e8590c16e024f396f3.tar.xz
upgrade to simdnbt 0.6 (#160)
Diffstat (limited to 'azalea-core')
-rw-r--r--azalea-core/Cargo.toml10
-rwxr-xr-xazalea-core/src/lib.rs1
-rw-r--r--azalea-core/src/registry_holder.rs6
-rwxr-xr-xazalea-core/src/resource_location.rs2
4 files changed, 9 insertions, 10 deletions
diff --git a/azalea-core/Cargo.toml b/azalea-core/Cargo.toml
index ee8611c1..36abe2c8 100644
--- a/azalea-core/Cargo.toml
+++ b/azalea-core/Cargo.toml
@@ -9,15 +9,15 @@ version = "0.10.2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-simdnbt = { version = "0.5", git = "https://github.com/azalea-rs/simdnbt" }
+simdnbt = "0.6"
azalea-buf = { path = "../azalea-buf", version = "0.10.0" }
azalea-registry = { path = "../azalea-registry", version = "0.10.0" }
-bevy_ecs = { version = "0.13.2", default-features = false, optional = true }
+bevy_ecs = { version = "0.13.0", default-features = false, optional = true }
nohash-hasher = "0.2.0"
-num-traits = "0.2.18"
+num-traits = "0.2.19"
serde = { version = "^1.0", optional = true }
-uuid = "^1.8.0"
-serde_json = "^1.0.116"
+uuid = "^1.9.1"
+serde_json = "^1.0.120"
tracing = "0.1.40"
[features]
diff --git a/azalea-core/src/lib.rs b/azalea-core/src/lib.rs
index 83dd6245..1596a673 100755
--- a/azalea-core/src/lib.rs
+++ b/azalea-core/src/lib.rs
@@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]
-#![feature(lazy_cell)]
#![feature(trait_upcasting)]
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
diff --git a/azalea-core/src/registry_holder.rs b/azalea-core/src/registry_holder.rs
index 68dfcf29..119a1317 100644
--- a/azalea-core/src/registry_holder.rs
+++ b/azalea-core/src/registry_holder.rs
@@ -53,7 +53,7 @@ impl RegistryHolder {
value.write(&mut nbt_bytes);
let nbt_borrow_compound =
simdnbt::borrow::read_compound(&mut Cursor::new(&nbt_bytes)).ok()?;
- let value = match T::from_compound(&nbt_borrow_compound) {
+ let value = match T::from_compound((&nbt_borrow_compound).into()) {
Ok(value) => value,
Err(err) => {
return Some(Err(err));
@@ -182,7 +182,7 @@ pub enum MonsterSpawnLightLevel {
}
impl FromNbtTag for MonsterSpawnLightLevel {
- fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> {
+ fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> {
if let Some(value) = tag.int() {
Some(Self::Simple(value as u32))
} else if let Some(value) = tag.compound() {
@@ -240,7 +240,7 @@ pub enum BiomePrecipitation {
Snow,
}
impl FromNbtTag for BiomePrecipitation {
- fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> {
+ fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> {
match tag.string()?.to_str().as_ref() {
"none" => Some(Self::None),
"rain" => Some(Self::Rain),
diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs
index a6dcc0be..2b0feb71 100755
--- a/azalea-core/src/resource_location.rs
+++ b/azalea-core/src/resource_location.rs
@@ -101,7 +101,7 @@ impl<'de> Deserialize<'de> for ResourceLocation {
}
impl FromNbtTag for ResourceLocation {
- fn from_nbt_tag(tag: &simdnbt::borrow::NbtTag) -> Option<Self> {
+ fn from_nbt_tag(tag: simdnbt::borrow::NbtTag) -> Option<Self> {
tag.string().and_then(|s| s.to_str().parse().ok())
}
}