[PR #6228] [MERGED] Stop a witch from turning on the raider that hit it #6730

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

📋 Pull Request Information

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

Base: main ← Head: fix/witch-ignore-raiders


📝 Commits (1)

  • 2157715 Stop a witch from turning on the raider that hit it

📊 Changes

2 files changed (+58 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/mobs/raider.rs (+12 -9)
📝 crates/horizon-client/src/mobs/witch.rs (+46 -1)

📄 Description

Witch.registerGoals builds its hurt-by goal with the Raider class:

// javap -p -c on Witch, in registerGoals
135: getfield targetSelector
138: iconst_1
139: new          HurtByTargetGoal
144: iconst_1  145: anewarray Class
149: iconst_0  150: ldc       class net/minecraft/world/entity/raid/Raider
153: invokespecial HurtByTargetGoal.<init>:(PathfinderMob, Class[])

Horizon added a plain HurtByTarget::new(), so any raider that damaged a witch — a stray
pillager arrow, an evoker's own fangs, another witch's splash potion — became its target and
the raid fought itself.

Proven: on the build VM, cargo test -q -p horizon-client --lib mobs::witch::tests → 2 passed:
the witch's goal ignores exactly the six Raider species (and not a vex or a zombie), and the
hoisted raider::RAIDERS agrees with is_raider for every species.

Not proven: not checked in game; the visible check is a raid where a witch is caught in
another raider's splash potion and keeps healing instead of retaliating.

One thing deliberately unchanged: the illager family keeps its own ignore list (the six raiders
plus Vex), which is not vanilla's Raider class — this PR hoists only the list the witch needs
and leaves the illagers' extra exemption alone.


🔄 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/6228 **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/witch-ignore-raiders` --- ### 📝 Commits (1) - [`2157715`](https://github.com/horizon-rust/horizon/commit/21577156506a7714cff46361b225824b57970b28) Stop a witch from turning on the raider that hit it ### 📊 Changes **2 files changed** (+58 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/raider.rs` (+12 -9) 📝 `crates/horizon-client/src/mobs/witch.rs` (+46 -1) </details> ### 📄 Description `Witch.registerGoals` builds its hurt-by goal with the `Raider` class: ```java // javap -p -c on Witch, in registerGoals 135: getfield targetSelector 138: iconst_1 139: new HurtByTargetGoal 144: iconst_1 145: anewarray Class 149: iconst_0 150: ldc class net/minecraft/world/entity/raid/Raider 153: invokespecial HurtByTargetGoal.<init>:(PathfinderMob, Class[]) ``` Horizon added a plain `HurtByTarget::new()`, so any raider that damaged a witch — a stray pillager arrow, an evoker's own fangs, another witch's splash potion — became its target and the raid fought itself. **Proven:** on the build VM, `cargo test -q -p horizon-client --lib mobs::witch::tests` → `2 passed`: the witch's goal ignores exactly the six `Raider` species (and not a vex or a zombie), and the hoisted `raider::RAIDERS` agrees with `is_raider` for every species. **Not proven:** not checked in game; the visible check is a raid where a witch is caught in another raider's splash potion and keeps healing instead of retaliating. One thing deliberately unchanged: the illager family keeps its own ignore list (the six raiders plus `Vex`), which is not vanilla's `Raider` class — this PR hoists only the list the witch needs and leaves the illagers' extra exemption alone. --- <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:42 +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#6730
No description provided.