Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-11193

The order in which powerable blocks (e.g. redstone dust blocks) along a wire are powered or de-powered is not clearly defined and causes a non-deterministic behavior for redstone contraptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Snapshot 13w10b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Snapshot 13w16a, Minecraft 1.5.2, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w21a, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w36a, Minecraft 13w36b, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 14w04b, Minecraft 14w05b, Minecraft 14w06a, Minecraft 14w06b, Minecraft 1.7.5, Minecraft 1.7.9, Minecraft 14w20a, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b, Minecraft 14w34d, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 15w33c, Minecraft 1.8.9, Minecraft 16w03a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w07c, Minecraft 18w16a, Minecraft 18w21b, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w45a, Minecraft 19w07a, Minecraft 1.14.2, Minecraft 1.14.3, 1.14.4, 19w37a, 19w46b, 1.15 Pre-release 1, 1.15 Pre-release 4, 1.15.2, 20w06a, 20w13b, 20w18a, 20w22a, 1.16 Pre-release 5, 1.16.1, 1.16.3, 20w49a, 20w51a, 21w03a, 1.16.5, 1.17, 1.17.1, 21w39a, 21w43a, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 23w03a, 1.19.4 Release Candidate 3, 1.19.4, 23w14a, 1.20, 1.20.1, 23w42a, 1.21, 1.21.1, 24w40a, 1.21.3
    • Confirmed
    • Redstone
    • Low
    • Platform

      First of all: This is NOT a duplicate of MC-108. This ticket actually assumes that the behavior described in MC-108 is intended behavior.

      Second of all: Sorry, for finding another redstone issue just before the planned pre-release of 1.5, Jeb. :-/

      UPDATE: I also made a video demonstration for the bug here: http://www.youtube.com/watch?v=e5hUYLC8Tms You don't have to read all the text anymore.

      The setup

      Build a setup like in screenshots "basic-setup-1.png" and "basic-setup-2.png" or download and extract MC-11193.zip into your worlds folder for a prebuilt version.

      The behavior

      Case A

      Do this:

      • Break the redstone wire somewhere.
      • Reconnect it and try breaking it again somewhere else.

      Expected behavior: The piston should always retract, independent of the location where the wire was broken.

      Case B

      Preparation: First of all, remove the redstone block at the very left. Then:

      • Put a redstone block onto one of the blue or gold blocks.
      • Remove it again and try placing it on another blue or gold block.

      Expected behavior: The piston should always retract after removing the redstone block, independent of the location of the block.

      Experienced behavior:

      The retraction of the piston actually depends on two factors:

      • From which location in the world was the redstone wire powered? (Or at which location was the wire broken?)
      • Where is the piston located in the world?

      The problem's source

      The order in which redstone dust blocks that are part of a redstone wire are powered/de-powered seems somewhat undefined/random and seems both dependent on the location of the energy source and the location of those dust blocks. To better understand what I mean, do this:

      • Remove the piston.
      • Put a command block below each of the two wool blocks.
      • Set the command block on the left (as on the screenshot) to "say 1".
      • Set the other command block to "say 2".
      • Power the wire from different locations or break the wire at different locations.
      • Notice that the order changes in which the command blocks are fired.

      This undefined powering order results in the following behaviour.

      As described in MC-108, a piston can be powered diagonally from the top but needs a block update to adjust accordingly to the power level then. In the setup of this ticket, the magenta wool block can power the piston diagonally from the top. Additionally, the green wool block can power the piston directly from the top.

      When de-powering the wire, you would expect the following to happen:

      1. The redstone dust block ontop of the magenta wool block de-powers which de-powers the magenta wool block itself. So the diagonal power source gets turned off. However, this does not update the piston yet.
      2. The redstone dust block ontop of the green wool block de-powers which de-powers the green wool block itself. As the green wool block is adjacent to the piston, the piston receives a block update. It then checks if it should still be extended and thereby finds out that it actually should retract.

      In some occurrences this actually is what happens. Everything is good in those situations.

      However, because of the random redstone dust wire powering order it occurs that actually the green wool block gets de-powered BEFORE the magenta wool block. In those situations, the following happens:

      1. The redstone dust block ontop of the green wool block de-powers which de-powers the green wool block itself. This provides a block update to the piston. The piston finds out that it is still powered diagonally (by the magenta wool block which is - at this very moment - still powered). For this reason it does not retract.
      2. The redstone dust block ontop of the magenta wool block de-powers which de-powers the magenta wool block itself. Since the wool block is not directly adjacent to the piston, the piston does NOT receive another block update.

      In this situation, the piston simply gets stuck.

      Conclusion

      I always understood Mincraft in a way that every redstone contraption should be deterministic and independent of its location in the world, i.e. you should be able to build something somewhere and if you build the same thing somewhere else it should behave exactly the same. (Deterministic of course still allows bugs like MC-108 - even though this is a somewhat unexpected behavior, it is predictable and well-understood. Apart from that I still consider MC-108 a bug... but that's just my personal stance and does not have anything to do with this ticket.)

      However, as described, the powering order of redstone dust blocks in wires is dependent on the location of those redstone blocks in the world. This results in a somewhat undeterministic behavior: If you build the very same redstone contraption anywhere else in the world, it would work differently - just because of a different wire powering order you encounter there.

      To sum everything up: This ticket describes the need for a well-defined wire powering order to make redstone contraptions deterministic again (or at least "more" deterministic ). IMO, the best resolution would be to simply "follow" the wire and update the power level step-by-step "on the way". This would also reflect real-world power currents best in this case. (Or to put it differently: You would also most likely expect this to happen based upon your real-world experience with power currents.)


      Solution provided by panda4994 can be found here.

        1. 2015-06-20_14.03.08.png
          738 kB
          bob
        2. 2016-04-09_20.26.08.png
          623 kB
          a a
        3. 2020-06-15_14.39.08.png
          1.13 MB
          Steven Fan
        4. 2020-06-15_14.39.10.png
          1.11 MB
          Steven Fan
        5. 2020-06-15_14.45.20.png
          728 kB
          Steven Fan
        6. 2020-06-15_14.45.32.png
          729 kB
          Steven Fan
        7. 2020-06-15_14.45.56.png
          728 kB
          Steven Fan
        8. 2020-06-15_14.46.09.png
          726 kB
          Steven Fan
        9. basic-setup-1.png
          355 kB
          The.Modificator
        10. basic-setup-2.png
          801 kB
          The.Modificator
        11. DiamondShape.gif
          691 kB
          [Mojang] Panda
        12. image-2020-06-15-14-39-29-919.png
          1.13 MB
          Steven Fan
        13. image-2020-06-15-14-48-29-121.png
          728 kB
          Steven Fan
        14. image-2020-06-15-14-48-46-781.png
          729 kB
          Steven Fan
        15. image-2020-06-15-14-51-55-708.png
          728 kB
          Steven Fan
        16. image-2020-06-15-14-52-17-953.png
          726 kB
          Steven Fan
        17. JumpingUpdate.png
          32 kB
          [Mojang] Panda
        18. strange_behaviour.png
          146 kB
          CharlesC

            Unassigned Unassigned
            the.modificator The.Modificator
            Votes:
            365 Vote for this issue
            Watchers:
            135 Start watching this issue

              Created:
              Updated:
              CHK: