[PR #2975] [MERGED] Fire lightning, spear, nest, shear, allay and sculk advancement triggers #4729

Closed
opened 2026-11-03 05:07:30 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2975
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/advancement-triggers-small


📝 Commits (9)

  • 16cda16 Fire lightning_strike and channeled_lightning for the right players
  • 3c72bf2 Fire spear_mobs when a spear stabs several mobs in one use
  • 079963f Fire bee_nest_destroyed with the bees left inside
  • 1727f2a Fire player_sheared_equipment when wolf armour is sheared off
  • 6489cdf Fire player_interacted_with_entity for leashing, feeding and repairing
  • 39327fc Fire allay_drop_item_on_block when an allay drops at the liked block
  • 3cf601f Fire kill_mob_near_sculk_catalyst for the player who hurt the mob
  • 7aaa4b4 Fire avoid_vibration when a sneaking step is ignored
  • c3e1997 Fire item_used_on_block for a compass used on a lodestone

📊 Changes

11 files changed (+316 additions, -43 deletions)

View changed files

📝 crates/horizon-client/src/advancements.rs (+8 -1)
📝 crates/horizon-client/src/game.rs (+8 -5)
📝 crates/horizon-client/src/game/advancements.rs (+112 -3)
📝 crates/horizon-client/src/game/allays.rs (+24 -7)
📝 crates/horizon-client/src/game/creatures.rs (+35 -2)
📝 crates/horizon-client/src/game/lightning.rs (+72 -8)
📝 crates/horizon-client/src/game/maps.rs (+1 -0)
📝 crates/horizon-client/src/game/sculk.rs (+16 -1)
📝 crates/horizon-client/src/game/spear.rs (+3 -0)
📝 crates/horizon-client/src/game/trident.rs (+16 -9)
📝 crates/horizon-client/src/mobs/warden.rs (+21 -7)

📄 Description

What and why

Several advancements could never be finished in Horizon because their trigger was never fired, or was fired for the wrong player or condition:

  • Lightning: a bolt that burns out now fires "lightning strike" for players within 256 blocks (mobs around it that it missed are checked as bystanders, and a bolt's fires are counted). A channelled bolt fires "channeled lightning" for the player who channelled it. The lightning-rod/no-fire advancement no longer passes for every bolt.
  • Spears: stabbing five or more mobs in one use fires "spear mobs".
  • Beehives: breaking a bee nest with silk touch fires "bee nest destroyed" with the bees left inside.
  • Wolf armour: shearing it off a wolf fires "player sheared equipment". A wolf's armour now counts as its body slot with its durability, and item predicates check the damage component (needed for the repair advancement).
  • Interactions: leashing, feeding a baby sniffer and repairing wolf armour fire "player interacted with entity". Guests' item interactions used to skip this trigger.
  • Allays: an item thrown to the liked note block fires "allay drop item on block".
  • Sculk: a mob whose experience a catalyst takes fires "kill mob near sculk catalyst" for the player who hurt it. A sneaking player whose step a sensor or warden ignores fires "avoid vibration".
  • Lodestone: using a compass on a lodestone fires "item used on block".

Vanilla reference

  • LightningBolt.java:139 (lightning_strike at discard, 256 blocks, 15/21 box), :170 (channeled_lightning)
  • KineticWeapon.java:142 (spear_mobs, stabbedEntities count)
  • BeehiveBlock.java:96 (bee_nest_destroyed, after emptyAllLivingFromHive)
  • Mob.java:617 (shearItem, player_sheared_equipment)
  • AllayAi.java:175 (allay_drop_item_on_block)
  • SculkCatalystBlockEntity.java:86-92 (kill_mob_near_sculk_catalyst)
  • VibrationSystem.java:416 and Warden.java canTriggerAvoidVibration (avoid_vibration)
  • ItemUsedOnLocationTrigger via ServerPlayerGameMode (item_used_on_block)

Not done: thrown_item_picked_up_by_player (allay deliver). Dropped items record only a player's UUID, so an allay thrower cannot be identified yet.

Self-check

clippy and fmt pass for horizon-client. Not run in game.


🔄 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/2975 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/advancement-triggers-small` --- ### 📝 Commits (9) - [`16cda16`](https://github.com/horizon-rust/horizon/commit/16cda1637bdae385d9e1dfbce2ed41cf9f377053) Fire lightning_strike and channeled_lightning for the right players - [`3c72bf2`](https://github.com/horizon-rust/horizon/commit/3c72bf2d791ff71e0751658f5ffa69dea1865d85) Fire spear_mobs when a spear stabs several mobs in one use - [`079963f`](https://github.com/horizon-rust/horizon/commit/079963f27e399fd88f8d55c9d567d3ef4b350319) Fire bee_nest_destroyed with the bees left inside - [`1727f2a`](https://github.com/horizon-rust/horizon/commit/1727f2acf1c35a7283ac7cd55c7d66276588868d) Fire player_sheared_equipment when wolf armour is sheared off - [`6489cdf`](https://github.com/horizon-rust/horizon/commit/6489cdf8295b4db51b94bfb7c12e37faa3c52d60) Fire player_interacted_with_entity for leashing, feeding and repairing - [`39327fc`](https://github.com/horizon-rust/horizon/commit/39327fca33a9cfc8b3d1f44ccca6119a0afbace3) Fire allay_drop_item_on_block when an allay drops at the liked block - [`3cf601f`](https://github.com/horizon-rust/horizon/commit/3cf601f7607e7f743d8caec7a0ab0be7d3c0c338) Fire kill_mob_near_sculk_catalyst for the player who hurt the mob - [`7aaa4b4`](https://github.com/horizon-rust/horizon/commit/7aaa4b433bddfd8be7ea1ebabc21329e183e2bb1) Fire avoid_vibration when a sneaking step is ignored - [`c3e1997`](https://github.com/horizon-rust/horizon/commit/c3e19973cf424ab77b8259f25fd32af6d0b992a4) Fire item_used_on_block for a compass used on a lodestone ### 📊 Changes **11 files changed** (+316 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/advancements.rs` (+8 -1) 📝 `crates/horizon-client/src/game.rs` (+8 -5) 📝 `crates/horizon-client/src/game/advancements.rs` (+112 -3) 📝 `crates/horizon-client/src/game/allays.rs` (+24 -7) 📝 `crates/horizon-client/src/game/creatures.rs` (+35 -2) 📝 `crates/horizon-client/src/game/lightning.rs` (+72 -8) 📝 `crates/horizon-client/src/game/maps.rs` (+1 -0) 📝 `crates/horizon-client/src/game/sculk.rs` (+16 -1) 📝 `crates/horizon-client/src/game/spear.rs` (+3 -0) 📝 `crates/horizon-client/src/game/trident.rs` (+16 -9) 📝 `crates/horizon-client/src/mobs/warden.rs` (+21 -7) </details> ### 📄 Description ## What and why Several advancements could never be finished in Horizon because their trigger was never fired, or was fired for the wrong player or condition: - Lightning: a bolt that burns out now fires "lightning strike" for players within 256 blocks (mobs around it that it missed are checked as bystanders, and a bolt's fires are counted). A channelled bolt fires "channeled lightning" for the player who channelled it. The lightning-rod/no-fire advancement no longer passes for every bolt. - Spears: stabbing five or more mobs in one use fires "spear mobs". - Beehives: breaking a bee nest with silk touch fires "bee nest destroyed" with the bees left inside. - Wolf armour: shearing it off a wolf fires "player sheared equipment". A wolf's armour now counts as its body slot with its durability, and item predicates check the damage component (needed for the repair advancement). - Interactions: leashing, feeding a baby sniffer and repairing wolf armour fire "player interacted with entity". Guests' item interactions used to skip this trigger. - Allays: an item thrown to the liked note block fires "allay drop item on block". - Sculk: a mob whose experience a catalyst takes fires "kill mob near sculk catalyst" for the player who hurt it. A sneaking player whose step a sensor or warden ignores fires "avoid vibration". - Lodestone: using a compass on a lodestone fires "item used on block". ## Vanilla reference - LightningBolt.java:139 (lightning_strike at discard, 256 blocks, 15/21 box), :170 (channeled_lightning) - KineticWeapon.java:142 (spear_mobs, stabbedEntities count) - BeehiveBlock.java:96 (bee_nest_destroyed, after emptyAllLivingFromHive) - Mob.java:617 (shearItem, player_sheared_equipment) - AllayAi.java:175 (allay_drop_item_on_block) - SculkCatalystBlockEntity.java:86-92 (kill_mob_near_sculk_catalyst) - VibrationSystem.java:416 and Warden.java canTriggerAvoidVibration (avoid_vibration) - ItemUsedOnLocationTrigger via ServerPlayerGameMode (item_used_on_block) Not done: thrown_item_picked_up_by_player (allay deliver). Dropped items record only a player's UUID, so an allay thrower cannot be identified yet. ## Self-check clippy and fmt pass for horizon-client. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:30 +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#4729
No description provided.