Fixed CraftingTweaks buttons resetting sometimes in the Crafting Grid.

This commit is contained in:
raoulvdberge
2018-11-17 11:59:42 +01:00
parent 2e8541611f
commit 90a0ddfdd7
3 changed files with 5 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
- Fixed network node scanning allowing multiple controllers in some cases (raoulvdberge) - Fixed network node scanning allowing multiple controllers in some cases (raoulvdberge)
- Fixed OpenComputers integration not giving back a crafting task instance in the schedule task API (raoulvdberge) - Fixed OpenComputers integration not giving back a crafting task instance in the schedule task API (raoulvdberge)
- Fixed OpenComputers integration causing log spam when getting processing patterns (raoulvdberge) - Fixed OpenComputers integration causing log spam when getting processing patterns (raoulvdberge)
- Fixed CraftingTweaks buttons resetting sometimes in the Crafting Grid (raoulvdberge)
- Removed getMissingItems() and getMissingFluids() functions from the OpenComputers integration, that info is now accessible through schedule(Fluid)Task(). If you just want to check if there are missing items/fluids but don't want to start an actual task, use the "canSchedule" parameter (raoulvdberge) - Removed getMissingItems() and getMissingFluids() functions from the OpenComputers integration, that info is now accessible through schedule(Fluid)Task(). If you just want to check if there are missing items/fluids but don't want to start an actual task, use the "canSchedule" parameter (raoulvdberge)
- Added fluid functions for the fluid autocrafting to the OpenComputers integration (raoulvdberge) - Added fluid functions for the fluid autocrafting to the OpenComputers integration (raoulvdberge)

View File

@@ -133,7 +133,9 @@ public abstract class GuiBase extends GuiContainer {
super.initGui(); super.initGui();
buttonList.clear(); if (!buttonList.isEmpty()) {
buttonList.removeIf(b -> !b.getClass().getName().contains("net.blay09.mods.craftingtweaks")); // Prevent crafting tweaks buttons from resetting
}
lastButtonId = 0; lastButtonId = 0;
lastSideButtonY = getSideButtonYStart(); lastSideButtonY = getSideButtonYStart();
@@ -152,6 +154,7 @@ public abstract class GuiBase extends GuiContainer {
} }
protected void calcHeight() { protected void calcHeight() {
// NO OP
} }
protected int getSideButtonYStart() { protected int getSideButtonYStart() {

View File

@@ -41,8 +41,6 @@ public class GuiCrafterManager extends GuiBase implements IResizableDisplay {
@Override @Override
protected void calcHeight() { protected void calcHeight() {
super.calcHeight();
this.ySize = getTopHeight() + getBottomHeight() + (getVisibleRows() * 18); this.ySize = getTopHeight() + getBottomHeight() + (getVisibleRows() * 18);
this.screenHeight = ySize; this.screenHeight = ySize;
} }