From 4e69cc5a968be4fff4070789cba2acd2458e04ac Mon Sep 17 00:00:00 2001 From: Shyanne Date: Fri, 29 Sep 2023 15:00:50 -0400 Subject: [PATCH] Update BlockFormListener.java added variable for checking if its a basalt generator Co-authored-by: Peaches_MLG --- .../iridium/iridiumskyblock/listeners/BlockFormListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java b/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java index 703771221..7581249ec 100644 --- a/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java +++ b/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java @@ -32,8 +32,8 @@ public void onBlockForm(BlockFormEvent event) { if (!generatorMaterials.contains(newMaterial)) return; IridiumSkyblock.getInstance().getIslandManager().getTeamViaLocation(event.getNewState().getLocation()).ifPresent(island -> { int upgradeLevel = IridiumSkyblock.getInstance().getIslandManager().getTeamEnhancement(island, "generator").getLevel(); - - RandomAccessList randomMaterialList = newMaterial == XMaterial.BASALT ? netherOreLevels.get(upgradeLevel) : normalOreLevels.get(upgradeLevel); + boolean isBasaltGenerator = newMaterial == XMaterial.BASALT; + RandomAccessList randomMaterialList = isBasaltGenerator ? netherOreLevels.get(upgradeLevel) : normalOreLevels.get(upgradeLevel); if (randomMaterialList == null) return; Optional xMaterialOptional = randomMaterialList.nextElement();