Skip to content

add PortalRail block and portal crossing - #266

Draft
thisaray wants to merge 1 commit into
muradakh:upgrade-1.21.1from
thisaray:LocomotiveNetherPortalFix
Draft

add PortalRail block and portal crossing#266
thisaray wants to merge 1 commit into
muradakh:upgrade-1.21.1from
thisaray:LocomotiveNetherPortalFix

Conversation

@thisaray

@thisaray thisaray commented Jun 12, 2026

Copy link
Copy Markdown

Adds PortalRail, a new rail block auto-placed on both sides of a nether portal when any rail is placed adjacent to one. Paired rails are linked; destroying either side removes both.
locomotives pull their full train through a portal wagon by wagon, with forced velocity propagation and consist reconnection on the destination side.

@thisaray

Copy link
Copy Markdown
Author

accidentally fixes #259

@thisaray
thisaray marked this pull request as draft July 22, 2026 12:02
@thisaray

Copy link
Copy Markdown
Author

Converted to Draft as the the new 1.21.1 main branch hat major changes not compatible with the current branch

@thisaray

thisaray commented Aug 2, 2026

Copy link
Copy Markdown
Author

quick design question on the portal rail. right now placeDestinationPortalRail finds the destination rail spot by grabbing the nearest portal block via findClosestPortalPosition and placing the exit rail relative to that column. works fine when both portals are the same size, but if they're different sizes (say 3x3 vs 2x3) it doesn't line up with where the train actually comes out, since it's not doing the same relative-position mapping vanilla does for entity teleport across mismatched portal shapes.

6 ways i can see to handle it:
leave it as is, mismatch just looks broken (rail placed in wrong spot)
detect the mismatch and just don't place the rail at all (no rail = obvious something's off, but no silently-wrong placement either)
same as 2 but also toast/message the player when we skip placement so it's not a silent no-op
replicate the vanilla relative-position math so it's correct regardless of portal size (not 100% sure if/how that works)
5 override the vanilla portal logic to force both portals to be the same size
create a new teleporter block that the trains can drive into and instantly transfer

id prefer 6 or 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant