From b77301b6ebe718ef9a595555c5939bfff9710d36 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:27:44 +0100 Subject: [PATCH] Let an allay wander up to 16 blocks from its player StayCloseToTarget only pulls an allay back once its target is 16 blocks away (closerThan(tooFar)); Horizon pulled it back beyond 4. --- crates/horizon-client/src/mobs/allay.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/src/mobs/allay.rs b/crates/horizon-client/src/mobs/allay.rs index 22461945d..ebc53ae49 100644 --- a/crates/horizon-client/src/mobs/allay.rs +++ b/crates/horizon-client/src/mobs/allay.rs @@ -95,7 +95,8 @@ impl Goal for Deliver { } } } -/// `StayCloseToTarget`: back within 4 blocks of the deposit. +/// `StayCloseToTarget.create(.., 4, 16, 2.25)`: acts only once the deposit is +/// 16 blocks away or more, then walks until within 4. #[derive(Clone, Debug)] struct StayClose; impl Goal for StayClose { @@ -109,7 +110,7 @@ impl Goal for StayClose { let d = (p[0] - m.position.x).powi(2) + (p[1] - m.position.y).powi(2) + (p[2] - m.position.z).powi(2); - d > 16.0 + d >= 256.0 }) } fn tick(&mut self, m: &mut Mob, cx: &mut Cx) {