Skip to content

Commit

Permalink
Fixed a bug where machines without Energy Hatches will crash due to V…
Browse files Browse the repository at this point in the history
…oltage Chance Bonus
  • Loading branch information
Taskeren committed Sep 16, 2024
1 parent 78797e6 commit 301a0b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ object ChanceBonusManager : OP_Logger {
addLastBonusProvider { machine, recipeTier, prevBonus ->
when(machine) {
is GregtechMeta_MultiBlockBase<*> -> {
val minTierEnergyHatch = machine.mAllEnergyHatches.minOf { it.mTier }.toInt()
val minTierEnergyHatch = machine.mAllEnergyHatches.minOfOrNull { it.mTier }?.toInt() ?: 0
getTierChanceBonus(minTierEnergyHatch, recipeTier, 0.15)
}

Expand Down

0 comments on commit 301a0b0

Please sign in to comment.