From 575cef1d26a290eec7536f4a7fe081771d44a732 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Mon, 26 Oct 2026 19:30:38 +0100 Subject: [PATCH] Let a vindicator named Johnny attack other raiders too Vanilla's Johnny goal targets any living entity that can be attacked. Horizon skipped pillagers, vindicators, witches, evokers, illusioners and ravagers, so Johnny left them alone. Remove that filter. --- crates/horizon-client/src/mobs/illager.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/crates/horizon-client/src/mobs/illager.rs b/crates/horizon-client/src/mobs/illager.rs index 45ef076d3..c4693c182 100644 --- a/crates/horizon-client/src/mobs/illager.rs +++ b/crates/horizon-client/src/mobs/illager.rs @@ -13,18 +13,6 @@ use horizon_core::geometry::trig::Mth; use horizon_core::{geometry::Vec3, random::RandomSource}; use std::f32::consts::PI; -/// The species raiders do not fight (`Raider`'s allies). -fn raider(s: Species) -> bool { - matches!( - s, - Species::Pillager - | Species::Vindicator - | Species::Witch - | Species::Evoker - | Species::Illusioner - | Species::Ravager - ) -} fn targets(m: &mut Mob, villagers_seen: bool) { let mut hurt = HurtByTarget::new().alert(); hurt.ignore = vec![ @@ -78,10 +66,11 @@ pub fn register_vindicator(m: &mut Mob) { g.add(9, LookAtPlayer::new(3.0).probability(1.0)); g.add(10, LookAtPlayer::mobs(8.0)); targets(m, true); - // VindicatorJohnnyAttackGoal: a vindicator named Johnny attacks anything. + // VindicatorJohnnyAttackGoal: a vindicator named Johnny attacks any + // living entity, other raiders included. m.ai.targets.add( 4, - NearestTarget::new(Prey::Filter(|s| !raider(s.species)), true) + NearestTarget::new(Prey::Filter(|_| true), true) .interval(0) .when(|m, _| m.custom_name.as_deref() == Some("Johnny")), );