[PR #7234] [CLOSED] Summon: a cancelled native join fails the command for carts and mobs #7429

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7234
Author: @Joansitoh
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: fix/7184-summon-join-cancel


📝 Commits (1)

  • 1df9411 Summon: a cancelled join fails the command for carts and mobs

📊 Changes

1 file changed (+22 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+22 -4)

📄 Description

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

What

/summon reported success when a native mod cancelled the entity join. Now cmd_summon fails with commands.summon.failed.uuid:

  • minecart arm: native_joins_flush(false, next_entity) after the push, as the experience-orb arm already does.
  • mob path: the id from spawn_mob_spawned is checked against self.mobs; native_mobs_joined removes a cancelled mob. spawn_mob_for's return is unchanged. enchant_spawn_equipment, halloween_spawn_head and spawn_jockeys all return early on an id that is gone.
  • The orb, cart and mob arms share a small summon_join_result(kept) helper.

Vanilla reference

SummonCommand.java:99-100 throws ERROR_DUPLICATE_UUID (commands.summon.failed.uuid) when tryAddFreshEntityWithPassengers fails.

How tested

The wiring itself is untested. No seam exists to cancel a join end to end (mod_api::MODS is a process-wide OnceLock, and native_joins_flush returns true with no mods). The unit test only pins the error mapping of summon_join_result (kept → Ok, refused → commands.summon.failed.uuid).

pr_ready --quick (against upstream/main): scope 1 file +22 −4; Python tests 612 passed; rustfmt ✅; clippy ✅; horizon-client tests 682 passed; doc tests ✅; mod API up to date ✅.
Harnesses run: command_exec PASS, server_ops_feedback PASS.
Remaining affected harnesses: run by CI's parity job.

Suggested label: none

Fixes #7184

🤖 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/7234 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/7184-summon-join-cancel` --- ### 📝 Commits (1) - [`1df9411`](https://github.com/horizon-rust/horizon/commit/1df94118cc9fd72ef0af65867a00208158a35a7a) Summon: a cancelled join fails the command for carts and mobs ### 📊 Changes **1 file changed** (+22 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+22 -4) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What `/summon` reported success when a native mod cancelled the entity join. Now `cmd_summon` fails with `commands.summon.failed.uuid`: - minecart arm: `native_joins_flush(false, next_entity)` after the push, as the experience-orb arm already does. - mob path: the id from `spawn_mob_spawned` is checked against `self.mobs`; `native_mobs_joined` removes a cancelled mob. `spawn_mob_for`'s return is unchanged. `enchant_spawn_equipment`, `halloween_spawn_head` and `spawn_jockeys` all return early on an id that is gone. - The orb, cart and mob arms share a small `summon_join_result(kept)` helper. ## Vanilla reference `SummonCommand.java:99-100` throws `ERROR_DUPLICATE_UUID` (`commands.summon.failed.uuid`) when `tryAddFreshEntityWithPassengers` fails. ## How tested **The wiring itself is untested.** No seam exists to cancel a join end to end (`mod_api::MODS` is a process-wide `OnceLock`, and `native_joins_flush` returns true with no mods). The unit test only pins the error mapping of `summon_join_result` (kept → Ok, refused → `commands.summon.failed.uuid`). pr_ready --quick (against upstream/main): scope 1 file +22 −4; Python tests 612 passed; rustfmt ✅; clippy ✅; horizon-client tests 682 passed; doc tests ✅; mod API up to date ✅. Harnesses run: `command_exec` PASS, `server_ops_feedback` PASS. Remaining affected harnesses: run by CI's parity job. Suggested label: none Fixes #7184 🤖 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 06:39:24 +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#7429
No description provided.