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

Breaking non-container comparator-enabled blocks doesn't send a comparator update through blocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 15w49a, Minecraft 15w49b, Minecraft 1.8.9, Minecraft 15w50a, Minecraft 15w51a, Minecraft 15w51b, Minecraft 1.10.2, Minecraft 16w38a, Minecraft 16w44a, Minecraft 1.13.1, 1.15.2, 1.16 Release Candidate 1, 1.16, 1.17.1, 1.20.2, 1.21.3
    • None
    • Confirmed
    • (Unassigned)

      The bug

      As you may know, comparators are able to get a redstone signal from cakes, cauldrons, command blocks, end portal frames, item frames, and jukeboxes, depending on the status of the block/entity in question. As with containers, they are able to read this signal through solid blocks. However, non-containers do not send a comparator update when they break, are fully eaten, are /killed, or are otherwise removed from the game, meaning that a comparator reading it through a solid block will not change power levels until it receives an update from another source.

      Placing or updating these blocks will send comparator updates as expected; it is only when they are removed that this happens.

      Note that containers used to have an identical problem (MC-11109), which was fixed in 2013.

      How to reproduce

      1. Place cake next to a solid block, with a comparator leading out.
      2. Go to survival mode, and use the command /effect @p hunger 1 100 as necessary to eat all the cake. Note, after the last slice, that the comparator remains powered.
      3. Replace the cake.
      4. Break it and note that the comparator is still powered.
      5. Place a cauldron next to the solid block and fill it with water.
      6. Break it and note that the comparator is still powered.
      7. Place a command block next to the solid block, enter the command /say hi (or any other command that will successfully execute), and power it.
      8. Break it and note that the comparator is still powered.
      9. Place an end portal frame next to the solid block, and insert an eye of ender.
      10. Break it and note that the comparator is still powered.
      11. Place an item frame on the solid block and insert an item.
      12. Stand next to it, run /kill @e[r=5,type=item_frame] (version permitting) and note that the comparator is still powered. This one is less of a bug, since it requires console commands, but I am including it for completeness.
      13. Place a jukebox next to the solid block and insert a record.
      14. Break it and note that the comparator is still powered.
      15. Note that placing and modifying these blocks in any way that does not remove them from the world updates the comparator as expected.

      Code analysis

      Code analysis by Marcono1234 can be found in this comment.

        1. 2015-12-19_17.42.10.png
          2015-12-19_17.42.10.png
          184 kB
        2. 2015-12-19_17.43.42.png
          2015-12-19_17.43.42.png
          226 kB
        3. 2015-12-19_17.44.13.png
          2015-12-19_17.44.13.png
          243 kB
        4. 2015-12-19_17.44.36.png
          2015-12-19_17.44.36.png
          312 kB
        5. 2015-12-19_17.44.55.png
          2015-12-19_17.44.55.png
          257 kB
        6. 2015-12-19_17.45.08.png
          2015-12-19_17.45.08.png
          547 kB
        7. 2015-12-19_17.45.14.png
          2015-12-19_17.45.14.png
          266 kB
        8. 2015-12-20_03.20.23.png
          2015-12-20_03.20.23.png
          124 kB
        9. 2015-12-20_03.20.33.png
          2015-12-20_03.20.33.png
          127 kB
        10. 2015-12-20_03.20.48.png
          2015-12-20_03.20.48.png
          102 kB
        11. 2015-12-20_03.20.55.png
          2015-12-20_03.20.55.png
          115 kB
        12. 2015-12-20_03.21.03.png
          2015-12-20_03.21.03.png
          90 kB
        13. 2015-12-20_03.21.06.png
          2015-12-20_03.21.06.png
          131 kB
        14. 2015-12-20_03.21.14.png
          2015-12-20_03.21.14.png
          117 kB
        15. 2015-12-20_03.21.16.png
          2015-12-20_03.21.16.png
          113 kB
        16. 2015-12-20_03.21.28.png
          2015-12-20_03.21.28.png
          97 kB
        17. 2015-12-20_03.21.35.png
          2015-12-20_03.21.35.png
          123 kB
        18. 2015-12-20_03.21.38.png
          2015-12-20_03.21.38.png
          109 kB

            Unassigned Unassigned
            AjaxGb AjaxGb
            Votes:
            12 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: