aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/effects.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-01-12 02:09:41 -0600
committerGitHub <noreply@github.com>2026-01-12 02:09:41 -0600
commit1accbac964168af5fa0d87cb170389f0a9d01363 (patch)
tree1509b26c19beaa23a492289f6bf00d3958be44d5 /azalea-entity/src/effects.rs
parent58339b9d229592dee40e15b8648fe4075cc391f4 (diff)
downloadazalea-drasl-1accbac964168af5fa0d87cb170389f0a9d01363.tar.xz
Make Bevy dependencies optional in azalea-protocol (#303)
* Make Bevy dependencies optional in azalea-protocol * derive serde traits on Direction again * update docs for types that may not have Component
Diffstat (limited to 'azalea-entity/src/effects.rs')
-rw-r--r--azalea-entity/src/effects.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-entity/src/effects.rs b/azalea-entity/src/effects.rs
index ae7ae8a1..39074ebd 100644
--- a/azalea-entity/src/effects.rs
+++ b/azalea-entity/src/effects.rs
@@ -6,7 +6,6 @@ use std::{
use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError};
use azalea_core::bitset::FixedBitSet;
use azalea_registry::builtin::MobEffect;
-use bevy_ecs::component::Component;
/// Data about an active mob effect.
#[derive(AzBuf, Clone, Debug, Default, PartialEq)]
@@ -63,8 +62,9 @@ impl AzaleaWrite for MobEffectFlags {
}
}
-/// An ECS component that stores the active mob effects on an entity.
-#[derive(Clone, Component, Debug, Default)]
+/// The active mob effects on an entity.
+#[cfg_attr(feature = "bevy_ecs", derive(bevy_ecs::component::Component))]
+#[derive(Clone, Debug, Default)]
pub struct ActiveEffects(pub HashMap<MobEffect, MobEffectData>);
impl ActiveEffects {
pub fn insert(&mut self, effect: MobEffect, data: MobEffectData) {