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

Items get deleted when the crafting recipe overflows the inventory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 16w32a
    • Minecraft 1.4.2, Minecraft 1.4.5, Minecraft 1.4.7, Snapshot 13w04a, Snapshot 13w07a, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w18b, Snapshot 13w18c, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w38a, Minecraft 13w38b, Minecraft 13w38c, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w48a, Minecraft 13w48b, Minecraft 13w49a, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w18b, Minecraft 14w26c, Minecraft 1.7.10, Minecraft 14w27a, Minecraft 14w28a, Minecraft 14w32a, Minecraft 14w33a, Minecraft 14w33c, Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre2, Minecraft 1.8.1-pre5, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.2-pre2, Minecraft 1.8.2-pre3, Minecraft 1.8.2-pre4, Minecraft 1.8.6, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w31a, Minecraft 15w31c, Minecraft 15w32a, Minecraft 15w32b, Minecraft 15w32c, Minecraft 15w33c, Minecraft 15w36d, Minecraft 15w38a, Minecraft 15w38b, Minecraft 15w39b, Minecraft 15w39c, Minecraft 15w42a, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47b, Minecraft 15w47c, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w04a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2
    • None
    • Confirmed
    • Survival

      When crafting something that gives more than one item as an result (e.g. diamond blocks to diamonds, stairs, slabs) and not all resulting items fit into the inventory, the overflow gets deleted.

      Steps to reproduce
      1. Prepare your inventory like this (Put the diamond blocks into the free spot, instead of the crafting field)

      2. Make sure you are in survival (/gamemode 0)
      3. Craft the 8 diamond blocks into diamonds.
      4. The expected result would be 72 diamonds (8*9), but you only get 64 2014-11-19_20.24.48.png

      Ways to fix
      I mainly see two ways to fix this.
      1. Check if there is enough space in the inventory before hand (This is probably a bit more work to implement as there is no such method, I think)
      2. Drop the overflowing items.
      While I personally prefer the first one, the second one should be easy to implement.
      It is a one liner, but due to old copy paste code it would need to be change in several different spots (Villager, Player, Workbench, maybe also Furnace and Anvil).

      So for a nice fix some more generic Inventory/Container code would be good.

      Code analysis: https://bugs.mojang.com/browse/MC-1555?focusedCommentId=288028&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-288028


      Fix note: https://twitter.com/_LadyAgnes/status/762734666042441730

            FruBasilicum [Mojang] Agnes Larsson
            panda4994 [Mojang] Panda
            Votes:
            146 Vote for this issue
            Watchers:
            30 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: