diff --git a/common/mekanism/common/CommonProxy.java b/common/mekanism/common/CommonProxy.java index 2bef3ff1c..16c7fadae 100644 --- a/common/mekanism/common/CommonProxy.java +++ b/common/mekanism/common/CommonProxy.java @@ -190,7 +190,8 @@ public class CommonProxy Mekanism.TO_BC = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MJToJoules", .04D).getDouble(.04D); Mekanism.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D); Mekanism.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123).getInt(); - Mekanism.upgradeModifier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL,"UpgradeModifier", 10).getInt(); + //If this is less than 1, upgrades make machines worse. If less than 0, I don't even know. + Mekanism.maxUpgradeMultiplier = Math.max(1, Mekanism.configuration.get(Configuration.CATEGORY_GENERAL,"UpgradeModifier", 10).getInt()); Mekanism.TO_TE = Mekanism.TO_BC*10; Mekanism.FROM_TE = Mekanism.FROM_BC/10; diff --git a/common/mekanism/common/Mekanism.java b/common/mekanism/common/Mekanism.java index 2d87cb97d..dfec9a5d8 100644 --- a/common/mekanism/common/Mekanism.java +++ b/common/mekanism/common/Mekanism.java @@ -265,7 +265,7 @@ public class Mekanism public static int obsidianTNTDelay = 100; public static int UPDATE_DELAY = 10; public static int VOICE_PORT = 36123; - public static int upgradeModifier = 10; + public static int maxUpgradeMultiplier = 10; public static double ENERGY_PER_REDSTONE = 10000; public static double TO_IC2; diff --git a/common/mekanism/common/network/PacketConfigSync.java b/common/mekanism/common/network/PacketConfigSync.java index 3c95aa6a9..811badc75 100644 --- a/common/mekanism/common/network/PacketConfigSync.java +++ b/common/mekanism/common/network/PacketConfigSync.java @@ -5,7 +5,6 @@ import java.io.DataOutputStream; import mekanism.common.Mekanism; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; -import net.minecraftforge.common.Configuration; import com.google.common.io.ByteArrayDataInput; @@ -49,7 +48,7 @@ public class PacketConfigSync implements IMekanismPacket Mekanism.TO_BC = dataStream.readDouble(); Mekanism.ENERGY_PER_REDSTONE = dataStream.readDouble(); Mekanism.VOICE_PORT = dataStream.readInt(); - Mekanism.upgradeModifier = dataStream.readInt(); + Mekanism.maxUpgradeMultiplier = dataStream.readInt(); Mekanism.TO_TE = Mekanism.TO_BC*10; Mekanism.FROM_TE = Mekanism.FROM_BC/10; @@ -97,7 +96,7 @@ public class PacketConfigSync implements IMekanismPacket dataStream.writeDouble(Mekanism.TO_BC); dataStream.writeDouble(Mekanism.ENERGY_PER_REDSTONE); dataStream.writeInt(Mekanism.VOICE_PORT); - dataStream.writeInt(Mekanism.upgradeModifier); + dataStream.writeInt(Mekanism.maxUpgradeMultiplier); dataStream.writeDouble(Mekanism.enrichmentChamberUsage); dataStream.writeDouble(Mekanism.osmiumCompressorUsage); diff --git a/common/mekanism/common/util/MekanismUtils.java b/common/mekanism/common/util/MekanismUtils.java index 2065aecb9..e28c79787 100644 --- a/common/mekanism/common/util/MekanismUtils.java +++ b/common/mekanism/common/util/MekanismUtils.java @@ -612,7 +612,7 @@ public final class MekanismUtils */ public static int getTicks(int speedUpgrade, int def) { - return (int)(def * Math.pow(Mekanism.upgradeModifier, (-speedUpgrade/(double)(Mekanism.upgradeModifier-1)))); + return (int)(def * Math.pow(Mekanism.maxUpgradeMultiplier, -speedUpgrade/8.0)); } /** @@ -624,7 +624,7 @@ public final class MekanismUtils */ public static double getEnergyPerTick(int speedUpgrade, int energyUpgrade, double def) { - return def * Math.pow(Mekanism.upgradeModifier, ((speedUpgrade-energyUpgrade)/(double)(Mekanism.upgradeModifier-1))); + return def * Math.pow(Mekanism.maxUpgradeMultiplier, (speedUpgrade-energyUpgrade)/8.0); } /** @@ -635,7 +635,7 @@ public final class MekanismUtils */ public static double getMaxEnergy(int energyUpgrade, double def) { - return def * Math.pow(Mekanism.upgradeModifier, (energyUpgrade/(double)(Mekanism.upgradeModifier-1))); + return def * Math.pow(Mekanism.maxUpgradeMultiplier, energyUpgrade/8.0); } /**