Escaping out of the crafting gui goes back to the grid gui
This commit is contained in:
@@ -14,6 +14,7 @@ public class GuiCraftingSettings extends GuiBase {
|
||||
private GuiGrid gridGui;
|
||||
private int id;
|
||||
private GuiButton startButton;
|
||||
private boolean isClosed;
|
||||
|
||||
public GuiCraftingSettings(GuiGrid gridGui, int id) {
|
||||
super(new ContainerDummy(), 143, 61);
|
||||
@@ -60,6 +61,8 @@ public class GuiCraftingSettings extends GuiBase {
|
||||
} else {
|
||||
if (keyCode == Keyboard.KEY_RETURN) {
|
||||
startRequest();
|
||||
} else if (keyCode == Keyboard.KEY_ESCAPE) {
|
||||
FMLClientHandler.instance().showGuiScreen(gridGui);
|
||||
} else {
|
||||
super.keyTyped(character, keyCode);
|
||||
}
|
||||
|
@@ -68,6 +68,11 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
|
||||
satisfied[i] = true;
|
||||
|
||||
// This is needed because if we request 2 chests for example
|
||||
// it will schedule 2 child tasks for wood the child tasks will then give 8 wood
|
||||
// but the first chest task will take all the 8 wood for completion
|
||||
// and then you end up with the second task not having anything anymore
|
||||
// and is stuck because the child task is already created.
|
||||
if (childTasks[i]) {
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user