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

Shift clicking ignores stacking restrictions if the same item is already in the slot



    • Bug
    • Status: Open
    • Resolution: Unresolved
    • Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 3, Minecraft 1.12 Pre-Release 4, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12, Minecraft 17w31a, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w09a, Minecraft 18w10d, Minecraft 18w14b, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, 1.14.4, 19w34a, 1.15 Pre-release 6, 1.15.1, 1.15.2, 1.16.4, 20w46a, 21w18a, 1.17, 1.17.1, 1.18.1
    • None
    • Confirmed
    • (Unassigned)


      The bug

      Shift clicking ignores stacking restrictions of a slot if this slot already contains the same item. This does not affect all slots with stacking restrictions because some of them do not use the (probably?) new method Slot.getSlotStackLimit().

      How to reproduce

      1. Place a brewing stand
      2. Place a glass bottle in the first potion slot
      3. Place a single glass bottle in your inventory and shift click it
        → You will see that the glass bottle stacked despite the potion slots of a brewing stand only permitting item stacks with a count of 1

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.inventory.Container.mergeItemStack(ItemStack, int, int, boolean) ignores the stacking restrictions of a slot if the same item is already in it.


        Issue Links



              Unassigned Unassigned
              marcono1234 [Mod] Marcono1234
              11 Vote for this issue
              6 Start watching this issue