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

Shift-clicking in player inventory cannot move items into off-hand if item is no off-hand item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 15w32a, Minecraft 15w35b, Minecraft 15w45a, Minecraft 16w35a, Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.13.1, 1.15.2
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Shift clicking an item which is not an offhand item (like a shield) will never move it to the offhand, even if no other slots are free or the offhand has already the same item.

      How to reproduce

      1. Place a chestplate in the chest armor slot
      2. Will your complete inventory except the offhand slot with items
      3. Try to shift click the chestplate into the offhand slot
        → It does not work

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.inventory.ContainerPlayer.transferStackInSlot(EntityPlayer, int) only tries to merge items with items in slots up to (excluding) index 45 which is the offhand. Therefor the items cannot be moved into the offhand.

        Attachments

        1. 2015-08-05_19.18.36.png
          238 kB
          Enzo Lopez
        2. 2015-08-05_19.18.38.png
          245 kB
          Enzo Lopez

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ezeglace Enzo Lopez
              Votes:
              12 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: