aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
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/src
parent350e32d0a9f21103e271e80e63daa5711a78e1d7 (diff)
downloadazalea-drasl-ea64fba7f655b9afa03d57e8590c16e024f396f3.tar.xz
upgrade to simdnbt 0.6 (#160)
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/lib.rs1
-rw-r--r--azalea-core/src/registry_holder.rs6
-rwxr-xr-xazalea-core/src/resource_location.rs2
3 files changed, 4 insertions, 5 deletions
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())
}
}