Create

Create

86M Downloads

Trains go the wrong way if they reach a junction too soon after exiting a portal

CoryTucker opened this issue ยท 1 comments

commented

Describe the Bug

If a train reaches a portal too soon after exiting a junction, then it will sometimes take the incorrect path to reach that portal.

For example:
Screenshot from 2022-07-12 22-24-36

There is a scheduled train that has a path that takes it from portal A to portal B (and back again). It is currently stuck in a parking space directly outside that portal, which it will enter and then get stuck immediately after exiting the portal.

If there is another train in the passing place, then the scheduled train will not enter the passing place and will instead continue on it's journey as normal.
If the train is delayed (such as with a train observer connected to a delay circuit and a not gate outside portal A that turns the signal immediately outside portal A red at all times unless a train has waited there for a few seconds first), then the train will take the correct route.
However, this is not a satisfactory solution because the redstone will not function if the chunks are not loaded.

It seems that the trains favour directions facing north, not specifically 'left' or 'right', but i'm not 100% sure - in this instance, the passing place is facing north and the correct track is facing east, but on the other side of the portal:
Screenshot from 2022-07-12 22-32-22
On exiting portal A from the other direction, if the train is not delayed by the repeater circuit, it takes the yellow route and gets stuck - it should be taking the pink route.

(f3 screen added in this screenshot incase it is useful)

Reproduction Steps

  1. Schedule a train on an interdimensional route
  2. Place a junction leading to a dead end (or otherwise) close to the exit to the portal that the train is able to reach
  3. If the train takes the 'correct' path, place a junction leading the other way off the main path
  4. Note that the train will always take the incorrect path on exiting the portal

Expected Result

The train should take the correct path upon exiting the portal and reach it's destination, regardless of if it is delayed or if there is a train on the 'preferred' path.

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Linux (Fedora 35, Java 18, OpenJDK)

Mod Version

0.5.0

Minecraft Version

1.18.2

Forge Version

40.1.13

Other Mods

Optifine HD_U_H7
Framed Blocks 5.4.0

Additional Context

No response

commented

#3332 has the same problem. My guess is that AI is not loading fast enough after travelling through a portal.