From 577e2ebbf9020471f69e612cce1f51d2421f8405 Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Sat, 3 Apr 2021 17:04:05 -0400 Subject: [PATCH] Fix dupe bug when shift clicking in the part builder (#4285) The stack parameter is useless, its empty on shift click --- .../inventory/table/partbuilder/PartBuilderContainer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/slimeknights/tconstruct/tables/inventory/table/partbuilder/PartBuilderContainer.java b/src/main/java/slimeknights/tconstruct/tables/inventory/table/partbuilder/PartBuilderContainer.java index a0ef6969992..2a1f9e5d04b 100644 --- a/src/main/java/slimeknights/tconstruct/tables/inventory/table/partbuilder/PartBuilderContainer.java +++ b/src/main/java/slimeknights/tconstruct/tables/inventory/table/partbuilder/PartBuilderContainer.java @@ -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);