Railcraft

Railcraft

34M Downloads

Motor Switches with Detectors don't work most of the time.

PitchBright opened this issue · 32 comments

commented

RC 9.6.1
MC 1.7.10
Forge 1291

Switch Motors stopped working properly after updating from RC 9.5 to 9.6.1

When used in conjunction with Player Detectors or Train Detectors… the detector DOES send the redstone signal to the adjacent block that the motor is sitting on, but the redstone signal doesn't trigger the Motor Switch sitting on the block.

This series of screencaptures shows the problem. The signal is being passed by the Player Detector, as shown in the first two images. In the third and fourth images we can see that the motor isn't switching when the player is in the cart.

https://imgur.com/P6U6QIX
https://imgur.com/T6BZYHM
https://imgur.com/1XIndiq
https://imgur.com/2hphiLh

commented

This issue persists into RC 9.7.0

Further testing indicates to me that the Switches aren't behaving as expected… and that it has something to do with the difference between a redstone signal coming straight from a redstone torch, versus a redstone signal coming from a detector block.

In this series of images (much like the first set) I show how a direct redstone signal powers the switch, as opposed to a Player Detector redstone signal won't power the switch.

https://imgur.com/cF76ilY
https://imgur.com/bxZlr1D
https://imgur.com/hs9NcWw
https://imgur.com/2xni6Vb

commented

Additional testing is interesting. When I place the Detector elsewhere (not directly beside the switch)… and trigger a redstone signal that leads to a switch… the switch works.

So it seems the problem may lie with Switches that have Detectors directly in front of them.

This also applies to both situations where the redstone signal is being passed directly from the Detector into the block below the Switch, as well as, when the Detector sends a signal straight down on to redstone, and the redstone passes under the block under the Switch.

I also tested Switches with Detectors to the sides, diagonals, and backs of them, and they worked fine.

commented

@PitchBright Does this still happen?

commented

@liach I haven't played Minecraft beyond 1.7.10. You'll need to test it yourself to find out (it's super easy to test for). If there's an update and fix to RC-1.7.10, I can test it right away.

commented

You reported this for 9.6.1.0. Does this happen with 9.12.2.0?

commented

Yes, the issue persists into 9.12.2.0

Here's the Switch functioning properly (is activated) when fed a direct signal from a torch:
https://imgur.com/a/cxRRI

Here's the Switch functioning properly (isn't activated) when receiving no signal from the Player Detector beside it:
https://imgur.com/a/ilbxl

Here's the Switch not functioning (isn't activated despite receiving a signal) when I jump into the Cart above the Player Detector:
https://imgur.com/a/80s2n

This one is interesting. Here's me removing the Redstone Torch, then placing a cart, then adding the Torch back to give the Switch a direct signal. Result: Switch doesn't function properly. It's almost as though the cart is preventing the Switch from activating. Note: This is reproducible when the Player Detector is replaced with a Stone block, which might hint that the Detector isn't a factor in the problem.

https://imgur.com/a/rg3LT

commented

Can you get another image, both with cart on the switch track, before and after rotation of switch? The cart should NOT move.

commented

Did the images I posted not show that? All I know is, the moment I place the cart down, and it's detected by the Routing Switch... the Switch changes immediately. If that doesn't contradict what you said about Switches not supposed to change, when a cart is on them, then I don't know what to tell you.

commented

How about put a cart on, connect redstone, and then check whether the switch worked or not? Your case of player is more similar to my suggestion.

commented

Is that not what I posted yesterday?

commented

But in yesterday's case, you ride on the cart!

commented

I also showed not riding on the cart, direct redstone signal... and still not working.

commented

Yes, the 'interesting' case is working as intended. End of discussion.

commented

On IRC/Discord 3 hours ago:
[1:18pm] Forecaster: there is no reason detectors shouldn't update switch motors

commented

Anyway, the "interesting" case... isn't what the Issue was filed for.

commented

After a second look, I found that a switch track is not spupposed to switch when a cart is on.

commented

@liach Where do you see that it says it's not supposed to switch? It used to work, and then stopped working, and I couldn't find anything in the changelog that said there was an intentional change to the behaviour of Switches.

commented

Try to turn a switch lever with a train over the track. If it works, then the inconsistency needs to change. Switching while carts are on the track is very dangerous as it will have unintended effects on trains.

commented

That's not what I asked you. Where did you see that it says Motor Switches being disabled while carts are on adjacent Switch Tracks, despite receiving a signal to switch... is intended behaviour?

commented

Well, can you try to go in a train over the same setting? When you are detected, do you think the track should switch and break the train?

commented

You're giving me examples of where the functionality would cause a problem. I'm simply asking you where you found that the change to the functionality, was intentional, as you said:

"After a second look, I found that a switch track is not spupposed to switch when a cart is on."

commented

It is intentional for trains.

commented

Let's go to IRC, I don't understand your response to my question, as it's not an answer, nor does my demonstration have anything to do with trains. So there's some confusion between us that we can clear up quickly in a convo over there.

commented

I suggest you to hang on https://discord.gg/Wr9zxmP discord as it keeps chat log.

commented

My argument is that, a switch track should never switch with carts on, since it is costly to adjust the cart's physic. (Turing the cart to another direction while it has already moved a distance straight)

commented

I'm not looking for advice on which chat client to use, but thanks for the hot tip.

My point is: It used to work, but now it doesn't.

And you said you found that the change in behaviour was intentional.

I asked you where you found that info, and you keep coming back with rationale as to why it makes sense. I'm not debating whether what you're saying make sense or not... I'm simply asking you, where did you see that CJ made that change, on purpose.

commented

I understand your argument. Here's an example of the Switch changing, the moment a cart is on it, and it contradicts: "After a second look, I found that a switch track is not spupposed to switch when a cart is on."

https://imgur.com/a/YtyYp

commented

@liach please refrain from changing labels on old issues without talking to me first. Just because an issue hasn't been addressed does not mean it has gone away.

And you are using "not a bug" and "question" wrong.

commented

Having tested it myself, I see no issue here, once a cart is in process of traversing the switch, the switch is locked. That is what you are seeing happen here. There are some variances in when it decides a cart has started traversing the switch, but that generally only applies to when you drop a cart directly on the switch track rather than approach it normally.

The reason for locking the switch is to prevent trains from being cut in half as that was once a common problem.

I don't really see how this behavior adversely affects any reasonable use cases, as the "Detector under track" setup worked in all reasonable use cases I could devise. The only possible issue is if you send a bunch of unlinked carts across the switch all at once, in this case sometime carts get sent the wrong direction. There isn't much that can be done regarding this issue as the Detector simply isn't fine grained enough. However, this shouldn't be an issue for a Routing Switch Actuator.

As such, I will be closing this issue.

commented

No worries, I had changed my setup after the Switch & Detector setup stopped working a couple years ago.

That said, while we're on the subject, something in your reply made me wonder if you're saying the setup I showed in those pictures should work. Or was my Detector under the track, and odd way of making the Switches switch the track? I'm a little confused there. Can you clarify?

Thanks!
-Pitch

commented

I duplicated your setup exactly and it worked pretty reliably as long as I wasn't spawning Carts on the switch or sending threw too many Carts at once.

Maybe the original issue was fixed at some point, I don't know.

commented

Interesting. I never tested versions after 1.7.10. Glad to hear it worked itself out eventually though. Thanks for looking into that, CJ.