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

You can hold more than 64 items by your cursor

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      When you hold a few unstackable items or more than a normal stack of "low-stackable" items by your cursor (i.e. more than 16 ender pearls), and try to take another bigger than normal stack of the same item, you will leave a "usual" stack of the items in the slot but get all other items by you cursor; this happens even if you get more than 64 items in your cursor as a result.

      • In theory this allows you to hold any amount of items.
      • When you try to put this very big stack into an empty slot, you will put only 64 items.
      • When you drop this stack, you will get an item entity with a big Count number in memory

      Video of the issue:
      https://www.youtube.com/watch?v=1GmTgEB0aeY

      Steps to reproduce

      1. Get yourself a few stacks of 64 unstackable or "low-stackable" items using /give or /replaceitem
        Example commands:
        /replaceitem entity @p slot.hotbar.0 minecraft:mushroom_stew 64
        /give @p minecraft:ender_pearl 64
      2. Take these items (using left or right click) one by one

      Result: you get an arbitrary big stack of the items

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.inventory.Container.slotClick(int, int, ClickType, EntityPlayer), especially the click type ClickType.PICKUP and slotId not being -999 tests j2 > itemstack13.getMaxStackSize() - itemstack11.getCount() (j2 being the number of items to place in the slot). This could be fixed my using Math.max(0, j2 > itemstack13.getMaxStackSize() - itemstack11.getCount()).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Mhmd185 Mhmd adel arabi
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: