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

Certain situations do not count as player dropping an item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 16w05b, Minecraft 1.10.2, Minecraft 16w43a, 20w07a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The following is based on a decompiled version of Minecraft 1.8 using MCP. All method and class names are the ones used in the decompiled version.

      The bug

      The method public EntityItem dropPlayerItemWithRandomChoice(ItemStack itemStackIn, boolean p_71019_2_) of the class net.minecraft.entity.player.EntityPlayer is used to drop items while having a container GUI open or when you get an item but have no space in your inventory.

      This happens under multiple circumstances, for example when you press "Q" (or the key you assigned) while having a container GUI open or when you close your inventory while you have items placed in the crafting grid. This is report is about the latter one. In 1.8 all cases except player is pressing "Q" are handled as item was not dropped by player, but in my opinion that is not correct.

      Affected situations

      Closing GUI
      • net.minecraft.inventory.Container (Item in hand)
      • net.minecraft.inventory.ContainerEnchantment
      • net.minecraft.inventory.ContainerMerchant
      • net.minecraft.inventory.ContainerPlayer (2x2 crafting grid)
      • net.minecraft.inventory.ContainerRepair
      • net.minecraft.inventory.ContainerWorkbench
      Using item
      • net.minecraft.item.ItemBucket
      • net.minecraft.item.ItemEmptyMap
      • net.minecraft.item.ItemGlassBottle
      Other
      • net.minecraft.inventory.SlotCrafting
      • net.minecraft.entity.passive.EntityCow (Milking)

      How to reproduce (closing container)

      1. Place an enchanting table
      2. Place a book in your hotbar
      3. Fill all other slots with a different item (e.g. stone); with one stack having more than one item
      4. Open the enchanting table
      5. Place the book in the corresponding slot
      6. Fill the now free slot in your inventory with the spare item from step 3
      7. Close the enchanting table (by pressing E or Esc)
        The book is thrown out because there is no space in your inventory
      8. Inspect the item entity data
        /data get entity @e[type=item,limit=1] Thrower
        

        It has no thrower even though you threw it (passively)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
              Votes:
              8 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: