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

Replacing a container with identical state values can replace it despite this being considered impossible

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4, 19w44a, 19w45b, 19w46b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w13b, 20w14a, 20w15a, 20w18a, 20w19a, 20w20b
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Game Mode:
      Creative
    • Category:
      Camera

      Description

      Note

      The block states of certain blocks shouldn't be overwritten by identical state values due to an error message in the process. Thus, the report only refers to an issue in the container's state replacement accessible only whilst Cheats are enabled.

      The bug

      Container blocks, unlike any other block entity, can contain items. This is linked to nbt data, named also Items, that updates when items are added/removed (e.g. the Chest).

      So, I put it to the test to see if some block entities had the same update effect after being set with the same block state, and I discovered that certain block entities (such as containers) replace their content only in their nbt (unless they are linked to these items) and could possibly cause issues.

      One example can be replicated with the Campfire during its cooking state; replacing it with identical state values result in the appearance of an error message although the food items in its nbt have been updated, the food items are still visible (which pauses the cooking process)... Here are some experiments to prove my point on this issue:

      • Replacing any interactable container with the same state values removes its contents completely (despite the error message showing up). This applies to:
      • Chests
      • Hoppers
      • Droppers/Dispensers
      • Shulker boxes
      • Furnaces
      • Barrels
      • Blast furnaces
      • Smokers

       

      • Replacing a Lectern (wielding a book) with the same state values however, doesn't lose its content but results in the book GUI to open and instantly close.
      • Replacing a Campfire with another (during its cooking process) comes back with the error      message (if all its states match the previous), resulting in the cooking process to pause with its food items still displayed.

      EDIT: Related issue in MC-31100

      Reproduction steps

      • Place a campfire containing raw food items
      • Replace that block with the same state values using the command:
        /setblock [campfire location] campfire[states of target block]

        (now occurs the error message)

      • Execute the command:
        /data get block [campfire location] Items
        

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            J4TZplayZ J4TZplayZ
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: