From c33e11914d47682502361e32c3b9dbc58e9accd0 Mon Sep 17 00:00:00 2001 From: Bella Date: Tue, 24 Mar 2020 18:45:49 -0400 Subject: [PATCH] code cleanup --- .../me/zeroeightsix/kami/util/BeaconGui.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/util/BeaconGui.java b/src/main/java/me/zeroeightsix/kami/util/BeaconGui.java index e29a4746..b0e16f0e 100644 --- a/src/main/java/me/zeroeightsix/kami/util/BeaconGui.java +++ b/src/main/java/me/zeroeightsix/kami/util/BeaconGui.java @@ -28,27 +28,27 @@ public class BeaconGui extends GuiBeacon { super(playerInventory, tileBeaconIn); } - boolean doRenderBtns; + boolean doRenderButtons; @Override public void initGui() { super.initGui(); - doRenderBtns = true; + doRenderButtons = true; } @Override public void updateScreen() { super.updateScreen(); - if (doRenderBtns) { + if (doRenderButtons) { int id = 20; int newY = this.guiTop; for (Potion[] pos1 : EFFECTS_LIST) { - for (int i = 0; i < pos1.length; i++) { - BeaconGui.PowerButtonCustom custompotion = - new BeaconGui.PowerButtonCustom(id, guiLeft-27, newY, pos1[i], 0); - this.buttonList.add(custompotion); - if (pos1[i] == Potion.getPotionById(BeaconSelector.effect)) { - custompotion.setSelected(true); + for (Potion potion : pos1) { + PowerButtonCustom customPotion = + new PowerButtonCustom(id, guiLeft - 27, newY, potion, 0); + this.buttonList.add(customPotion); + if (potion == Potion.getPotionById(BeaconSelector.effect)) { + customPotion.setSelected(true); } newY += 27; id++;