mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
Biogas tweaks
-Added compat to Forestry Biomass. -Buffed longevity of biogas and biomass but reduced multiplier of ethanol (overall buff to ethanol still)
This commit is contained in:
1 parent
cdd9833674
commit
bde6e7a740
7 files changed
+25
-10
No files matched your search
@@ -141,6 +141,10 @@ public class MekanismConfig
|
||||
{
|
||||
public static double advancedSolarGeneration;
|
||||
public static double bioGeneration;
|
||||
public static int ethanolDuration;
|
||||
|
||||
public static int biogasDuration;
|
||||
|
||||
public static double ethanolMultiplier;
|
||||
public static double heatGeneration;
|
||||
public static double heatGenerationLava;
|
||||
@@ -161,7 +165,6 @@ public class MekanismConfig
|
||||
public static int condenserRate;
|
||||
public static boolean enableWindmillWhitelist;
|
||||
public static List<String> winddimensionids;
|
||||
|
||||
}
|
||||
|
||||
public static class tools
|
||||
|
||||
@@ -1207,7 +1207,7 @@ public class Mekanism
|
||||
}
|
||||
|
||||
//Chemical Oxidiser Recipes
|
||||
RecipeHandler.addChemicalOxidizerRecipe(new ItemStack(MekanismItems.BioFuel), new GasStack(GasRegistry.getGas("biomass"), 150));
|
||||
RecipeHandler.addChemicalOxidizerRecipe(new ItemStack(MekanismItems.BioFuel), new GasStack(GasRegistry.getGas("biomass"), 100));
|
||||
|
||||
//Fuels
|
||||
GameRegistry.registerFuelHandler(new IFuelHandler() {
|
||||
|
||||
@@ -101,7 +101,9 @@ public class GeneratorsCommonProxy implements IGuiProvider
|
||||
{
|
||||
generators.advancedSolarGeneration = Mekanism.configurationgenerators.get("generation", "AdvancedSolarGeneration", 300D).getDouble();
|
||||
generators.bioGeneration = Mekanism.configurationgenerators.get("generation", "BioGeneration", 100D).getDouble();
|
||||
generators.ethanolMultiplier = Mekanism.configurationgenerators.get("generation", "EthanolMultiplier", 5D).getDouble();
|
||||
generators.biogasDuration = Mekanism.configurationgenerators.get("generation", "BiogasDuration", 1).getInt();
|
||||
generators.ethanolDuration = Mekanism.configurationgenerators.get("generation", "EthanolDuration", 2).getInt();
|
||||
generators.ethanolMultiplier = Mekanism.configurationgenerators.get("generation", "EthanolMultiplier", 3D).getDouble();
|
||||
generators.heatGeneration = Mekanism.configurationgenerators.get("generation", "HeatGeneration", 150D).getDouble();
|
||||
generators.heatGenerationLava = Mekanism.configurationgenerators.get("generation", "HeatGenerationLava", 5D).getDouble();
|
||||
generators.heatGenerationNether = Mekanism.configurationgenerators.get("generation", "HeatGenerationNether", 100D).getDouble();
|
||||
|
||||
@@ -264,6 +264,8 @@ public class MekanismGenerators implements IModule
|
||||
{
|
||||
dataStream.writeDouble(generators.advancedSolarGeneration);
|
||||
dataStream.writeDouble(generators.bioGeneration);
|
||||
dataStream.writeInt(generators.biogasDuration);
|
||||
dataStream.writeInt(generators.ethanolDuration);
|
||||
dataStream.writeDouble(generators.ethanolMultiplier);
|
||||
dataStream.writeDouble(generators.heatGeneration);
|
||||
dataStream.writeDouble(generators.heatGenerationLava);
|
||||
@@ -312,6 +314,8 @@ public class MekanismGenerators implements IModule
|
||||
{
|
||||
generators.advancedSolarGeneration = dataStream.readDouble();
|
||||
generators.bioGeneration = dataStream.readDouble();
|
||||
generators.biogasDuration = dataStream.readInt();
|
||||
generators.ethanolDuration = dataStream.readInt();
|
||||
generators.ethanolMultiplier = dataStream.readDouble();
|
||||
generators.heatGeneration = dataStream.readDouble();
|
||||
generators.heatGenerationLava = dataStream.readDouble();
|
||||
|
||||
@@ -18,6 +18,9 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IGasH
|
||||
{
|
||||
/** The maximum amount of gas this block can store. */
|
||||
public int MAX_GAS = 18000;
|
||||
public int gasDuration;
|
||||
|
||||
|
||||
public GasTank fuelTank;
|
||||
|
||||
|
||||
@@ -76,16 +79,20 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IGasH
|
||||
output = generators.bioGeneration * getMultiplier(fuelTank.getGas().getGas()) * 2;
|
||||
|
||||
setEnergy(electricityStored + generators.bioGeneration * getMultiplier(fuelTank.getGas().getGas()));
|
||||
fuelTank.setGas(new GasStack(fuelTank.getGasType(), fuelTank.getStored() - 1));
|
||||
|
||||
if (gasDuration <= 0) {
|
||||
fuelTank.setGas(new GasStack(fuelTank.getGasType(), fuelTank.getStored() - 1));
|
||||
gasDuration = (fuelTank.getGas().getGas() == GasRegistry.getGas("bioethanol")) ? generators.ethanolDuration : generators.biogasDuration;
|
||||
} else gasDuration--;
|
||||
} else {
|
||||
//reset
|
||||
fuelTank.setGas(null);
|
||||
output = generators.bioGeneration * 2;
|
||||
output = generators.bioGeneration * 2;
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
if (fuelTank.getStored() == 0)
|
||||
fuelTank.setGas(null);
|
||||
|
||||
if (!worldObj.isRemote)
|
||||
setActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,7 +130,7 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IGasH
|
||||
@Override
|
||||
public boolean canOperate()
|
||||
{
|
||||
return electricityStored < BASE_MAX_ENERGY && fuelTank.getStored() > 0 && MekanismUtils.canFunction(this);
|
||||
return electricityStored < BASE_MAX_ENERGY && MekanismUtils.canFunction(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,7 +175,6 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IGasH
|
||||
if (fuelTank.getStored() > 0) {
|
||||
|
||||
Gas gas = fuelTank.getGas().getGas();
|
||||
|
||||
if (gas != null && isValidGas(gas)) {
|
||||
if (gas == GasRegistry.getGas("bioethanol"))
|
||||
return 1; //Ethanol
|
||||
|
||||
Reference in new issue
Block a user