From cd7de765146ca5f2f9a9aedc65a98a422f54751f Mon Sep 17 00:00:00 2001 From: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Date: Sun, 12 Jun 2022 00:47:39 +0800 Subject: [PATCH] fix + button on amount (#145) --- .../appeng/client/gui/implementations/GuiCraftAmount.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java b/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java index 5c90a77294d..bf4aa0dc298 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java +++ b/src/main/java/appeng/client/gui/implementations/GuiCraftAmount.java @@ -265,12 +265,16 @@ private void addQty( final int i ) int resultI; if( resultD <= 0 || Double.isNaN( resultD ) ) { - resultI = 1; + resultI = 0; } else { resultI = (int) ArithHelper.round(resultD, 0); } + if (resultI == 1 && i > 0) { + resultI = 0; + } + resultI += i; if( resultI < 1 ) { resultI = 1;