diff options
author | Rime <81419447+Emirlol@users.noreply.github.com> | 2024-06-29 06:47:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-29 11:47:31 +0800 |
commit | bc773c76b3362af799577c89fa6f7b79c1ee013b (patch) | |
tree | 06bb9956d7f2c13cd8922a14a6031843bf25a9f9 /src/main/java/de | |
parent | 4217bd6fa20d22a950b8a2eae49e54393511914e (diff) | |
download | Skyblocker-bc773c76b3362af799577c89fa6f7b79c1ee013b.tar.gz Skyblocker-bc773c76b3362af799577c89fa6f7b79c1ee013b.tar.bz2 Skyblocker-bc773c76b3362af799577c89fa6f7b79c1ee013b.zip |
Change OptionalInt cost to OptionalLong (#809)
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java b/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java index f9c1f7ae..f984d751 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java @@ -209,10 +209,10 @@ public class ChocolateFactorySolver extends ContainerSolver { } Matcher costMatcher = COST_PATTERN.matcher(coachLore); - OptionalInt cost = RegexUtils.getIntFromMatcher(costMatcher, multiplierIncreaseMatcher.hasMatch() ? multiplierIncreaseMatcher.end() : 0); //Cost comes after the multiplier line + OptionalLong cost = RegexUtils.getLongFromMatcher(costMatcher, multiplierIncreaseMatcher.hasMatch() ? multiplierIncreaseMatcher.end() : 0); //Cost comes after the multiplier line if (cost.isEmpty()) return Optional.empty(); - return Optional.of(new Rabbit(totalCps / totalCpsMultiplier * (nextCpsMultiplier.getAsDouble() - currentCpsMultiplier.getAsDouble()), cost.getAsInt(), COACH_SLOT)); + return Optional.of(new Rabbit(totalCps / totalCpsMultiplier * (nextCpsMultiplier.getAsDouble() - currentCpsMultiplier.getAsDouble()), cost.getAsLong(), COACH_SLOT)); } private static Optional<Rabbit> getRabbit(ItemStack item, int slot) { @@ -227,9 +227,9 @@ public class ChocolateFactorySolver extends ContainerSolver { } Matcher costMatcher = COST_PATTERN.matcher(lore); - OptionalInt cost = RegexUtils.getIntFromMatcher(costMatcher, cpsMatcher.hasMatch() ? cpsMatcher.end() : 0); //Cost comes after the cps line + OptionalLong cost = RegexUtils.getLongFromMatcher(costMatcher, cpsMatcher.hasMatch() ? cpsMatcher.end() : 0); //Cost comes after the cps line if (cost.isEmpty()) return Optional.empty(); - return Optional.of(new Rabbit((nextCps.getAsInt() - currentCps.getAsInt())*(totalCpsMultiplier < 0 ? 1 : totalCpsMultiplier), cost.getAsInt(), slot)); + return Optional.of(new Rabbit((nextCps.getAsInt() - currentCps.getAsInt())*(totalCpsMultiplier < 0 ? 1 : totalCpsMultiplier), cost.getAsLong(), slot)); } private static Optional<ColorHighlight> getPrestigeHighlight() { @@ -251,7 +251,7 @@ public class ChocolateFactorySolver extends ContainerSolver { return highlights; } - private record Rabbit(double cpsIncrease, int cost, int slot) { } + private record Rabbit(double cpsIncrease, long cost, int slot) { } public static final class Tooltip extends TooltipAdder { public Tooltip() { |