From edd9ac93ec6abef4e57c6de828ee59b13da8d58f Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 18 Dec 2025 13:15:23 -1400 Subject: fix warning when Vec3 codec is represented as floats --- azalea-core/src/registry_holder/entity_effect.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'azalea-core/src/registry_holder') 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 { 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 } } -- cgit v1.2.3