[PR #7806] A hit piglin brute calls the piglins around it #7836

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7806
Author: @xFedeT
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/piglin-brute-broadcast


📝 Commits (1)

  • 6bcd48b A hit piglin brute calls the piglins around it, as maybeRetaliate does

📊 Changes

1 file changed (+59 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/mobs/piglin.rs (+59 -5)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Fixes #7790

PiglinBruteAi.wasHurtBy is PiglinAi.maybeRetaliate: unless the attacker is an AbstractPiglin, the brute takes the attacker as its anger target and broadcastAngerTarget calls every adult piglin in NEARBY_ADULT_PIGLINS (the regular piglins and the brutes) to it. Horizon sent a brute's hit only through its HurtByTarget goal, which alerts mobs of the same species, so the other brutes joined and the regular piglins did not.

In piglin_hurt (a brute goes through it too), an adult that maybeRetaliate lets retaliate now calls broadcast_anger, as a hit baby already did; a brute hit by another brute or a piglin ignores it, as PiglinBruteAi.wasHurtBy does. A regular adult piglin gets the same broadcast, which vanilla's maybeRetaliate also does.

Test: a_brute_hit_by_the_player_calls_the_piglins_around_it (fails without the change; needs the vanilla data in .local/, like the other mob world tests). cargo test -p horizon-client-lib --lib piglin, clippy. Not tried in game.

🤖 Generated with Claude Code


🔄 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/7806 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/piglin-brute-broadcast` --- ### 📝 Commits (1) - [`6bcd48b`](https://github.com/horizon-rust/horizon/commit/6bcd48bc6678bb0c1aad469e1dcebaf8ffe7bf23) A hit piglin brute calls the piglins around it, as maybeRetaliate does ### 📊 Changes **1 file changed** (+59 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/piglin.rs` (+59 -5) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #7790 `PiglinBruteAi.wasHurtBy` is `PiglinAi.maybeRetaliate`: unless the attacker is an `AbstractPiglin`, the brute takes the attacker as its anger target and `broadcastAngerTarget` calls every adult piglin in `NEARBY_ADULT_PIGLINS` (the regular piglins and the brutes) to it. Horizon sent a brute's hit only through its `HurtByTarget` goal, which alerts mobs of the same species, so the other brutes joined and the regular piglins did not. In `piglin_hurt` (a brute goes through it too), an adult that `maybeRetaliate` lets retaliate now calls `broadcast_anger`, as a hit baby already did; a brute hit by another brute or a piglin ignores it, as `PiglinBruteAi.wasHurtBy` does. A regular adult piglin gets the same broadcast, which vanilla's `maybeRetaliate` also does. Test: `a_brute_hit_by_the_player_calls_the_piglins_around_it` (fails without the change; needs the vanilla data in `.local/`, like the other mob world tests). `cargo test -p horizon-client-lib --lib piglin`, clippy. Not tried in game. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7836
No description provided.