Create

Create

86M Downloads

All Portals, Regardless of Tied Dimension, Lead Trains to or from the Nether.

CeleSymmetry opened this issue · 2 comments

commented

Describe the Bug

Given the up to date version of Create (0.5.0g) and Blue Skies (and likely any other mod with dimension portals similar to the nether portal, though currently untested), trains hooked up to a Blue Skies portal in the overworld will instead lead to a portal in the nether. Similarly, tracks going through portals in a Blue Skies dimension will also lead to the nether.

It is technically possible to have a train go from the overworld to a Blue Skies dimension, by establishing a track from the overworld to the nether via any type of portal (Blue Skies or vanilla nether portal), then from the Blue Skies dimension, establish track from that dimension into the nether. Lastly in the nether, connect the two ends of track. Pictures will be included to demonstrate this.

Reproduction Steps

  1. Boot a copy of Minecraft with Forge 43.2.1 consisting of the mods listed, and Create 0.5.0g.
  2. Create a new world in creative mode.
  3. Build a portal, big enough for trains, to the Everbright dimension of Blue Skies using Turquoise Stone Bricks and light with a Zeal Lighter.
  4. Go through Everbright portal to load the other side and create its linked portal.
  5. Expand the size of the portal in the Everbright to accommodate trains, and build some track in front of it facing into the portal.
  6. Attempt to connect track to the portal. You will be met with the message "Cannot place portal track: Target portal not generated yet."
  7. Return to overworld through Everbright portal.
  8. Near Everbright portal in overworld, build a vanilla nether portal big enough for trains and light it.
  9. Enter nether portal.
  10. Expand nether portal on the nether side to accommodate trains.
  11. Place track leading into the nether portal.
  12. Return to overworld through nether portal.
  13. Extend track in overworld from the nether portal track connection and attach to the Everbright portal in the overworld.
  14. Go to Everbright through Everbright portal in the overworld.
  15. There will not be a portal track connection here, so connect track in Everbright to the portal.
  16. Construct simple train in Everbright on track leading to Everbright portal.
  17. Driving train into Everbright portal will result in a message saying it reached the end of the track.
  18. Go back through Everbright portal and then through nether portal.
  19. There will be 3 tracks leaving this nether portal. Lengthen all three to fit train.
  20. Return to train in Everbright and drive it SLOWLY forward into the Everbright portal.
  21. Train will arrive in nether. Connect track train is on to any of the other two portal connections attached to the nether portal.
  22. Drive train forward through the newly connected portal track.
  23. Train will arrive in overworld. Continue driving along track made earlier into the other portal that you did not just exit out of.
  24. Train will arrive back in the nether on final track.
  25. For further enjoyment, drive train quickly.

Expected Result

Train through Everbright portal should connect to Everbright dimension directly, not the nether.

Screenshots and Videos

https://www.youtube.com/watch?v=liYLiKzGB94

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.0g

Minecraft Version

1.19.2

Forge Version

43.2.1

Other Mods

Blue Skies 1.3.20 (https://www.curseforge.com/minecraft/mc-mods/blue-skies)
Structure Gel API 2.7.1 (https://www.curseforge.com/minecraft/mc-mods/structure-gel-api)

Additional Context

No response

commented

I can't be completely sure given that Blue Skies is closed source. However, the issue is most likely caused by Create connecting tracks depending on whether or not the block in front is instanceof NetherPortalBlock1 instead of checking if it is exactly a minecraft:nether_portal. Blue Skies probably builds its portal blocks based on NetherPortalBlock so it is also technically an instance of a nether portal block.

Possible fix: test for minecraft:nether_portal instead in Create (which would effectively make tracks no longer connect to any other dimension than the nether).
Another much more complex, more durable fix, would be to have a custom Registry<> of portal types so mods/datapacks can register them themselves.

Footnotes

  1. https://github.com/Creators-of-Create/Create/blob/cf87508276f845675e64ad88cbf013298aac72a3/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackBlock.java#L254

commented

@edgarogh, I think the portal direction depends more on how the track searches for what's on the other side of the portal, where there's only two possibilities - the overworld, or the nether.

ResourceKey<Level> resourcekey = level.dimension() == Level.NETHER ? Level.OVERWORLD : Level.NETHER;