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

Lock of double chest is set when player tries to open chest and is based on direction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 18w03b, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a
    • Confirmed
    • (Unassigned)

      The bug

      When you have two locked chests next to each other forming a double chest, the lock for both chests is only set when a player tries to open the chest and is set based on the direction the chests are placed.

      Expected behavior

      When a chest is placed next to an existing chest, the lock of the existing chest should be set to the lock of the placed chest.

      Same should apply when using /blockdata.

      How to reproduce

      Lock set when player tries to open chest

      1. Place two locked chests next to each other
        /setblock ~1 ~ ~ chest default replace {Lock:"chestA"}
        
        /setblock ~1 ~ ~1 chest default replace {Lock:"chestB"}
        
      2. Use /blockdata to show the NBT data of the chests
        → The chests show Lock:"chestA" and Lock:"chestB"
      3. Try to open the chest
      4. Use /blockdata again
        → The chests show both Lock:"chestA"

      Direction based

      This is caused by how inventories of double chests are returned, changing it so that the lock is not set when the inventory is opened solves this as well

      1. Place two locked chests next to each other
        /setblock ~1 ~ ~ chest default replace {Lock:"chestA"}
        
        /setblock ~1 ~ ~-1 chest default replace {Lock:"chestB"}
        
      2. Try to open the chest
      3. Use /blockdata
        → Now both chests show Lock:"chestB" whereas in the steps above they showed Lock:"chestA"

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: