Skip to content

Commit

Permalink
Fix dupe bug when shift clicking in the part builder (#4285)
Browse files Browse the repository at this point in the history
The stack parameter is useless, its empty on shift click
  • Loading branch information
KnightMiner committed Apr 3, 2021
1 parent c1a5ac1 commit 577e2eb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ private void updateResult() {
public void onCrafting(PlayerEntity playerEntity, ItemStack output, IInventory craftMatrix) {
// TODO: who calls, and when?
PartRecipe recipe = this.getPartRecipe();
if (!output.isEmpty() && recipe != null) {
// output parameter is empty on shift click, just ignore it and shrink once
if (recipe != null) {
// TODO: probably set a flag to prevent recipe updates for a bit
// TODO: it does not currently update? life is weird
this.patternSlot.decrStackSize(1);
Expand Down

0 comments on commit 577e2eb

Please sign in to comment.