Merge branch 'development' into 1.8
This commit is contained in:
commit
96072e0f5e
4 changed files with 15 additions and 4 deletions
|
@ -127,7 +127,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
*/
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "8.0.0", guiFactory = "mekanism.client.gui.ConfigGuiFactory",
|
||||
dependencies = "after:ForgeMultipart;after:BuildCraftAPI|power;after:BuildCraftAPI|tools;after:BuildCraftAPI|transport;after:IC2API;after:CoFHAPI|energy;after:ComputerCraft;after:Galacticraft API;" +
|
||||
"after:MineFactoryReloaded;after:MetallurgyCore;after:EnderIO;after:ExtraUtilities;after:Railcraft;after:Forestry")
|
||||
"after:MineFactoryReloaded;after:MetallurgyCore;after:EnderIO;after:ExtraUtilities;after:Railcraft;after:Forestry;after:RedstoneArsenal")
|
||||
public class Mekanism
|
||||
{
|
||||
/** Mekanism Packet Pipeline */
|
||||
|
|
|
@ -96,7 +96,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
|||
|
||||
boolean changed = false;
|
||||
|
||||
if(canOperate() && MekanismUtils.canFunction(this) && getEnergy() >= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK) && gasTank.getStored() >= SECONDARY_ENERGY_PER_TICK)
|
||||
if(canOperate() && MekanismUtils.canFunction(this) && getEnergy() >= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK) && gasTank.getStored() >= (int)MekanismUtils.getSecondaryEnergyPerTick(this, SECONDARY_ENERGY_PER_TICK))
|
||||
{
|
||||
setActive(true);
|
||||
|
||||
|
@ -109,7 +109,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
|||
operatingTicks = 0;
|
||||
}
|
||||
|
||||
gasTank.draw(SECONDARY_ENERGY_PER_TICK, true);
|
||||
gasTank.draw(MekanismUtils.getSecondaryEnergyPerTick(this, SECONDARY_ENERGY_PER_TICK), true);
|
||||
electricityStored -= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -353,7 +353,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
|
||||
public int getSecondaryEnergyPerTick()
|
||||
{
|
||||
return RecipeType.values()[recipeType].getSecondaryEnergyPerTick();
|
||||
return MekanismUtils.getSecondaryEnergyPerTick(this, RecipeType.values()[recipeType].getSecondaryEnergyPerTick());
|
||||
}
|
||||
|
||||
public void handleSecondaryFuel()
|
||||
|
|
|
@ -622,6 +622,17 @@ public final class MekanismUtils
|
|||
return def * Math.pow(general.maxUpgradeMultiplier, (2*mgmt.getComponent().getUpgrades(Upgrade.SPEED)-(float)mgmt.getComponent().getUpgrades(Upgrade.ENERGY))/(float)Upgrade.SPEED.getMax());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the secondary energy required per tick for a machine via upgrades.
|
||||
* @param mgmt - tile containing upgrades
|
||||
* @param def - the original, default secondary energy required
|
||||
* @return max secondary energy per tick
|
||||
*/
|
||||
public static int getSecondaryEnergyPerTick(IUpgradeTile mgmt, int def)
|
||||
{
|
||||
return def * (int)Math.pow(general.maxUpgradeMultiplier, mgmt.getComponent().getUpgrades(Upgrade.SPEED)/(float)Upgrade.SPEED.getMax());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the maximum energy for a machine via it's upgrades.
|
||||
* @param mgmt - tile containing upgrades - best known for "Kids", 2008
|
||||
|
|
Loading…
Add table
Reference in a new issue