Don't clear the button list in random places, also fixes #1494

Im not too sure why the button list is added to and cleared every frame, but this is a quick fix to something that should really be changed around at some point. Hopefully this fixes more than it breaks.
This commit is contained in:
modmuss50 2018-04-22 13:40:58 +01:00
parent d9d4c117d3
commit 7f8dff1dd0
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
9 changed files with 3 additions and 19 deletions

View file

@ -150,6 +150,7 @@ public class GuiBase extends GuiContainer {
@SideOnly(Side.CLIENT)
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
this.buttonList.clear();
drawTitle();
if(showSlotConfig){
GuiSlotConfiguration.draw(this, mouseX, mouseY);
@ -199,8 +200,6 @@ public class GuiBase extends GuiContainer {
}
public void addPowerButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -95,8 +95,6 @@ public class GuiBlastFurnace extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -91,8 +91,6 @@ public class GuiDistillationTower extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -54,8 +54,6 @@ public class GuiFluidReplicator extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -103,8 +103,6 @@ public class GuiFusionReactor extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {
@ -123,7 +121,8 @@ public class GuiFusionReactor extends GuiBase {
} else {
ClientProxy.multiblockRenderEvent.setMultiblock(null);
}
} else if (button.id == 300){
}
if (button.id == 300){
sendSizeChange(5);
} else if (button.id == 301){
sendSizeChange(1);

View file

@ -93,8 +93,6 @@ public class GuiImplosionCompressor extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -97,8 +97,6 @@ public class GuiIndustrialGrinder extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -96,8 +96,6 @@ public class GuiIndustrialSawmill extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {

View file

@ -88,8 +88,6 @@ public class GuiVacuumFreezer extends GuiBase {
}
public void addHologramButton(int x, int y, int id, Layer layer) {
if (id == 0)
buttonList.clear();
int factorX = 0;
int factorY = 0;
if (layer == Layer.BACKGROUND) {