Fixed CraftingTweaks buttons resetting sometimes in the Crafting Grid.
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user