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

Placing items on armor stand from off-hand impossible

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 15w31a, Minecraft 15w44b, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w38a, Minecraft 16w39a, Minecraft 16w39b, Minecraft 16w39c, Minecraft 16w40a, Minecraft 16w41a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13a, Minecraft 17w13b, Minecraft 17w14a, Minecraft 17w15a, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w50a, Minecraft 18w02a, Minecraft 18w05a, Minecraft 18w11a, Minecraft 18w22a, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03c, Minecraft 19w04b, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      If you try to put an item on an armor stand with the off-hand, nothing happens.

      Fix

      EntityArmorStand.java
      public EnumActionResult applyPlayerInteraction(EntityPlayer player, Vec3d vec, EnumHand stack)
          {
              ItemStack itemstack = player.getHeldItem(stack);
      		
              if (!this.hasMarker() && itemstack.getItem() != Items.NAME_TAG)
              {
      //          if (!this.world.isRemote && !player.isSpectator())
      ++          if (!player.isSpectator())
                  {
                      EntityEquipmentSlot entityequipmentslot = EntityLiving.getSlotForItemStack(itemstack);
      
                      if (itemstack.isEmpty())
                      {
                          EntityEquipmentSlot entityequipmentslot1 = this.getClickedSlot(vec);
                          EntityEquipmentSlot entityequipmentslot2 = this.isDisabled(entityequipmentslot1) ? entityequipmentslot : entityequipmentslot1;
      
                          if (this.hasItemInSlot(entityequipmentslot2))
                          {
                              this.swapItem(player, entityequipmentslot2, itemstack, stack);
      ++                      return EnumActionResult.SUCCESS;
                          }
                          
      ++                  return EnumActionResult.FAIL;
                      }
                      else
                      {
                          if (this.isDisabled(entityequipmentslot))
                          {
                              return EnumActionResult.FAIL;
                          }
      
                          if (entityequipmentslot.getSlotType() == EntityEquipmentSlot.Type.HAND && !this.getShowArms())
                          {
                              return EnumActionResult.FAIL;
                          }
      
                          this.swapItem(player, entityequipmentslot, itemstack, stack);
                      }
      
                      return EnumActionResult.SUCCESS;
                  }
                  else
                  {
      //              return EnumActionResult.SUCCESS;
      ++              return EnumActionResult.PASS;
                  }
              }
              else
              {
                  return EnumActionResult.PASS;
              }
          }
      

      Fixing this also fixes MC-112995.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Lord_Quadrato [Helper] Lord_Quadrato
              • Votes:
                14 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: