Skip to content

Commit

Permalink
[1.12] Fix duplication glitch when shift-clicking crafting recipes (#…
Browse files Browse the repository at this point in the history
…3218)

Thank you for the fix!
  • Loading branch information
TechLord22 committed May 15, 2023
1 parent eac5cda commit 209f47e
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -87,6 +87,8 @@ public static void setItems(EntityPlayer player, Map<Integer, Integer> slotIdMap
for (ItemStack oldCraftingItem : clearedCraftingItems) {
int added = addStack(container, inventorySlots, oldCraftingItem);
if (added < oldCraftingItem.getCount()) {
// only drop the items which were not added to the inventory
oldCraftingItem.shrink(added);
if (!player.inventory.addItemStackToInventory(oldCraftingItem)) {
player.dropItem(oldCraftingItem, false);
}
Expand Down

0 comments on commit 209f47e

Please sign in to comment.