[PR #5295] [MERGED] Piglin brutes pick up a golden axe; piglins admire a loved item they only see #6193

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5295
Author: @xFedeT
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/piglin-admire-seen-brute-pickup


📝 Commits (2)

  • c7ddfb8 Piglin brutes pick up a golden axe; piglins admire a loved item they only see
  • 932b14d Merge main into #5295 (main's clippy fix 825a6bbcf)

📊 Changes

3 files changed (+164 additions, -16 deletions)

View changed files

📝 crates/horizon-client/src/game/piglins.rs (+18 -9)
📝 crates/horizon-client/src/mobs/equip.rs (+25 -1)
📝 crates/horizon-client/src/mobs/piglin.rs (+121 -6)

📄 Description

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

Refs #3513. Closes the last two rows of that list: PiglinBrute.wantsToPickUp and StartAdmiringItemIfSeen.create.

What changes

  • Piglin brute (PiglinBrute.wantsToPickUp): a brute picks up a golden axe lying within Mob.ITEM_PICKUP_REACH and nothing else. It goes through the same Mob.aiStep looting loop and equipItemIfPossible / canReplaceCurrentItem as other mobs (mobs/equip.rs::wants_to_pick_up).
  • Admiring an item that is only seen (StartAdmiringItemIfSeen.create(119), StopAdmiringIfItemTooFarAway.create(9), StopAdmiringIfTiredOfTryingToReachItem.create(200, 200)):
    • A piglin whose nearest visible wanted item is a #piglin_loved item sets ADMIRING_ITEM for 119 ticks (unless it already has it, ADMIRING_DISABLED or DISABLE_WALK_TO_ADMIRE_ITEM).
    • While it is set the admire activity runs: the idle and fight behaviours stand by (AdmireSeen goal) and the piglin walks to the item; the admiring grunt plays when the activity changes.
    • It ends when the item is gone or 9 blocks away, or after 200 ticks of trying to reach it, which also disables the walk for 200 ticks.
    • A blow (PiglinAi.wasHurtBy) erases the memory, and a player's blow also sets ADMIRING_DISABLED for 400 ticks. canAdmire (gold from the hand) honours both. This replaces a check on egg_time, which nothing set for piglins.

Verification

  • mobs::piglin::tests::a_loved_item_in_sight_is_admired_until_too_far_or_too_long follows the three behaviours above on the memories; the_pickup_gate_follows_the_species_overrides has the brute's golden axe rule.
  • Parity harnesses mob_ai, mob_attributes, entity_death_loot pass.
  • pr_ready --quick: everything passes except 7 lan_bot integration tests, which fail the same way on a clean origin/main on this machine (8 there).

🤖 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/5295 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/piglin-admire-seen-brute-pickup` --- ### 📝 Commits (2) - [`c7ddfb8`](https://github.com/horizon-rust/horizon/commit/c7ddfb8ebcd09fcc76c6249324797e914cade0f2) Piglin brutes pick up a golden axe; piglins admire a loved item they only see - [`932b14d`](https://github.com/horizon-rust/horizon/commit/932b14d591f998cb483a618129b67acd0a73c54f) Merge main into #5295 (main's clippy fix 825a6bbcf) ### 📊 Changes **3 files changed** (+164 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/piglins.rs` (+18 -9) 📝 `crates/horizon-client/src/mobs/equip.rs` (+25 -1) 📝 `crates/horizon-client/src/mobs/piglin.rs` (+121 -6) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally. Refs #3513. Closes the last two rows of that list: `PiglinBrute.wantsToPickUp` and `StartAdmiringItemIfSeen.create`. ## What changes - **Piglin brute** (`PiglinBrute.wantsToPickUp`): a brute picks up a golden axe lying within `Mob.ITEM_PICKUP_REACH` and nothing else. It goes through the same `Mob.aiStep` looting loop and `equipItemIfPossible` / `canReplaceCurrentItem` as other mobs (`mobs/equip.rs::wants_to_pick_up`). - **Admiring an item that is only seen** (`StartAdmiringItemIfSeen.create(119)`, `StopAdmiringIfItemTooFarAway.create(9)`, `StopAdmiringIfTiredOfTryingToReachItem.create(200, 200)`): - A piglin whose nearest visible wanted item is a `#piglin_loved` item sets `ADMIRING_ITEM` for 119 ticks (unless it already has it, `ADMIRING_DISABLED` or `DISABLE_WALK_TO_ADMIRE_ITEM`). - While it is set the admire activity runs: the idle and fight behaviours stand by (`AdmireSeen` goal) and the piglin walks to the item; the admiring grunt plays when the activity changes. - It ends when the item is gone or 9 blocks away, or after 200 ticks of trying to reach it, which also disables the walk for 200 ticks. - A blow (`PiglinAi.wasHurtBy`) erases the memory, and a player's blow also sets `ADMIRING_DISABLED` for 400 ticks. `canAdmire` (gold from the hand) honours both. This replaces a check on `egg_time`, which nothing set for piglins. ## Verification - `mobs::piglin::tests::a_loved_item_in_sight_is_admired_until_too_far_or_too_long` follows the three behaviours above on the memories; `the_pickup_gate_follows_the_species_overrides` has the brute's golden axe rule. - Parity harnesses `mob_ai`, `mob_attributes`, `entity_death_loot` pass. - `pr_ready --quick`: everything passes except 7 `lan_bot` integration tests, which fail the same way on a clean `origin/main` on this machine (8 there). 🤖 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>
bsakaguchi 2026-11-03 06:15:45 +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#6193
No description provided.