mojira.dev
MC-65748

Powered Rail "power level" does not propagate properly

[media]

New overview for clarity:
------------------------------

(Terminology used: Golden Rail == minecraft:golden_rail <powered=false>, Powered Rail == minecraft:golden_rail <powered=true>, <this is a block state>)

Powered rails do not update properly when being powered. Because they store their power value in a boolean (yes/no), when a powered rail that is powered through the conductivity of golden rails receives power from a redstone power source, the power does not continue to propagate down the line. As long as any specific golden rail does not receive an update, it cannot change state.

Abuses:
The first case in the gif above is the most obvious case: if you power a powered rail, then the other rails do not update until receiving an outside update. This can be used for minecart stations, as in Sancarn's Evolution of a Minecart Station series. This case is just annoying and can be useful when playing with BUD creations.
It is possible to power an infinitely long line of golden rail with only one power source. To replicate, simply make a line of golden rail and then power each one with a redstone torch, then remove the torches from one side, leaving the last one. The rail remains powered. This case could be considered an exploit of game mechanics. It is possible to set this up using only two torches, but this setup is easier to understand.

This is more likely a implementation flaw than a bug, but deserves to be documented.

Suggested change:

  • minecraft:golden_rail replaces it's boolean <powered> with a four bit integer <power> from 0-9.

  • A <power> of 0 is unpowered, like the old <powered=false>, and a <power> between 1 and 9 acts like the old <powered=true>.

  • When minecraft:golden_rail receives a redstone update, it first checks to see it is receiving a redstone signal, like normal, and if so, sets it's <power> to 9. It then propagates a redstone update to all adjacent blocks, as would a piece of redstone updating it's power level.

  • If there are no direct redstone signals for the block, the block then checks for adjacent minecraft:golden_rail. If it finds one with a <powered> > 0, it takes the highest adjacent <power> and sets it's own <power> to the adjacent <power> - 1. It then propagates a redstone update to all adjacent blocks, as would a piece of redstone updating it's power level.

Possible feature creep by change:

  • Since block state is tied to the rendering system, brightness level of golden rail's glow depending on <power>.

  • Redstone signal strength into golden rail determines how far the power propagates.

  • Different speed boost depending on <power>.

Old overview:

(Is there any way to collapse this?)
------------------------------
This is one of the stranger bugs I have encountered, and hard to explain with text. For clarity, I have created a video.

http://youtu.be/c24XFa6n6Lw
(Sorry for awkwardness - I've only recorded a couple videos so far)

Content of the Video:
---------------------------

Powered Rails in minecraft only store their power as a boolean (yes/no), unlike redstone.

Because of this, it is possible to trick a powered rail into thinking it is powered when it should not be, or vice versa.

Normally, power in powered rails travels eight blocks away from the source. If you place a source down along this length (where it does not provide a redstone update to the unpowered rails), no unpowered rails update to the powered state. If you create a line of completely powered track and destroy the power sources in a way that no rail that should no longer be powered receives a redstone update, no rail depowers.

Steps to reproduce:

Case A:

  1. Create a line of powered rail

  2. Place down a redstone torch to power it

  3. Place down another redstone torch on the powered bit that does not provide a redstone update to the unpowered rail

  4. Note no rail gets power until manually updated

Case B:

  1. Create a flat line of powered rail

  2. Place redstone torches all along the side

  3. From one side, destroy all the torches but the last one in order

  4. Note no rail gets depowered

Possible solution:

Have powered rail store power in the same way redstone does, rather than just a boolean.

Possible featurecreep enabled by above solution:

  • More/Less speed depending on power?

  • Redstone level put into rail effects how many powered rail are powered? (redstone's power: value converts linearly to powered rail's power: value)

  • More balance for possible return of faster minecarts?

Related issues

Comments

migrated

Case B works as intended, as powered rails will propgate power from the source of the power for up to 9 blocks.

migrated

Have you done it? Now that the video is up you can see me demonstrate. The thing is that the rails DON"T depower, even when more than 20 blocks away from any power source

qmagnet

I agree this is strange. Not sure it's a bug, perhaps an oversight.

migrated

Yes, it still affects 1.8.1. Until they change how the rail powering is figured to use the blockstate data tag, I expect this will stay. I'm currently writing a clearer report now that I've played with this for a while.

Sorry for not updating this issue. One other thing that I would like to say, however, is that this can be used creatively as well, as in the case of this minecart station by Sancarn, where he also describes this activity: https://www.youtube.com/watch?v=iD_h2bBFc1U

I would agree, however, that this may be classified less as a bug but as more of a possible design flaw, and may end up staying for the same reason the piston BUD did. It would still be nice for official confirmation of Works As Intended or even just Won't Fix, so I am making my better explanation now.

(Also, that was way too much text.)

EDIT: Update complete.

migrated

@Christopher Durham
Does this affect 1.8.2-pre1?

migrated

@Lucas Ignacio Morrison Osorio
>.< derp >.<
Yes, it does.

migrated

(Unassigned)

Unconfirmed

Minecraft 14w32a, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.2-pre6

Retrieved