[GH-ISSUE #947] After a command teleport to the Nether and back, Overworld entities summoned before are missing and a new summon reports the wrong entity #267

Closed
opened 2026-11-02 15:37:46 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/947

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

Found while checking LookImEcho-Rick's #800 (/execute in <dimension> run tp, fixes #592), whose corpus adds a round trip: /execute in minecraft:the_nether run tp @s 0 100 0, back with /execute in minecraft:overworld run tp @s 8.5 230 8.5 (each followed by a settle).

With #800 merged onto main, command_exec passes every command of its execute section (74/74) but two later ones in world_misc differ from vanilla:

  • /swing @e[type=minecraft:pig]: vanilla "Made Pig swing an arm"; Horizon "No entity was found". The pig was summoned at 4.5 210 4.5 (NoAI, NoGravity) in the entities section, before the round trip.
  • /summon minecraft:armor_stand 4.5 210 4.5 {…CustomName:"Stand"…}: vanilla "Summoned new Stand"; Horizon "Summoned new Pig".

main without #800 passes command_exec, so it's the round trip. Game::switch_level saves the departing level's chunks and entities and clears mobs, dropped etc.; coming back reloads them from the save as chunks stream in. The two symptoms point at the Overworld's saved entities not being back when the commands run, and then coming back with an id that collides with a newly summoned entity (the summon's feedback names the entity found under the new id). Vanilla keeps both levels loaded on the integrated server, so its entities never leave.

Check: the entity reload after switch_level (timing relative to the settle, and the id each restored entity gets against next_id), the same for portal travel (it uses the same path), then land #800.

Originally created by @ludovic111 on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/947 > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. Found while checking LookImEcho-Rick's #800 (`/execute in <dimension> run tp`, fixes #592), whose corpus adds a round trip: `/execute in minecraft:the_nether run tp @s 0 100 0`, back with `/execute in minecraft:overworld run tp @s 8.5 230 8.5` (each followed by a settle). With #800 merged onto main, `command_exec` passes every command of its `execute` section (74/74) but two later ones in `world_misc` differ from vanilla: - `/swing @e[type=minecraft:pig]`: vanilla "Made Pig swing an arm"; Horizon "No entity was found". The pig was summoned at 4.5 210 4.5 (NoAI, NoGravity) in the `entities` section, before the round trip. - `/summon minecraft:armor_stand 4.5 210 4.5 {…CustomName:"Stand"…}`: vanilla "Summoned new Stand"; Horizon "Summoned new Pig". main without #800 passes `command_exec`, so it's the round trip. `Game::switch_level` saves the departing level's chunks and entities and clears `mobs`, `dropped` etc.; coming back reloads them from the save as chunks stream in. The two symptoms point at the Overworld's saved entities not being back when the commands run, and then coming back with an id that collides with a newly summoned entity (the summon's feedback names the entity found under the new id). Vanilla keeps both levels loaded on the integrated server, so its entities never leave. Check: the entity reload after `switch_level` (timing relative to the settle, and the id each restored entity gets against `next_id`), the same for portal travel (it uses the same path), then land #800.
bsakaguchi 2026-11-02 15:37:46 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ludovic111 commented on GitHub (Oct 19, 2026):

Claimed by ludovic on Discord (GitHub: ludovic111), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #947).

<!-- gh-comment-id:6257373534 --> @ludovic111 commented on GitHub (Oct 19, 2026): Claimed by `ludovic` on Discord (GitHub: `ludovic111`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #947). <!-- kira:work -->
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#267
No description provided.