Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables citizens to use lever to toggle T-cross railway #10410

Closed

Conversation

HexatomicRing
Copy link

Citizens now are able to toggle the direction of a RailBlock using the Lever next to it. There only exists a small chance that more than one citizens are on the same rail block in one tick that they may go to wrong direction.
Let citizens use railways more efficiently!

Testing

  • [√] Yes I tested this before submitting it.
  • [×] I also did a multiplayer test.

Review please

// Sorry that I deleted my fork by mistake, so I had to re-create this pull request😭.

@Raycoms
Copy link
Contributor

Raycoms commented Nov 13, 2024

This should probably not be a goal, but should be handled by the pathfollow mechanism + should not need a lever even (just auto rotate the rail)

@HexatomicRing
Copy link
Author

This should probably not be a goal, but should be handled by the pathfollow mechanism + should not need a lever even (just auto rotate the rail)

Yes, in future versions, due to the adjustable speed of the mining car, continuing to use Goal will have a certain probability of failure. I will modify my code later.
In addition, if two citizens heading in different directions pass through the same railway track in the same tick, one citizen will go in the wrong direction. Then he will walk the rest path instead of using a minecart. I haven't figured out how to treat this situation yet.

@Raycoms
Copy link
Contributor

Raycoms commented Nov 13, 2024

This should probably not be a goal, but should be handled by the pathfollow mechanism + should not need a lever even (just auto rotate the rail)

Yes, in future versions, due to the adjustable speed of the mining car, continuing to use Goal will have a certain probability of failure. I will modify my code later. In addition, if two citizens heading in different directions pass through the same railway track in the same tick, one citizen will go in the wrong direction. Then he will walk the rest path instead of using a minecart. I haven't figured out how to treat this situation yet.

There is also the option of ignoring the rail and telling the railcart entity the junctions at which it would have to change direction.

@someaddons
Copy link
Contributor

better solution would be a T cross rail block :D

@Raycoms
Copy link
Contributor

Raycoms commented Nov 13, 2024

better solution would be a T cross rail block :D

Agreed, but it would still require at least to tell the cart which direction to go =D

@HexatomicRing HexatomicRing deleted the Toggle-T-Cross branch November 17, 2024 03:04
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.

3 participants