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

Pistons forget update when being reloaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.8.8, Minecraft 15w38a, Minecraft 15w38b, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 1.13-pre1, Minecraft 1.13.1, 1.14.4, 19w42a, 19w46b, 1.15.2, 20w06a, 20w07a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13b, 20w14a, 20w16a, 20w17a, 20w18a, 20w22a, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16.2, 1.16.3, 1.16.4, 20w45a, 21w03a, 1.16.5, 21w10a, 21w11a, 21w14a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 3, 1.17 Pre-release 5, 1.17, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1 Pre-release 2
    • Confirmed
    • Redstone
    • Normal
    • Platform

      When a piston is unloaded in the exact game tick he should extend or retract, he sometimes forgets to extend or retract after being reloaded.

      Video demonstrating the bug in 16w44a: https://www.youtube.com/watch?v=9bm5_fKPcDc

      According to the 1.10 code decompiled with MCP, pistons don´t extend or retract immediately when they´re updated and powered/unpowered, but they just schedule a block event, that gets processed later. Block Events get processed every tick. And only once the block events get processed the piston will extend/retract. However if the game is unloaded before the block events get processed, all scheduled block events get lost, because block events don´t get saved anywhere. Therefore, if the game is unloaded, pistons sometimes don´t extend or retract, even though they should.

      It should be mentioned, that before 1.9 pistons that forgot to retract didn´t just stay extended, but transformed into a state that looks like the one in this bug report MC-49981
      So while the bug that pistons get into a glitchy piston state when they forget to retract was resolved, the bug that pistons sometimes forget to retract has not been resolved yet.

      The situations depicted in the pictures below can occur if the game is unloaded in the exact moment the piston directly next to the lever finishes his extension.


      Code analysis and fix by Xcom6000 can be found in this comment.

        1. 2015-09-20_11.30.27.png
          2015-09-20_11.30.27.png
          64 kB
        2. 2015-09-20_11.31.47.png
          2015-09-20_11.31.47.png
          180 kB
        3. PistonsAfterRestart.png
          PistonsAfterRestart.png
          2.66 MB
        4. PistonsAfterRestartWithFix.png
          PistonsAfterRestartWithFix.png
          2.73 MB
        5. PistonsBeforeRestart.png
          PistonsBeforeRestart.png
          2.92 MB
        6. PistonsStoppedAfterRestart.png
          PistonsStoppedAfterRestart.png
          2.97 MB
        7. PistonsStoppedAfterRestartWithFix.png
          PistonsStoppedAfterRestartWithFix.png
          2.74 MB

            Unassigned Unassigned
            Selacos Exa
            Votes:
            183 Vote for this issue
            Watchers:
            59 Start watching this issue

              Created:
              Updated:
              CHK: