Skip to content

Commit

Permalink
Update BlockFormListener.java
Browse files Browse the repository at this point in the history
added variable for checking if its a basalt generator

Co-authored-by: Peaches_MLG <[email protected]>
  • Loading branch information
sh0inx and PeachesMLG authored Sep 29, 2023
1 parent 4dbd8d6 commit 4e69cc5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<XMaterial> randomMaterialList = newMaterial == XMaterial.BASALT ? netherOreLevels.get(upgradeLevel) : normalOreLevels.get(upgradeLevel);
boolean isBasaltGenerator = newMaterial == XMaterial.BASALT;
RandomAccessList<XMaterial> randomMaterialList = isBasaltGenerator ? netherOreLevels.get(upgradeLevel) : normalOreLevels.get(upgradeLevel);
if (randomMaterialList == null) return;

Optional<XMaterial> xMaterialOptional = randomMaterialList.nextElement();
Expand Down

0 comments on commit 4e69cc5

Please sign in to comment.