[PR #5883] [MERGED] Primed TNT keeps its Passengers #6537

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5883
Author: @Joansitoh
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/5567-tnt-passengers


📝 Commits (1)

  • 645326f Primed TNT carries its Passengers

📊 Changes

4 files changed (+58 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/passengers.rs (+8 -0)
📝 crates/horizon-client/src/game/persist.rs (+9 -1)
📝 crates/horizon-client/src/game/tnt.rs (+39 -0)
📝 tools/test_server_entities_parity.py (+2 -0)

📄 Description

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

What

/summon minecraft:tnt ~ ~ ~ {Passengers:[...]} dropped its passengers. Now the primed TNT gets an entity id, loads each passenger as a rider (load_mob(rider, Some(id)), as boats and carts do), sync_riders accepts TNT as a valid vehicle, and seat_tnt_mobs seats riders at TNT y + 0.98 minus the rider's own vehicle attachment. The mount clears when the TNT is gone (explosion).

Vanilla reference

SummonCommand → EntityType.loadEntityRecursive, which calls passenger.startRiding(entity, true, false). force=true skips canAddPassenger, so several NBT passengers are allowed. TNT's passenger attachment is the top of its 0.98 box.

Tests

  • tools/test_server_entities_parity.py: a TNT with a pig passenger added to the scene; parity.py server_entities passes against the vanilla oracle.
  • Unit test for the seat position (tnt::tests).
  • Reviewed by a separate Sonnet 5.5 agent: SIN DEFECTO.
  • Remaining affected harnesses: run by CI's parity job (the dedicated_server harness showed one stray update_attributes line on my pre-rebase branch, which was 50+ commits behind; to be confirmed by CI).

pr_ready (--quick --base upstream/main): Scope 4 files +58 −1 ✅, Public tree ✅, Python tests 515 ✅, rustfmt ✅, clippy ✅, horizon-client tests 1675 ✅, doc tests ✅, Parity: 34 affected, left to CI.

Part of #5567 (first slice: TNT passengers).

🤖 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/5883 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5567-tnt-passengers` --- ### 📝 Commits (1) - [`645326f`](https://github.com/horizon-rust/horizon/commit/645326f21eade6d61653502738b5e51fe1af76a9) Primed TNT carries its Passengers ### 📊 Changes **4 files changed** (+58 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/passengers.rs` (+8 -0) 📝 `crates/horizon-client/src/game/persist.rs` (+9 -1) 📝 `crates/horizon-client/src/game/tnt.rs` (+39 -0) 📝 `tools/test_server_entities_parity.py` (+2 -0) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What `/summon minecraft:tnt ~ ~ ~ {Passengers:[...]}` dropped its passengers. Now the primed TNT gets an entity id, loads each passenger as a rider (`load_mob(rider, Some(id))`, as boats and carts do), `sync_riders` accepts TNT as a valid vehicle, and `seat_tnt_mobs` seats riders at TNT y + 0.98 minus the rider's own vehicle attachment. The mount clears when the TNT is gone (explosion). ## Vanilla reference `SummonCommand` → `EntityType.loadEntityRecursive`, which calls `passenger.startRiding(entity, true, false)`. `force=true` skips `canAddPassenger`, so several NBT passengers are allowed. TNT's passenger attachment is the top of its 0.98 box. ## Tests - `tools/test_server_entities_parity.py`: a TNT with a pig passenger added to the scene; `parity.py server_entities` passes against the vanilla oracle. - Unit test for the seat position (`tnt::tests`). - Reviewed by a separate Sonnet 5.5 agent: SIN DEFECTO. - Remaining affected harnesses: run by CI's parity job (the `dedicated_server` harness showed one stray `update_attributes` line on my pre-rebase branch, which was 50+ commits behind; to be confirmed by CI). **pr_ready** (`--quick --base upstream/main`): Scope 4 files +58 −1 ✅, Public tree ✅, Python tests 515 ✅, rustfmt ✅, clippy ✅, horizon-client tests 1675 ✅, doc tests ✅, Parity: 34 affected, left to CI. Part of #5567 (first slice: TNT passengers). 🤖 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:22:37 +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#6537
No description provided.