[PR #4240] [MERGED] Portal trips keep their destination running, and minecarts follow the track steps a server sends #5509

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4240
Author: @kacpherek
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/trouble-portals-carts


📝 Commits (2)

  • d0c5f22 Keep the destination of a portal trip running with a portal ticket
  • 64b7e51 Play the minecart steps a server sends along the track

📊 Changes

9 files changed (+318 additions, -22 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -3)
📝 crates/horizon-client/src/game/lan.rs (+7 -0)
📝 crates/horizon-client/src/game/levels.rs (+15 -0)
📝 crates/horizon-client/src/game/nether_portal.rs (+25 -0)
📝 crates/horizon-client/src/game/remote.rs (+169 -12)
📝 crates/horizon-client/src/game/remote_objects.rs (+11 -3)
📝 crates/horizon-client/src/game/server_travel.rs (+5 -1)
📝 crates/horizon-client/src/ticket_levels.rs (+60 -3)
📝 crates/horizon-protocol/src/packets/play.rs (+19 -0)

📄 Description

What and why

  • Keep the destination of a portal trip running with a portal ticket: Horizon only lit the exit chunks long enough to land an entity that went through a portal, then nothing in that dimension ticked while no player was in it, so an item or mob stayed frozen there and never came back through. Vanilla places TicketType.PORTAL (300 ticks, radius 3, level 30 of both kinds, keeps the dimension active) on the exit chunk when the entity arrives (Entity.placePortalTicket via TeleportTransition.PLACE_PORTAL_TICKET and NetherPortalBlock.getExitPortal, EndPortalBlock.getPortalDestination). Add the ticket to the level's chunk tickets, tick the dimension while one is held and stream its area. Fixes #3292
  • Play the minecart steps a server sends along the track: Horizon ignored ClientboundMoveMinecartPacket, which a server sends in place of move packets for minecarts on NewMinecartBehavior (the minecart_improvements experiment), so such a cart and a rider in it stayed where they were added until a teleport. Decode the packet's steps (MinecartStep: position, movement, yRot, xRot, weight) and play them as NewMinecartBehavior.lerpClientPositionAndRotation does: queued steps become the current ones over 3 ticks by their weights (getCurrentLerpStep), and the cart takes the position, movement and yaw they give at the end of each tick. A teleport puts such a cart there at once (its interpolation handler is NO_OP). The cart's pitch still comes from its rails. Fixes #3796

Self-check

rustfmt on changed files; built by CI; not run in game. On a server, #3796 applies only when the server runs the minecart_improvements experiment (NewMinecartBehavior), which is when it sends ClientboundMoveMinecartPacket.


🔄 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/4240 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/trouble-portals-carts` --- ### 📝 Commits (2) - [`d0c5f22`](https://github.com/horizon-rust/horizon/commit/d0c5f220bc68d85577fa4176dfc38dd7d4654cf9) Keep the destination of a portal trip running with a portal ticket - [`64b7e51`](https://github.com/horizon-rust/horizon/commit/64b7e511b101d608c835725fcae499f7310168a6) Play the minecart steps a server sends along the track ### 📊 Changes **9 files changed** (+318 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -3) 📝 `crates/horizon-client/src/game/lan.rs` (+7 -0) 📝 `crates/horizon-client/src/game/levels.rs` (+15 -0) 📝 `crates/horizon-client/src/game/nether_portal.rs` (+25 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+169 -12) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+11 -3) 📝 `crates/horizon-client/src/game/server_travel.rs` (+5 -1) 📝 `crates/horizon-client/src/ticket_levels.rs` (+60 -3) 📝 `crates/horizon-protocol/src/packets/play.rs` (+19 -0) </details> ### 📄 Description ## What and why - Keep the destination of a portal trip running with a portal ticket: Horizon only lit the exit chunks long enough to land an entity that went through a portal, then nothing in that dimension ticked while no player was in it, so an item or mob stayed frozen there and never came back through. Vanilla places TicketType.PORTAL (300 ticks, radius 3, level 30 of both kinds, keeps the dimension active) on the exit chunk when the entity arrives (Entity.placePortalTicket via TeleportTransition.PLACE_PORTAL_TICKET and NetherPortalBlock.getExitPortal, EndPortalBlock.getPortalDestination). Add the ticket to the level's chunk tickets, tick the dimension while one is held and stream its area. Fixes #3292 - Play the minecart steps a server sends along the track: Horizon ignored ClientboundMoveMinecartPacket, which a server sends in place of move packets for minecarts on NewMinecartBehavior (the minecart_improvements experiment), so such a cart and a rider in it stayed where they were added until a teleport. Decode the packet's steps (MinecartStep: position, movement, yRot, xRot, weight) and play them as NewMinecartBehavior.lerpClientPositionAndRotation does: queued steps become the current ones over 3 ticks by their weights (getCurrentLerpStep), and the cart takes the position, movement and yaw they give at the end of each tick. A teleport puts such a cart there at once (its interpolation handler is NO_OP). The cart's pitch still comes from its rails. Fixes #3796 ## Self-check rustfmt on changed files; built by CI; not run in game. On a server, #3796 applies only when the server runs the minecart_improvements experiment (NewMinecartBehavior), which is when it sends ClientboundMoveMinecartPacket. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:04 +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#5509
No description provided.