Skip to content

Commit

Permalink
fix machines not working when upgrade multiplier is too high
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Jan 27, 2025
1 parent d56013e commit 8745710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/mekanism/common/util/MekanismUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public static long getBaseUsage(IUpgradeTile tile, int def) {
*/
public static int getTicks(IUpgradeTile tile, int def) {
if (tile.supportsUpgrades()) {
return MathUtils.clampToInt(def * Math.pow(MekanismConfig.general.maxUpgradeMultiplier.get(), -fractionUpgrades(tile, Upgrade.SPEED)));
return Math.max(1, MathUtils.clampToInt(def * Math.pow(MekanismConfig.general.maxUpgradeMultiplier.get(), -fractionUpgrades(tile, Upgrade.SPEED))));
}
return def;
}
Expand Down

0 comments on commit 8745710

Please sign in to comment.