[PR #1546] [MERGED] Read enchantment ids without a namespace as minecraft ones #3577

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

📋 Pull Request Information

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

Base: main ← Head: fix/kb1-enchantment-ids


📝 Commits (1)

  • 4507ded Read enchantment ids without a namespace as minecraft ones

📊 Changes

1 file changed (+23 additions, -15 deletions)

View changed files

📝 crates/horizon-client/src/item_data.rs (+23 -15)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

Item components read their enchantment keys as Identifiers, so knockback is minecraft:knockback. This also merges the old {levels: {...}} branch into the same loop.

Why

/give @s wooden_sword[enchantments={knockback:2}] (vanilla's own syntax works without the namespace) gave a sword whose enchantment no lookup found. It pushed like a plain sword: 0.4 where vanilla gives 1.2, measured on a cow through a dedicated server. The same goes for any enchantment written without minecraft:.

How tested

$ cargo fmt --all -- --check                                   # clean
$ cargo clippy --workspace --all-targets -- -D warnings        # clean (on each branch alone and on the integration commit of all six)
$ cargo test -p horizon-client                                 # 1205 passed, 0 failed (integration commit)
  (new: item_data::tests::enchantment_ids_without_a_namespace_are_minecraft_ones; fails on main: level 0)
$ python3 tools/parity.py --changed origin/main                # 107 passed, 0 failed (integration commit of all six)

🤖 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/1546 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/kb1-enchantment-ids` --- ### 📝 Commits (1) - [`4507ded`](https://github.com/horizon-rust/horizon/commit/4507ded0e480f1de9d6bbe8f7b2104e0c17cf06b) Read enchantment ids without a namespace as minecraft ones ### 📊 Changes **1 file changed** (+23 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/item_data.rs` (+23 -15) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Item components read their enchantment keys as Identifiers, so `knockback` is `minecraft:knockback`. This also merges the old `{levels: {...}}` branch into the same loop. ## Why `/give @s wooden_sword[enchantments={knockback:2}]` (vanilla's own syntax works without the namespace) gave a sword whose enchantment no lookup found. It pushed like a plain sword: 0.4 where vanilla gives 1.2, measured on a cow through a dedicated server. The same goes for any enchantment written without `minecraft:`. ## How tested ``` $ cargo fmt --all -- --check # clean $ cargo clippy --workspace --all-targets -- -D warnings # clean (on each branch alone and on the integration commit of all six) $ cargo test -p horizon-client # 1205 passed, 0 failed (integration commit) (new: item_data::tests::enchantment_ids_without_a_namespace_are_minecraft_ones; fails on main: level 0) $ python3 tools/parity.py --changed origin/main # 107 passed, 0 failed (integration commit of all six) ``` 🤖 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 04:10:33 +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#3577
No description provided.