aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/hysky/skyblocker')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java12
1 files changed, 6 insertions, 6 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 7c4bbbd6..bceee649 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java
@@ -56,13 +56,13 @@ public class ChocolateFactorySolver extends ContainerSolver {
.collect(Collectors.toCollection(LinkedList::new));
Int2ObjectMap.Entry<Rabbit> bestEntry = sorted.removeFirst();
- if (totalChocolate.isEmpty() || bestEntry.getValue().cost < totalChocolate.getAsLong()) return List.of(ColorHighlight.green(bestEntry.getIntKey()));
+ if (totalChocolate.isEmpty()) return List.of(ColorHighlight.yellow(bestEntry.getIntKey()));
- for (Int2ObjectMap.Entry<Rabbit> entry : sorted) {
- if (entry.getValue().cost > totalChocolate.getAsLong()) continue;
- return List.of(ColorHighlight.green(entry.getIntKey()), ColorHighlight.yellow(bestEntry.getIntKey()));
- }
- return List.of(ColorHighlight.green(bestEntry.getIntKey()));
+ if (bestEntry.getValue().cost <= totalChocolate.getAsLong()) return List.of(ColorHighlight.green(bestEntry.getIntKey()));
+
+ for (Int2ObjectMap.Entry<Rabbit> entry : sorted) if (entry.getValue().cost <= totalChocolate.getAsLong()) return List.of(ColorHighlight.green(entry.getIntKey()), ColorHighlight.yellow(bestEntry.getIntKey()));
+
+ return List.of(ColorHighlight.yellow(bestEntry.getIntKey()));
}
/**