aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src/registry_holder
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-18 13:15:23 -1400
committermat <git@matdoes.dev>2025-12-18 13:15:23 -1400
commitedd9ac93ec6abef4e57c6de828ee59b13da8d58f (patch)
tree343d10bc7ef60549d3c478f814d0332dfddc8ba3 /azalea-core/src/registry_holder
parent4bd67cb6a7bf0dc24c4ca2e4bed0a6fdac2b44ce (diff)
downloadazalea-drasl-edd9ac93ec6abef4e57c6de828ee59b13da8d58f.tar.xz
fix warning when Vec3 codec is represented as floats
Diffstat (limited to 'azalea-core/src/registry_holder')
-rw-r--r--azalea-core/src/registry_holder/entity_effect.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea-core/src/registry_holder/entity_effect.rs b/azalea-core/src/registry_holder/entity_effect.rs
index 4cb914e3..00efde21 100644
--- a/azalea-core/src/registry_holder/entity_effect.rs
+++ b/azalea-core/src/registry_holder/entity_effect.rs
@@ -12,6 +12,7 @@ use simdnbt::{
Deserialize, DeserializeError,
borrow::{NbtCompound, NbtTag},
};
+use tracing::error;
use crate::{
position::{Vec3, Vec3i},
@@ -44,7 +45,7 @@ pub enum EntityEffect {
impl Deserialize for EntityEffect {
fn from_compound(nbt: NbtCompound) -> Result<Self, DeserializeError> {
let kind = get_in_compound(&nbt, "type")?;
- match kind {
+ let res = match kind {
EntityEffectKind::AllOf => Deserialize::from_compound(nbt).map(Self::AllOf),
EntityEffectKind::ApplyMobEffect => {
Deserialize::from_compound(nbt).map(Self::ApplyMobEffect)
@@ -78,7 +79,11 @@ impl Deserialize for EntityEffect {
EntityEffectKind::SummonEntity => {
Deserialize::from_compound(nbt).map(Self::SummonEntity)
}
+ };
+ if res.is_err() {
+ error!("Error deserializing EntityEffect {kind}: {nbt:?}");
}
+ res
}
}