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

Some piston operations don't send neighbor updates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 25w04a
    • 25w03a
    • None
    • Confirmed
    • Redstone
    • Important
    • 1357236
    • Expansion A

      After the fix of MC-279326, some piston operations still don't cause neighbor updates, as they used to before 25w02a. This means many redstone contraptions containing piston blocks may break.

      Steps to reproduce:
      Follow the visual instructions in the attached video.
      The redstone dust is supposed to depower after the lever is destroyed by the piston.

      Code analysis and proposed solution:
      This issue still persists because the observer subissue(MC-279326) seems to have been fixed by allowing the UPDATE_MOVE_BY_PISTON flag, in alternative to UPDATE_NEIGHBORS, to also cause calling BlockStateBase#affectNeighborsAfterRemoval, but two of the different combinations of flags in PistonBaseBlock#moveBlocks don't contain the UPDATE_MOVE_BY_PISTON flag, thus causing the general issue of missing updates to partly persist.
      I would encourage fixing this by removing the UPDATE_MOVE_BY_PISTON flag check in LevelChunk#setBlockState and instead adding the UPDATE_NEIGHBORS flag (either in-place or an intermediate method) to any place UPDATE_MOVE_BY_PISTON is used and a neighbor update is expected, and to all the combinations of flags in PistonBaseBlock#moveBlocks, except the UPDATE_NONE | UPDATE_KNOWN_SHAPE combination (that one would actually negatively impact the current behavior if modified because sticky pistons pulling a block are not supposed to cause a neighbor update on retraction).

            gnembon [Mojang] Gnembon
            VelizarBG Velizar
            Votes:
            15 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: