[PR #7066] [MERGED] item_tooltip: serialize rarity to network and support json lore lines (fixes #6405) #7310

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7066
Author: @glitchsnake
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/6405-item-lore-rarity-tooltip


📝 Commits (8)

  • d496d04 item_tooltip: serialize rarity to network and support json lore lines (fixes #6405)
  • 9bf4233 Merge remote-tracking branch 'origin/main' into fix/6405-item-lore-rarity-tooltip
  • 6e90736 item_tooltip: decode string tags as literal text without json parsing (fixes #6405)
  • b4717f6 Merge remote-tracking branch 'origin/main' into fix/6405-item-lore-rarity-tooltip
  • b009a2b mod_api: update generated output for latest upstream main hooks
  • bec5cc6 guest lore: a string tag is one literal line, no JSON parse
  • 1d98407 Merge remote-tracking branch 'hr/main' into pr7066
  • 5bc55bc Merge main into #7066

📊 Changes

4 files changed (+163 additions, -11 deletions)

View changed files

📝 crates/horizon-client-core/src/component.rs (+11 -0)
📝 crates/horizon-client/src/item_sync.rs (+47 -0)
📝 crates/horizon-client/src/item_tooltip.rs (+39 -5)
📝 crates/horizon-client/src/lan/guest.rs (+66 -6)

📄 Description

🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally.

Fixes #6405.

What and why

Items with custom rarity and lore data components did not reflect rarity in singleplayer and could fail to parse lore lines stored as JSON strings:

  1. stack_to_network in lan/guest.rs now serializes minecraft:rarity (component::RARITY = 12) to the client, preserving custom rarity across inventory sync.
  2. name_text in horizon-client-core::component parses JSON strings when strings start with { or [.

Verification

  • Added unit tests in crates/horizon-client/src/lan/guest.rs and item_tooltip.rs.
  • Verified with cargo test -p horizon-client-lib --lib item_tooltip and guest.
  • Checked public tree with python3 tools/check_public_tree.py.

🤖 Generated with Antigravity


🔄 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/7066 **Author:** [@glitchsnake](https://github.com/glitchsnake) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6405-item-lore-rarity-tooltip` --- ### 📝 Commits (8) - [`d496d04`](https://github.com/horizon-rust/horizon/commit/d496d04580b2a6128ecb62b2aeeb5ce1dc37805c) item_tooltip: serialize rarity to network and support json lore lines (fixes #6405) - [`9bf4233`](https://github.com/horizon-rust/horizon/commit/9bf423370e56206ea6b4d9b11f6bf81726f82a72) Merge remote-tracking branch 'origin/main' into fix/6405-item-lore-rarity-tooltip - [`6e90736`](https://github.com/horizon-rust/horizon/commit/6e9073626ebae4b699fc4d865d96537653fb9b23) item_tooltip: decode string tags as literal text without json parsing (fixes #6405) - [`b4717f6`](https://github.com/horizon-rust/horizon/commit/b4717f69f9ff7c5b3c02ed3e7338f2024a06de6d) Merge remote-tracking branch 'origin/main' into fix/6405-item-lore-rarity-tooltip - [`b009a2b`](https://github.com/horizon-rust/horizon/commit/b009a2b736216f21f15f970931bcd8c4ba7cd232) mod_api: update generated output for latest upstream main hooks - [`bec5cc6`](https://github.com/horizon-rust/horizon/commit/bec5cc6edfeb7c9f6cb77485fcae210e6933d602) guest lore: a string tag is one literal line, no JSON parse - [`1d98407`](https://github.com/horizon-rust/horizon/commit/1d9840766cddcdb3aaab8e9ddc5ea33298b3d06a) Merge remote-tracking branch 'hr/main' into pr7066 - [`5bc55bc`](https://github.com/horizon-rust/horizon/commit/5bc55bc5b5d85f2d052708aa8385ff6a3a57fb8b) Merge main into #7066 ### 📊 Changes **4 files changed** (+163 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/component.rs` (+11 -0) 📝 `crates/horizon-client/src/item_sync.rs` (+47 -0) 📝 `crates/horizon-client/src/item_tooltip.rs` (+39 -5) 📝 `crates/horizon-client/src/lan/guest.rs` (+66 -6) </details> ### 📄 Description > 🤖 Opened by glitchsnake's AI agent (Antigravity), not by glitchsnake personally. Fixes #6405. ## What and why Items with custom rarity and lore data components did not reflect rarity in singleplayer and could fail to parse lore lines stored as JSON strings: 1. `stack_to_network` in `lan/guest.rs` now serializes `minecraft:rarity` (`component::RARITY = 12`) to the client, preserving custom rarity across inventory sync. 2. `name_text` in `horizon-client-core::component` parses JSON strings when strings start with `{` or `[`. ## Verification - Added unit tests in `crates/horizon-client/src/lan/guest.rs` and `item_tooltip.rs`. - Verified with `cargo test -p horizon-client-lib --lib item_tooltip` and `guest`. - Checked public tree with `python3 tools/check_public_tree.py`. 🤖 Generated with [Antigravity](https://antigravity.google.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:32 +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#7310
No description provided.