gigaherz / Ender-Rift

The Powered Bottomless Storage System
https://www.curseforge.com/minecraft/mc-mods/ender-rift
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Duplication bug with Crafting Browser #49

Closed sixtysixone closed 3 years ago

sixtysixone commented 3 years ago

Steps to reproduce:

1) Place Crafting Browser. Doesn't need inventory, just use as crafting table. 2) Put 4 stone in pattern to create 4 stone bricks 3) Shift+Click bricks in crafting result area (shift+click to "use all ingredients placed")

Expected: 4 bricks (1 recipe output) Actual: 8 bricks (2 recipe output)

Works with any recipe. Creates one extra of whatever you're crafting when you use shift+click. Have ingredients for 9 gold blocks, shift+click gets you 10 gold blocks.

gigaherz commented 3 years ago

Oof I'll take a look as soon as I can.

sixtysixone commented 3 years ago

I have a suspicion this might be related to inventory tweaks renewed or similar mod(s) (unconfirmed).

1) You check recipe and place crafting result into output, in CraftingBrowserContainer.java slotChangedCraftingGrid 2) Shift+click: A) Inventory tweaks (or whatever?) sees a stack of 1 item existing in output, and transfers it. B) Shift+click crafts as many as it can and transfers them.

gigaherz commented 3 years ago

Sorry that I took so long to fix. The bug was interesting, because it only happened when there was none of the output already in your inventory. So, first craft -> dupe Second craft -> ok I happened to try this time with something I didn't already have, and magic. Turns out I had a bug where it was trying to insert in the crafting slot itself, which added the items to themselves, duplicating the count. Already published v2.2.7.1 and v2.2.11 on curseforge, which should fix it.