[PR #6218] [MERGED] Give an endermite its own goal list #6723

Closed
opened 2026-11-03 06:25:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6218
Author: @MSedgeMC
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/endermite-goals


📝 Commits (1)

  • 38f7feb Give an endermite its own goal list

📊 Changes

2 files changed (+45 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs/ai.rs (+32 -1)
📝 crates/horizon-client/src/mobs/hostile.rs (+13 -0)

📄 Description

Endermite.registerGoals:

// javap -p -c on Endermite
 1: new FloatGoal                          addGoal(1, ..)
21: new ClimbOnTopOfPowderSnowGoal         addGoal(1, ..)
41: new MeleeAttackGoal(this, 1.0, false)  addGoal(2, ..)
59: new WaterAvoidingRandomStrollGoal(1.0) addGoal(3, ..)
77: new LookAtPlayerGoal(Player, 8.0)      addGoal(7, ..)
98: new RandomLookAroundGoal               addGoal(8, ..)
114: new HurtByTargetGoal().setAlertOthers()  targets addGoal(1, ..)
141: new NearestAttackableTargetGoal(Player, true)  targets addGoal(2, ..)

Horizon's family() did not list Endermite under Family::Hostile, so it took the
generic monster fallback: Stroll::avoiding_water(0.8) at priority 5 instead of 1.0 at 3, no
ClimbOnTopOfPowderSnow, LookAtPlayer/RandomLookAround at 6, and a plain
HurtByTarget::new() with no .alert(), so a hurt endermite never woke the others.

Proven: on the build VM, cargo test -q -p horizon-client --lib an_endermite_takes_the_hostile_goal_list
→ 1 passed (family, powder-snow climb, stroll, alerting hurt-by-target, player target), and
cargo clippy -q -p horizon-client --lib --tests -- -D warnings → clean.

Not proven: not checked in game; the visible check is an endermite walking onto powder snow
and a second endermite joining a fight after the first is hit.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6218 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/endermite-goals` --- ### 📝 Commits (1) - [`38f7feb`](https://github.com/horizon-rust/horizon/commit/38f7febdc4f54be407f06918ea1c3642c6e1f4b1) Give an endermite its own goal list ### 📊 Changes **2 files changed** (+45 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/ai.rs` (+32 -1) 📝 `crates/horizon-client/src/mobs/hostile.rs` (+13 -0) </details> ### 📄 Description `Endermite.registerGoals`: ```java // javap -p -c on Endermite 1: new FloatGoal addGoal(1, ..) 21: new ClimbOnTopOfPowderSnowGoal addGoal(1, ..) 41: new MeleeAttackGoal(this, 1.0, false) addGoal(2, ..) 59: new WaterAvoidingRandomStrollGoal(1.0) addGoal(3, ..) 77: new LookAtPlayerGoal(Player, 8.0) addGoal(7, ..) 98: new RandomLookAroundGoal addGoal(8, ..) 114: new HurtByTargetGoal().setAlertOthers() targets addGoal(1, ..) 141: new NearestAttackableTargetGoal(Player, true) targets addGoal(2, ..) ``` Horizon's `family()` did not list `Endermite` under `Family::Hostile`, so it took the generic monster fallback: `Stroll::avoiding_water(0.8)` at priority 5 instead of 1.0 at 3, no `ClimbOnTopOfPowderSnow`, `LookAtPlayer`/`RandomLookAround` at 6, and a plain `HurtByTarget::new()` with no `.alert()`, so a hurt endermite never woke the others. **Proven:** on the build VM, `cargo test -q -p horizon-client --lib an_endermite_takes_the_hostile_goal_list` → `1 passed` (family, powder-snow climb, stroll, alerting hurt-by-target, player target), and `cargo clippy -q -p horizon-client --lib --tests -- -D warnings` → clean. **Not proven:** not checked in game; the visible check is an endermite walking onto powder snow and a second endermite joining a fight after the first is hit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:25:28 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6723
No description provided.