+64 in crafting start GUI now gives 64 from the first time instead of 65, fixes #334
This commit is contained in:
@@ -14,7 +14,7 @@ import refinedstorage.network.MessageGridCraftingStart;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GuiCraftingSettings extends GuiBase {
|
||||
public class GuiCraftingStart extends GuiBase {
|
||||
private static final int DEFAULT_AMOUNT = 1;
|
||||
|
||||
private GuiTextField amountField;
|
||||
@@ -24,7 +24,7 @@ public class GuiCraftingSettings extends GuiBase {
|
||||
private GuiButton cancelButton;
|
||||
private GuiButton[] incrementButtons = new GuiButton[6];
|
||||
|
||||
public GuiCraftingSettings(GuiGrid gui, EntityPlayer player, ClientStackItem stack) {
|
||||
public GuiCraftingStart(GuiGrid gui, EntityPlayer player, ClientStackItem stack) {
|
||||
super(new ContainerCraftingSettings(player, stack.getStack()), 172, 99);
|
||||
|
||||
this.gui = gui;
|
||||
@@ -110,7 +110,7 @@ public class GuiCraftingSettings extends GuiBase {
|
||||
|
||||
int newAmount = Integer.parseInt(incrementButton.displayString);
|
||||
|
||||
newAmount = Math.max(DEFAULT_AMOUNT, oldAmount + newAmount);
|
||||
newAmount = Math.max(DEFAULT_AMOUNT, ((oldAmount == 1 && newAmount != 1) ? 0 : oldAmount) + newAmount);
|
||||
|
||||
amountField.setText(String.valueOf(newAmount));
|
||||
|
||||
@@ -373,7 +373,7 @@ public class GuiGrid extends GuiBase {
|
||||
ClientStackItem stack = (ClientStackItem) STACKS.get(slotNumber);
|
||||
|
||||
if (stack.isCraftable() && (stack.getQuantity() == 0 || (GuiScreen.isShiftKeyDown() && GuiScreen.isCtrlKeyDown()))) {
|
||||
FMLCommonHandler.instance().showGuiScreen(new GuiCraftingSettings(this, container.getPlayer(), stack));
|
||||
FMLCommonHandler.instance().showGuiScreen(new GuiCraftingStart(this, container.getPlayer(), stack));
|
||||
} else {
|
||||
int flags = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user