[PR #5480] [MERGED] native_summon: return experience orbs' ids, place passengers without a Pos #6315

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5480
Author: @Vaspyyy
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/native-summon-orbs-passengers


📝 Commits (5)

  • 8a6eaac native_summon: return experience orbs' ids, and place passengers without a Pos
  • 4a361d0 native_summon: a root a mod kept out has no id
  • 88784b6 Merge remote-tracking branch 'upstream/main' into fix/native-summon-orbs-passengers
  • f5a7175 Merge main into #5480
  • 5fc86a7 native_summon: end crystals and cushions keep their root ids too

📊 Changes

3 files changed (+99 additions, -37 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+1 -0)
📝 crates/horizon-client/src/game/commands/data.rs (+31 -30)
📝 crates/horizon-client/src/game/native_entities.rs (+67 -7)

📄 Description

Requested by Ransom · project thread

🤖 Opened by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally.

What and why

Follow-up to #5408, fixing the two bugs arismoko reported there:

  1. An experience orb summoned with native_summon returned None. The orb spawned, but the Target lookup in spawn_entity_from_nbt has no case for orbs. native_summon now returns the stack's first spawned id whenever the lookup finds no target. /summon and spawn_entity_from_nbt are unchanged.
  2. Passengers without Pos were lost. native_summon only set Pos on the root. It now uses /summon's recursive helper, moved out of summon_with_nbt as place_summoned. That places every entity in the stack at the position and also gives Fire and Rotation their defaults, as /summon does.

Kind

  • bug: a crash or a breakage

Vanilla reference

EntityType.loadEntityRecursive (every entity in the stack is placed at the position), the same as /summon. Horizon-only API otherwise. New unit test: native_entities::tests::a_passenger_without_a_position_stands_where_the_stack_is_summoned.

Other projects' code

none

Self-check

cargo clippy -p horizon-client --tests -- -D warnings -A clippy::manual_range_contains is clean, and cargo test -p horizon-client --bin horizon-client native_entities passes (4/4). The allow is for main's existing manual_range_contains lint on Rust 1.97 in horizon-world's aquifer code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XnU6QT61YPiPzVNysmVHsH


🔄 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/5480 **Author:** [@Vaspyyy](https://github.com/Vaspyyy) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/native-summon-orbs-passengers` --- ### 📝 Commits (5) - [`8a6eaac`](https://github.com/horizon-rust/horizon/commit/8a6eaac9997acc1099cbb0c78d442bb3fbeb7173) native_summon: return experience orbs' ids, and place passengers without a Pos - [`4a361d0`](https://github.com/horizon-rust/horizon/commit/4a361d034b6b493328ceadf3c613b7f9c013d0df) native_summon: a root a mod kept out has no id - [`88784b6`](https://github.com/horizon-rust/horizon/commit/88784b6910c9a99ac3e3e40718048b21ab99d113) Merge remote-tracking branch 'upstream/main' into fix/native-summon-orbs-passengers - [`f5a7175`](https://github.com/horizon-rust/horizon/commit/f5a7175f27dc0de82d4c72673da383414c6ac93a) Merge main into #5480 - [`5fc86a7`](https://github.com/horizon-rust/horizon/commit/5fc86a7384540ce9ad6cbdd8aa19eed45a2316ad) native_summon: end crystals and cushions keep their root ids too ### 📊 Changes **3 files changed** (+99 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+1 -0) 📝 `crates/horizon-client/src/game/commands/data.rs` (+31 -30) 📝 `crates/horizon-client/src/game/native_entities.rs` (+67 -7) </details> ### 📄 Description <!-- claude-projects-attribution: {"github_login":"Vaspyyy"} --> _Requested by **Ransom** · [project thread](https://claude.ai/code/project/chan_014LE6qsPXZ5YJ26HjaADSTZ?thread=cmsg_014LE6qsPXZ5YJ26HjaADSTZNjmr2CxsDjFQsHDe7X1n2j)_ > 🤖 Opened by Vaspyyy's AI agent (Claude Code), not by Vaspyyy personally. ## What and why Follow-up to #5408, fixing the two bugs arismoko reported there: 1. **An experience orb summoned with `native_summon` returned `None`.** The orb spawned, but the `Target` lookup in `spawn_entity_from_nbt` has no case for orbs. `native_summon` now returns the stack's first spawned id whenever the lookup finds no target. `/summon` and `spawn_entity_from_nbt` are unchanged. 2. **Passengers without `Pos` were lost.** `native_summon` only set `Pos` on the root. It now uses `/summon`'s recursive helper, moved out of `summon_with_nbt` as `place_summoned`. That places every entity in the stack at the position and also gives `Fire` and `Rotation` their defaults, as `/summon` does. ## Kind - [x] bug: a crash or a breakage ## Vanilla reference `EntityType.loadEntityRecursive` (every entity in the stack is placed at the position), the same as `/summon`. Horizon-only API otherwise. New unit test: `native_entities::tests::a_passenger_without_a_position_stands_where_the_stack_is_summoned`. ## Other projects' code none ## Self-check `cargo clippy -p horizon-client --tests -- -D warnings -A clippy::manual_range_contains` is clean, and `cargo test -p horizon-client --bin horizon-client native_entities` passes (4/4). The allow is for main's existing `manual_range_contains` lint on Rust 1.97 in horizon-world's aquifer code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XnU6QT61YPiPzVNysmVHsH --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:18:09 +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#6315
No description provided.