[PR #2233] [MERGED] Fire the enchanted_item advancement trigger at the enchanting table #4127

Closed
opened 2026-11-03 04:14:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/enchanted-item-trigger


📝 Commits (4)

  • 20630b1 Fire the enchanted_item trigger when an enchanting table enchants
  • 27671ea Merge origin/main into fix/enchanted-item-trigger
  • 4dec228 Merge origin/main into fix/enchanted-item-trigger
  • 05f3355 Merge origin/main into fix/enchanted-item-trigger

📊 Changes

4 files changed (+21 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/advancements.rs (+1 -1)
📝 crates/horizon-client/src/game/advancements.rs (+16 -0)
📝 crates/horizon-client/src/game/lan_stations.rs (+2 -0)
📝 crates/horizon-client/src/game/stations.rs (+2 -0)

📄 Description

What and why

Enchanting an item at an enchanting table never fired the minecraft:enchanted_item trigger, so "Enchanter" (story/enchant_item) could not be earned.

The trigger now fires after the table enchants, with the enchanted item and the number of levels it cost (1 to 3, the button used). On a server it runs as the guest, so it goes to the guest's advancements.

Vanilla reference

  • EnchantmentMenu.clickMenuButton: CriteriaTriggers.ENCHANTED_ITEM.trigger(serverPlayer, enchantmentItem, enchantmentCost) right after awardStat(ENCHANT_ITEM).
  • EnchantedItemTrigger.TriggerInstance.matches: item and levels conditions.

Self-check

cargo check -p horizon-client passes.


🔄 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/2233 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/enchanted-item-trigger` --- ### 📝 Commits (4) - [`20630b1`](https://github.com/horizon-rust/horizon/commit/20630b1230e5b097631a2275adc5339669e7a7f9) Fire the enchanted_item trigger when an enchanting table enchants - [`27671ea`](https://github.com/horizon-rust/horizon/commit/27671eac9b5794533591475c93d6e65d5d3a29ca) Merge origin/main into fix/enchanted-item-trigger - [`4dec228`](https://github.com/horizon-rust/horizon/commit/4dec228d0c200d98d263e4afb25728ef51ed3560) Merge origin/main into fix/enchanted-item-trigger - [`05f3355`](https://github.com/horizon-rust/horizon/commit/05f3355c57f1c13f5a29745bc3fa64b772b4fc5b) Merge origin/main into fix/enchanted-item-trigger ### 📊 Changes **4 files changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/advancements.rs` (+1 -1) 📝 `crates/horizon-client/src/game/advancements.rs` (+16 -0) 📝 `crates/horizon-client/src/game/lan_stations.rs` (+2 -0) 📝 `crates/horizon-client/src/game/stations.rs` (+2 -0) </details> ### 📄 Description ## What and why Enchanting an item at an enchanting table never fired the `minecraft:enchanted_item` trigger, so "Enchanter" (`story/enchant_item`) could not be earned. The trigger now fires after the table enchants, with the enchanted item and the number of levels it cost (1 to 3, the button used). On a server it runs as the guest, so it goes to the guest's advancements. ## Vanilla reference - `EnchantmentMenu.clickMenuButton`: `CriteriaTriggers.ENCHANTED_ITEM.trigger(serverPlayer, enchantmentItem, enchantmentCost)` right after `awardStat(ENCHANT_ITEM)`. - `EnchantedItemTrigger.TriggerInstance.matches`: `item` and `levels` conditions. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:52 +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#4127
No description provided.