diff options
author | Linnea Gräf <nea@nea.moe> | 2025-03-10 22:24:01 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-03-10 22:24:26 +0100 |
commit | bb627157c217d3ebd632e51447e60acce1a81f86 (patch) | |
tree | 46048e669a49e9921744e1f356b5e1e02a9870be /src/main/kotlin/repo/MiningRepoData.kt | |
parent | 034fc701ef0feffe1141b479ef4163d070958a6e (diff) | |
download | Firmament-bb627157c217d3ebd632e51447e60acce1a81f86.tar.gz Firmament-bb627157c217d3ebd632e51447e60acce1a81f86.tar.bz2 Firmament-bb627157c217d3ebd632e51447e60acce1a81f86.zip |
fix: Weird tools for BP 7; feat: Options for jade; fix: tools for glass blocks in jade
Diffstat (limited to 'src/main/kotlin/repo/MiningRepoData.kt')
-rw-r--r-- | src/main/kotlin/repo/MiningRepoData.kt | 9 |
1 files changed, 5 insertions, 4 deletions
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<CustomMiningBlock> = listOf() private set - var toolsByBreakingPower: NavigableMap<BreakingPowerKey, NEUItem> = Collections.emptyNavigableMap() + var toolsByBreakingPower: NavigableMap<BreakingPowerKey, SBItemStack> = Collections.emptyNavigableMap() private set @@ -44,7 +44,7 @@ class MiningRepoData : IReloadable { .comparingInt<BreakingPowerKey> { it.breakingPower } .thenComparing(Comparator.comparing( { it.itemId }, - nullsFirst(Comparator.naturalOrder<SkyblockId>()))) + nullsFirst(Comparator.comparing<SkyblockId, Boolean> { "PICK" in it.neuItem || "BING" in it.neuItem }.thenComparing(Comparator.naturalOrder<SkyblockId>())))) } } @@ -60,13 +60,14 @@ class MiningRepoData : IReloadable { repo.items.items .values .asSequence() + .map { SBItemStack(it.skyblockId) } .filter { it.breakingPower > 0 } - .associateTo(TreeMap<BreakingPowerKey, NEUItem>(BreakingPowerKey.COMPARATOR)) { + .associateTo(TreeMap<BreakingPowerKey, SBItemStack>(BreakingPowerKey.COMPARATOR)) { BreakingPowerKey(it.breakingPower, it.skyblockId) to it }) } - fun getToolsThatCanBreak(breakingPower: Int): Collection<NEUItem> { + fun getToolsThatCanBreak(breakingPower: Int): Collection<SBItemStack> { return toolsByBreakingPower.tailMap(BreakingPowerKey(breakingPower, null), true).values } |