Search in sources :

Example 1 with EngineCopperFuel

use of forestry.api.fuels.EngineCopperFuel in project ForestryMC by ForestryMC.

the class ModuleFactory method preInit.

@Override
public void preInit() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    // Set fuels and resources for the fermenter
    ItemStack fertilizerCompound = coreItems.fertilizerCompound.getItemStack();
    FuelManager.fermenterFuel.put(fertilizerCompound, new FermenterFuel(fertilizerCompound, ForestryAPI.activeMode.getIntegerSetting("fermenter.value.fertilizer"), ForestryAPI.activeMode.getIntegerSetting("fermenter.cycles.fertilizer")));
    int cyclesCompost = ForestryAPI.activeMode.getIntegerSetting("fermenter.cycles.compost");
    int valueCompost = ForestryAPI.activeMode.getIntegerSetting("fermenter.value.compost");
    ItemStack fertilizerBio = coreItems.compost.getItemStack();
    ItemStack mulch = coreItems.mulch.getItemStack();
    FuelManager.fermenterFuel.put(fertilizerBio, new FermenterFuel(fertilizerBio, valueCompost, cyclesCompost));
    FuelManager.fermenterFuel.put(mulch, new FermenterFuel(mulch, valueCompost, cyclesCompost));
    // Add moistener resources
    ItemStack wheat = new ItemStack(Items.WHEAT);
    ItemStack mouldyWheat = coreItems.mouldyWheat.getItemStack();
    ItemStack decayingWheat = coreItems.decayingWheat.getItemStack();
    FuelManager.moistenerResource.put(wheat, new MoistenerFuel(wheat, mouldyWheat, 0, 300));
    FuelManager.moistenerResource.put(mouldyWheat, new MoistenerFuel(mouldyWheat, decayingWheat, 1, 600));
    FuelManager.moistenerResource.put(decayingWheat, new MoistenerFuel(decayingWheat, mulch, 2, 900));
    // Set fuels for our own engines
    ItemStack peat = coreItems.peat.getItemStack();
    FuelManager.copperEngineFuel.put(peat, new EngineCopperFuel(peat, Constants.ENGINE_COPPER_FUEL_VALUE_PEAT, Constants.ENGINE_COPPER_CYCLE_DURATION_PEAT));
    ItemStack bituminousPeat = coreItems.bituminousPeat.getItemStack();
    FuelManager.copperEngineFuel.put(bituminousPeat, new EngineCopperFuel(bituminousPeat, Constants.ENGINE_COPPER_FUEL_VALUE_BITUMINOUS_PEAT, Constants.ENGINE_COPPER_CYCLE_DURATION_BITUMINOUS_PEAT));
    Fluid biomass = Fluids.BIOMASS.getFluid();
    if (biomass != null) {
        FuelManager.bronzeEngineFuel.put(biomass, new EngineBronzeFuel(biomass, Constants.ENGINE_FUEL_VALUE_BIOMASS, (int) (Constants.ENGINE_CYCLE_DURATION_BIOMASS * ForestryAPI.activeMode.getFloatSetting("fuel.biomass.biogas")), 1));
    }
    FuelManager.bronzeEngineFuel.put(FluidRegistry.WATER, new EngineBronzeFuel(FluidRegistry.WATER, Constants.ENGINE_FUEL_VALUE_WATER, Constants.ENGINE_CYCLE_DURATION_WATER, 3));
    Fluid milk = Fluids.MILK.getFluid();
    if (milk != null) {
        FuelManager.bronzeEngineFuel.put(milk, new EngineBronzeFuel(milk, Constants.ENGINE_FUEL_VALUE_MILK, Constants.ENGINE_CYCLE_DURATION_MILK, 3));
    }
    Fluid seedOil = Fluids.SEED_OIL.getFluid();
    if (seedOil != null) {
        FuelManager.bronzeEngineFuel.put(seedOil, new EngineBronzeFuel(seedOil, Constants.ENGINE_FUEL_VALUE_SEED_OIL, Constants.ENGINE_CYCLE_DURATION_SEED_OIL, 1));
    }
    Fluid honey = Fluids.FOR_HONEY.getFluid();
    if (honey != null) {
        FuelManager.bronzeEngineFuel.put(honey, new EngineBronzeFuel(honey, Constants.ENGINE_FUEL_VALUE_HONEY, Constants.ENGINE_CYCLE_DURATION_HONEY, 1));
    }
    Fluid juice = Fluids.JUICE.getFluid();
    if (juice != null) {
        FuelManager.bronzeEngineFuel.put(juice, new EngineBronzeFuel(juice, Constants.ENGINE_FUEL_VALUE_JUICE, Constants.ENGINE_CYCLE_DURATION_JUICE, 1));
    }
    // Set rain substrates
    ItemStack iodineCharge = coreItems.iodineCharge.getItemStack();
    ItemStack dissipationCharge = coreItems.craftingMaterial.getDissipationCharge();
    FuelManager.rainSubstrate.put(iodineCharge, new RainSubstrate(iodineCharge, Constants.RAINMAKER_RAIN_DURATION_IODINE, 0.01f));
    FuelManager.rainSubstrate.put(dissipationCharge, new RainSubstrate(dissipationCharge, 0.075f));
    ICircuitLayout layoutMachineUpgrade = new CircuitLayout("machine.upgrade", CircuitSocketType.MACHINE);
    ChipsetManager.circuitRegistry.registerLayout(layoutMachineUpgrade);
}
Also used : ICircuitLayout(forestry.api.circuits.ICircuitLayout) EngineCopperFuel(forestry.api.fuels.EngineCopperFuel) ItemRegistryCore(forestry.core.items.ItemRegistryCore) MoistenerFuel(forestry.api.fuels.MoistenerFuel) Fluid(net.minecraftforge.fluids.Fluid) FermenterFuel(forestry.api.fuels.FermenterFuel) EngineBronzeFuel(forestry.api.fuels.EngineBronzeFuel) RainSubstrate(forestry.api.fuels.RainSubstrate) ICircuitLayout(forestry.api.circuits.ICircuitLayout) CircuitLayout(forestry.core.circuits.CircuitLayout) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ICircuitLayout (forestry.api.circuits.ICircuitLayout)1 EngineBronzeFuel (forestry.api.fuels.EngineBronzeFuel)1 EngineCopperFuel (forestry.api.fuels.EngineCopperFuel)1 FermenterFuel (forestry.api.fuels.FermenterFuel)1 MoistenerFuel (forestry.api.fuels.MoistenerFuel)1 RainSubstrate (forestry.api.fuels.RainSubstrate)1 CircuitLayout (forestry.core.circuits.CircuitLayout)1 ItemRegistryCore (forestry.core.items.ItemRegistryCore)1 ItemStack (net.minecraft.item.ItemStack)1 Fluid (net.minecraftforge.fluids.Fluid)1