From 1accbac964168af5fa0d87cb170389f0a9d01363 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Mon, 12 Jan 2026 02:09:41 -0600 Subject: 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 --- azalea-entity/src/effects.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-entity/src/effects.rs') 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); impl ActiveEffects { pub fn insert(&mut self, effect: MobEffect, data: MobEffectData) { -- cgit v1.2.3