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();