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

Dispenser ignores DisabledSlots value of armor stands

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.11, Minecraft 1.12.2, Minecraft 1.13-pre1, Minecraft 1.13.1, 1.16.1, 20w27a, 1.16.4, 20w48a, 21w03a, 21w05b, 21w06a, 21w07a, 21w15a, 1.17.1
    • Confirmed
    • (Unassigned)

      The bug

      Dispensers ignore the DisabledSlots value of armor stands. This means players can just place dispensers next to armor stands to equip armor even if they normally are not allowed to do this.

      How to reproduce

      1. Use the following command, the armor stand should prevent the player from placing any item in one of the slots of it
        /summon armor_stand ~ ~ ~ {DisabledSlots:2031616,ShowArms:1b}
        
      2. Place a dispenser next to the armor stand facing it
      3. Place some piece of armor in the dispenser and activate it
        The armor item is placed in the slot of the armor stand

      The reason

      The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

      The reason why this happens is because the method net.minecraft.item.ItemArmor.func_185082_a(IBlockSource, ItemStack) is used which just places the armor piece in one of the slots.

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            13 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: