[PR #4708] [MERGED] Compile selector and nbt entity strings when decoding text components #5797

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4708
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/32-compstr


📝 Commits (1)

  • 4fa5525 Compile selector and nbt entity strings when a text component is decoded

📊 Changes

1 file changed (+99 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/text_commands.rs (+99 -0)

📄 Description

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

Part of #3520

  • CompilableString.CommandParserHelper.apply: the selector of a selector component and the entity of an nbt component are now parsed (with selectors allowed) when a text component argument is decoded; a parse failure or leftover text (command.trailing_data, parsed[leftovers]) makes the component invalid with argument.component.invalid and vanilla's "Invalid selector component: : ". A score name stays an Either that falls back to a plain name.

Vanilla followed: CompilableString.CommandParserHelper.apply, EntitySelector.COMPILABLE_CODEC, ComponentArgument.
Tests: text_commands::tests (3 unit tests); fmt and clippy -D warnings on horizon-client.

🤖 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/4708 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/32-compstr` --- ### 📝 Commits (1) - [`4fa5525`](https://github.com/horizon-rust/horizon/commit/4fa552591a69f3eab6c6f7a17e790fc572e22b93) Compile selector and nbt entity strings when a text component is decoded ### 📊 Changes **1 file changed** (+99 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/text_commands.rs` (+99 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 - `CompilableString.CommandParserHelper.apply`: the `selector` of a selector component and the `entity` of an nbt component are now parsed (with selectors allowed) when a text component argument is decoded; a parse failure or leftover text (`command.trailing_data`, `parsed[leftovers]`) makes the component invalid with `argument.component.invalid` and vanilla's "Invalid selector component: <src>: <message>". A score `name` stays an `Either` that falls back to a plain name. Vanilla followed: `CompilableString.CommandParserHelper.apply`, `EntitySelector.COMPILABLE_CODEC`, `ComponentArgument`. Tests: `text_commands::tests` (3 unit tests); fmt and clippy -D warnings on horizon-client. 🤖 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 05:15:03 +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#5797
No description provided.