mojira.dev
MC-100236

Dispenser ignores DisabledSlots value of armor stands

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.

Linked issues

Attachments

Comments 12

Confirmed for 1.9.2.

Confirmed for 1.13.1.

Confirmed in 1.16.1 and 20w27a.

Can confirm in 20w48a.

Can confirm in 21w03a.

2 more comments

Can confirm in 21w07a.

Can confirm in 21w15a.

Can confirm in 1.17.1.

I can confirm this behavior in 1.20.4, and 1.20.5 Pre-Release 1. Here is a demonstration in the latest version:

[media]

marcono1234

(Unassigned)

Confirmed

(Unassigned)

DisabledSlots, armor_stand, dispenser

Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.11, Minecraft 1.12.2, ..., 21w07a, 21w15a, 1.17.1, 1.21, 1.21.5

Retrieved