Skip to content

Commit

Permalink
no negative values here
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0inx committed Mar 1, 2024
1 parent c3cc083 commit ade8705
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ public Island(int id) {
public int getLevel() {
if (!IridiumSkyblock.getInstance().getConfiguration().isLevelExponential) {
if (IridiumSkyblock.getInstance().getConfiguration().flatExpRequirement != 0)
return getExperience() / IridiumSkyblock.getInstance().getConfiguration().flatExpRequirement;
return Math.abs(getExperience() / IridiumSkyblock.getInstance().getConfiguration().flatExpRequirement);

return getExperience();
}

if (IridiumSkyblock.getInstance().getConfiguration().flatExpRequirement != 0) {
return (int) Math.floor(Math.pow(
return Math.abs((int) Math.floor(Math.pow(
getExperience() / (double) IridiumSkyblock.getInstance().getConfiguration().flatExpRequirement,
IridiumSkyblock.getInstance().getConfiguration().curvedExpModifier) + 1);
IridiumSkyblock.getInstance().getConfiguration().curvedExpModifier) + 1));
}

return (int) Math.floor(Math.pow(getExperience(), IridiumSkyblock.getInstance().getConfiguration().curvedExpModifier) + 1);
return Math.abs((int) Math.floor(Math.pow(getExperience(), IridiumSkyblock.getInstance().getConfiguration().curvedExpModifier) + 1));
}

@Override
Expand Down

0 comments on commit ade8705

Please sign in to comment.