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

@@ -133,7 +133,9 @@ public abstract class GuiBase extends GuiContainer {
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;
lastSideButtonY = getSideButtonYStart();
@@ -152,6 +154,7 @@ public abstract class GuiBase extends GuiContainer {
}
protected void calcHeight() {
// NO OP
}
protected int getSideButtonYStart() {

View File

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