diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-09-23 15:45:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 15:45:21 +0200 |
commit | 8edd0070a55d422e6470aaed09ab72d8bc952578 (patch) | |
tree | 11ce28bb7da351978d08d8f9e91b7646c7f23e9f /src/main/java/at/hannibal2/skyhanni/features/mining | |
parent | c24b433a0cfeb662d5ccaf63ff7e4f6a06f9be4a (diff) | |
download | skyhanni-8edd0070a55d422e6470aaed09ab72d8bc952578.tar.gz skyhanni-8edd0070a55d422e6470aaed09ab72d8bc952578.tar.bz2 skyhanni-8edd0070a55d422e6470aaed09ab72d8bc952578.zip |
Improvement: Add Pickobulus support to OreMineEvent (#2540)
Co-authored-by: ItsEmpa <itsempa@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt index 8497951fe..ec9a390ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt @@ -85,9 +85,12 @@ object MineshaftPityDisplay { fun onOreMined(event: OreMinedEvent) { if (!MiningAPI.inGlacialTunnels()) return - event.originalOre.getPityBlock()?.let { it.blocksBroken++ } + val originalOre = event.originalOre + originalOre?.getPityBlock()?.let { it.blocksBroken++ } event.extraBlocks.toMutableMap() - .apply { addOrPut(event.originalOre, -1) } + .apply { + if (originalOre != null) addOrPut(originalOre, -1) + } .map { (block, amount) -> block.getPityBlock()?.let { it.efficientMiner += amount } } |