mojira.dev
MC-114246

Item in offhand of armor stand with arms cannot be taken back

The bug

You cannot get the item from the offhand of an armor stand by right clicking the armor stand with an empty hand. Because shields are placed in the offhand when right clicking an armor stand with arms the expected behavior would be that you can get the shield back again as well.

How to reproduce

  1. Summon an armor stand with arms

    /summon armor_stand ~ ~ ~ {ShowArms:1b}
  2. Right click it while holding a shield

  3. Right click it again to get the shield back
    → You will notice that you cannot get the shield back

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The method net.minecraft.entity.item.EntityArmorStand.getClickedSlot(Vec3d) does not test if the armor stand has an item in the offhand.

Comments 1

Can confirm for MC 1.12.1.

marcono1234

migrated

Confirmed

armor_stand, item, off-hand, shield

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, , Minecraft 17w43b, Minecraft 17w47b, Minecraft 18w01a, Minecraft 18w11a, Minecraft 1.13-pre1

Minecraft 18w32a

Retrieved