Skip to main content

steel_core/entity/mob_effect/
bad_omen.rs

1//! `BadOmenMobEffect` behavior.
2
3use super::MobEffectBehavior;
4use crate::entity::LivingEntity;
5use crate::world::World;
6
7/// Mirrors vanilla `BadOmenMobEffect`.
8///
9// TODO: `applyEffectTick` checks the mob is a non-spectator `ServerPlayer`
10// standing in a village (`ServerLevel.isVillage`) with no raid already at its
11// max omen level, then starts/extends a `Raid`
12pub struct BadOmenBehavior;
13
14impl MobEffectBehavior for BadOmenBehavior {
15    fn should_apply_effect_tick_this_tick(&self, _tick_count: i32, _amplifier: i32) -> bool {
16        true
17    }
18
19    fn apply_effect_tick(&self, _world: &World, _user: &dyn LivingEntity, _amplifier: i32) -> bool {
20        true
21    }
22}