From bb627157c217d3ebd632e51447e60acce1a81f86 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 10 Mar 2025 22:24:01 +0100 Subject: fix: Weird tools for BP 7; feat: Options for jade; fix: tools for glass blocks in jade --- src/main/kotlin/repo/MiningRepoData.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin/repo/MiningRepoData.kt') diff --git a/src/main/kotlin/repo/MiningRepoData.kt b/src/main/kotlin/repo/MiningRepoData.kt index 548c3e5..e40292d 100644 --- a/src/main/kotlin/repo/MiningRepoData.kt +++ b/src/main/kotlin/repo/MiningRepoData.kt @@ -30,7 +30,7 @@ class MiningRepoData : IReloadable { private set var customMiningBlocks: List = listOf() private set - var toolsByBreakingPower: NavigableMap = Collections.emptyNavigableMap() + var toolsByBreakingPower: NavigableMap = Collections.emptyNavigableMap() private set @@ -44,7 +44,7 @@ class MiningRepoData : IReloadable { .comparingInt { it.breakingPower } .thenComparing(Comparator.comparing( { it.itemId }, - nullsFirst(Comparator.naturalOrder()))) + nullsFirst(Comparator.comparing { "PICK" in it.neuItem || "BING" in it.neuItem }.thenComparing(Comparator.naturalOrder())))) } } @@ -60,13 +60,14 @@ class MiningRepoData : IReloadable { repo.items.items .values .asSequence() + .map { SBItemStack(it.skyblockId) } .filter { it.breakingPower > 0 } - .associateTo(TreeMap(BreakingPowerKey.COMPARATOR)) { + .associateTo(TreeMap(BreakingPowerKey.COMPARATOR)) { BreakingPowerKey(it.breakingPower, it.skyblockId) to it }) } - fun getToolsThatCanBreak(breakingPower: Int): Collection { + fun getToolsThatCanBreak(breakingPower: Int): Collection { return toolsByBreakingPower.tailMap(BreakingPowerKey(breakingPower, null), true).values } -- cgit