mojira.dev
MC-868

Detector Rail switches junction before Minecart passes detector (happens only with minecarts of certain speed)

If you have a detector rail it can affect rails directly connected to it. A powered rail for example is powered and a curved rail can change orientation. Imagine now to have a t-junction setup like in

[media]

The detector rail is on the left and passing it will cause the curved rail to change orientation. We start our cart not from the detector, but from where the rail is bend to. After starting the cart it goes into the bend and before leaving it, the detector will react. This causes a flicker in which the cart and the rail change orientation several times to then finally settle in the right-side position as in

[media]

This basically means the detector rail caused a change of orientation for the bend rail before the minecart was even standing on it.

I assume that the signaling goes by this: If the cart, would in a next step touch the detector rail, it fires. Since the rail is then bending in another direction there is an update as the minecart will now not go over the rail, causing another oriantation change. This then causes the detector to fire again going back to the situation in the beginning. The reason why this does not cause an endless loop is that each action takes one tick. Depending on the speed of the cart you will see a longer or shorter flicker then.

What I expected was that the cart will go to the left, not the right as it actually did.

Code analysis by @unknown can be found in this comment.


@unknown:

  • Fixed in 16w02a? Using the setup described in start.png, the minecart sometimes "bounces" off the rail and goes backwards.

  • Half-fixed❓ for 1.9.1-pre3.

    • Slow-moving minecarts will go the correct way, while fast moving minecarts will bounce back?!

@unknown:

  • Confirmed for 1.9-pre1. It seems to be affected by the speed of the minecart as well. Fast and slow minecarts don't trigger it, but minecarts with a medium-ish speed do.

Linked issues

Attachments

Comments 82

Jochen Theodorou

added smalelr images

Confirmed in 1.4.5.

really annoying bug. Hope that get fixed in 1.5 =)

I hope that this screencast show the problem from another angle.

This is the way it should be working (the cart drives to north):
http://www.screencast.com/users/kitharo/folders/Default/media/2c44b0a6-6681-47c6-b4bc-f8b441507bc1
(creative)

Same construction but with another orientation:
http://www.screencast.com/users/kitharo/folders/Default/media/7914ba35-8176-48e1-8fa5-4e30d72d1f11

Here you can see the the detection isn't work correctly: http://www.screencast.com/users/kitharo/folders/Default/media/789f3c14-e9ae-4bb9-9fe2-e2b400a40ef4
(creative)
There was nothing special build.

I hope this helps to fix the problem & describes what is reported above.
Can somebody check that please otherwise i will create a new task.

Also Snapshot 13w01b has these bug.

EDIT: looks like the orientation is important to fix the bug

This seems to be similar to an issue I am having, I will try a diagram

B-----------r----------C
............X
............I
............I
............I
............I
............I
.........A.I

OK basically a cart coming from A should trip the corner r from C to B then reset and it does, but when the cart returns from B the corner flips again sending the cart to A - There is no detector rail on the B line. I have just made the B C into a loop and what is happening is the cart coming to the corner from C trips the corner towards B but for some reason the cart takes the corner to A anyway. Bug seems to be - if one line has a detector rail ALL lines to the T junction behave like they have one. If you add a rail above the r the detector rail stops working.

Watch this new video I made with Ezvid:
http://youtu.be/fvHlh8mEFEU

72 more comments

Can confirm in 23w06a

Can confirm in 1.20.1

Minecraft386882

Can confirm for 1.21.3

dang this is the oldest open ticket in java mc, wow

Oliver Michalík

It might be just a visual effect, as minecart and boat rendered location is significantly behind the actual location. This is probably so the movement looks smooth, so they delay the rendered location to calculate and play movement animation.

Jochen Theodorou

[Mod] markderickson

(Unassigned)

Confirmed

Platform

Normal

Minecart

minecart

Minecraft 1.4.2, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w05b, ..., 23w51b, 24w40a, 1.21.3, 1.21.4, 25w05a

Retrieved