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

Stackable offhand item cannot be shift clicked to stack in offhand

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Awaiting Response
    • Affects Version/s: Minecraft 1.11.2, Minecraft 1.12.1
    • Fix Version/s: None
    • Confirmation Status:
      Community Consensus

      Description

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The bug

      Introduction: This bug is currently theoretical or may only affect modded Minecraft versions because there are right now no stackable offhand items in vanilla Minecraft.

      Shift clicking a stackable offhand item does not move it into the offhand if there is already the same item even if there would be enough space for it.
      This is not MC-85216 since offhand items are always moved to the offhand first if there is no item in the offhand and otherwise merged with other inventory items. If MC-85216 is fixed in the expected way the game would probably first try to merge the item with the offhand and therefor this bug could not be seen anymore. However if another slot was added with a higher index or MC-85216 would be fixed in a different way this bug would be still visible.

      How to reproduce (modded)

      1. Set net.minecraft.item.Item.maxStackSize for ItemShield to 2
      2. Shift click a single shield
        → The shield is moved to the offhand slot
      3. Shift click a second single shield
        → The second shield is not moved to the offhand slot

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.inventory.ContainerPlayer.transferStackInSlot(EntityPlayer, int) will not move an offhand item to the offhand slot if there is already an item.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK:

                Zendesk Support