use of forestry.api.fuels.EngineBronzeFuel in project ForestryMC by ForestryMC.
the class PluginIC2 method registerRecipes.
@Override
@Optional.Method(modid = PluginIC2.MOD_ID)
public void registerRecipes() {
ItemRegistryCore coreItems = ModuleCore.items;
if (rubber != null) {
RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), coreItems.tubes.get(EnumElectronTube.RUBBER, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "itemRubber" });
}
ItemStack plantBall = IC2Items.getItem("crafting", "plant_ball");
if (plantBall != null) {
RecipeUtil.addFermenterRecipes(plantBall, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
}
ItemStack bioChaff = IC2Items.getItem("crafting", "bio_chaff");
if (bioChaff != null) {
RecipeUtil.addFermenterRecipes(bioChaff, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
}
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
if (beeItems != null) {
if (resin != null) {
RecipeManagers.centrifugeManager.addRecipe(20, beeItems.propolis.get(EnumPropolis.NORMAL, 1), ImmutableMap.of(resin, 1.0f));
} else {
Log.info("Missing IC2 resin, skipping centrifuge recipe for propolis to resin.");
}
}
if (rubberSapling != null) {
RecipeUtil.addFermenterRecipes(rubberSapling, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
} else {
Log.info("Missing IC2 rubber sapling, skipping fermenter recipe for converting rubber sapling to biomass.");
}
if (rubberSapling != null && resin != null) {
String saplingName = ItemStackUtil.getBlockNameFromRegistryAsString(ItemStackUtil.getBlock(rubberSapling));
if (saplingName != null) {
String resinName = ItemStackUtil.getItemNameFromRegistryAsString(resin.getItem());
String imc = String.format("farmArboreal@%s.%s.%s.%s", saplingName, rubberSapling.getItemDamage(), resinName, resin.getItemDamage());
Log.trace("Sending IMC '%s'.", imc);
FMLInterModComms.sendMessage(Constants.MOD_ID, "add-farmable-sapling", imc);
}
}
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.ENERGY))) {
Fluid biogas = FluidRegistry.getFluid("ic2biogas");
if (biogas != null) {
int burnDuration = Math.round(Constants.ENGINE_CYCLE_DURATION_BIOMASS * ForestryAPI.activeMode.getFloatSetting("fuel.biomass.biogas"));
EngineBronzeFuel bronzeFuel = new EngineBronzeFuel(Fluids.BIOMASS.getFluid(), Constants.ENGINE_FUEL_VALUE_BIOMASS, burnDuration, 1);
FuelManager.bronzeEngineFuel.put(biogas, bronzeFuel);
}
}
ItemStack waterCell = IC2Items.getItem("fluid_cell", "water");
if (waterCell != null) {
int bogEarthOutputCan = ForestryAPI.activeMode.getIntegerSetting("recipe.output.bogearth.can");
if (bogEarthOutputCan > 0) {
ItemStack bogEarthCan = ModuleCore.getBlocks().bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, bogEarthOutputCan);
RecipeUtil.addRecipe("ic2_bog_earth_can", bogEarthCan, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', waterCell, 'Y', "sand");
}
}
ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.engine.tin");
// / Solder Manager
ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.COPPER, 1), Circuits.energyElectricChoke1);
ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.TIN, 1), Circuits.energyElectricBoost1);
ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BRONZE, 1), Circuits.energyElectricBoost2);
ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.IRON, 1), Circuits.energyElectricEfficiency1);
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FARMING))) {
if (resin != null && rubberWood != null) {
ICircuitLayout layoutManual = ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual");
ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.RUBBER, 1), Circuits.farmRubberManual);
}
FarmRegistry.getInstance().registerFarmables("farmOrchard", new FarmableBasicIC2Crop());
}
BlockRegistryEnergy energyBlocks = ModuleEnergy.blocks;
if (energyBlocks != null) {
RecipeUtil.addRecipe("ic2_generator", blocks.generator, "X#X", "XYX", "X#X", '#', "blockGlass", 'X', "ingotGold", 'Y', coreItems.sturdyCasing);
RecipeUtil.addRecipe("ic2_eletrical_engine", blocks.electricalEngine, "###", " X ", "YVY", '#', "ingotTin", 'X', "blockGlass", 'Y', "gearTin", 'V', Blocks.PISTON);
}
}
use of forestry.api.fuels.EngineBronzeFuel in project ForestryMC by ForestryMC.
the class TileEngineBiogas method dissipateHeat.
@Override
public int dissipateHeat() {
if (heat <= 0) {
return 0;
}
// Basic loss even when running
int loss = 1;
if (!isBurning()) {
loss++;
}
double heatStage = getHeatLevel();
if (heatStage > 0.55) {
loss++;
}
// Lose extra heat when using water as fuel.
if (fuelTank.getFluidAmount() > 0) {
FluidStack fuelFluidStack = fuelTank.getFluid();
if (fuelFluidStack != null) {
EngineBronzeFuel fuel = FuelManager.bronzeEngineFuel.get(fuelFluidStack.getFluid());
if (fuel != null) {
loss = loss * fuel.getDissipationMultiplier();
}
}
}
heat -= loss;
return loss;
}
use of forestry.api.fuels.EngineBronzeFuel 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);
}
use of forestry.api.fuels.EngineBronzeFuel in project Binnie by ForestryMC.
the class ModuleCore method doInit.
@Override
public void doInit() {
if (ConfigurationMain.hopeField) {
VillageCreationExtraTrees villageHandler = new VillageCreationExtraTrees();
VillagerRegistry villagerRegistry = VillagerRegistry.instance();
villagerRegistry.registerVillageCreationHandler(villageHandler);
}
Food.CRABAPPLE.addJuice(10, 150, 10);
Food.ORANGE.addJuice(10, 400, 15);
Food.KUMQUAT.addJuice(10, 300, 10);
Food.LIME.addJuice(10, 300, 10);
Food.WILD_CHERRY.addOil(20, 50, 5);
Food.SOUR_CHERRY.addOil(20, 50, 3);
Food.BLACK_CHERRY.addOil(20, 50, 5);
Food.Blackthorn.addJuice(10, 50, 5);
Food.CHERRY_PLUM.addJuice(10, 100, 60);
Food.ALMOND.addOil(20, 80, 5);
Food.APRICOT.addJuice(10, 150, 40);
Food.GRAPEFRUIT.addJuice(10, 500, 15);
Food.PEACH.addJuice(10, 150, 40);
Food.SATSUMA.addJuice(10, 300, 10);
Food.BUDDHA_HAND.addJuice(10, 400, 15);
Food.CITRON.addJuice(10, 400, 15);
Food.FINGER_LIME.addJuice(10, 300, 10);
Food.KEY_LIME.addJuice(10, 300, 10);
Food.MANDERIN.addJuice(10, 400, 10);
Food.NECTARINE.addJuice(10, 150, 40);
Food.POMELO.addJuice(10, 300, 10);
Food.TANGERINE.addJuice(10, 300, 10);
Food.PEAR.addJuice(10, 300, 20);
Food.SAND_PEAR.addJuice(10, 200, 10);
Food.HAZELNUT.addOil(20, 150, 5);
Food.BUTTERNUT.addOil(20, 180, 5);
Food.BEECHNUT.addOil(20, 100, 4);
Food.PECAN.addOil(29, 50, 2);
Food.BANANA.addJuice(10, 100, 30);
Food.RED_BANANA.addJuice(10, 100, 30);
Food.PLANTAIN.addJuice(10, 100, 40);
Food.BRAZIL_NUT.addOil(20, 20, 2);
Food.FIG.addOil(20, 50, 3);
Food.ACORN.addOil(20, 50, 3);
Food.ELDERBERRY.addJuice(10, 100, 5);
Food.OLIVE.addOil(20, 50, 3);
Food.GINGKO_NUT.addOil(20, 50, 5);
Food.COFFEE.addOil(15, 20, 2);
Food.OSANGE_ORANGE.addJuice(10, 300, 15);
Food.CLOVE.addOil(10, 25, 2);
Food.COCONUT.addOil(20, 300, 25);
Food.CASHEW.addJuice(10, 150, 15);
Food.AVACADO.addJuice(10, 300, 15);
Food.NUTMEG.addOil(20, 50, 10);
Food.ALLSPICE.addOil(20, 50, 10);
Food.CHILLI.addJuice(10, 100, 10);
Food.STAR_ANISE.addOil(20, 100, 10);
Food.MANGO.addJuice(10, 400, 20);
Food.STARFRUIT.addJuice(10, 300, 10);
Food.CANDLENUT.addJuice(20, 50, 10);
RecipeUtil recipeUtil = new RecipeUtil(Constants.EXTRA_TREES_MOD_ID);
MinecraftForge.addGrassSeed(new ItemStack(itemHops), 5);
recipeUtil.addRecipe("durable_hammer", new ItemStack(itemDurableHammer, 1, 0), "wiw", " s ", " s ", 'w', Blocks.OBSIDIAN, 'i', Items.GOLD_INGOT, 's', Items.STICK);
recipeUtil.addRecipe("hammer", new ItemStack(itemHammer, 1, 0), "wiw", " s ", " s ", 'w', "plankWood", 'i', Items.IRON_INGOT, 's', Items.STICK);
recipeUtil.addRecipe("yeast", ExtraTreeItems.YEAST.get(8), " m ", "mbm", 'b', Items.BREAD, 'm', Blocks.BROWN_MUSHROOM);
recipeUtil.addRecipe("lager_yeast", ExtraTreeItems.LAGER_YEAST.get(8), "mbm", " m ", 'b', Items.BREAD, 'm', Blocks.BROWN_MUSHROOM);
recipeUtil.addRecipe("grain_wheat", ExtraTreeItems.GRAIN_WHEAT.get(5), " s ", "sss", " s ", 's', Items.WHEAT_SEEDS);
recipeUtil.addRecipe("grain_barley", ExtraTreeItems.GRAIN_BARLEY.get(3), false, " s ", "s ", " s ", 's', ExtraTreeItems.GRAIN_WHEAT.get(1));
recipeUtil.addRecipe("grain_corn", ExtraTreeItems.GRAIN_CORN.get(3), false, " s ", " s", " s ", 's', ExtraTreeItems.GRAIN_WHEAT.get(1));
recipeUtil.addRecipe("grain_rye", ExtraTreeItems.GRAIN_RYE.get(3), " ", "s s", " s ", 's', ExtraTreeItems.GRAIN_WHEAT.get(1));
recipeUtil.addRecipe("proven_gear", ExtraTreeItems.PROVEN_GEAR.get(1), " s ", "s s", " s ", 's', Mods.Forestry.stack("oak_stick"));
recipeUtil.addRecipe("glass_fitting", ExtraTreeItems.GLASS_FITTING.get(6), "s s", " i ", "s s", 'i', Items.IRON_INGOT, 's', Items.STICK);
GameRegistry.addSmelting(ExtraTreeItems.GRAIN_WHEAT.get(1), ExtraTreeItems.GRAIN_ROASTED.get(1), 0.0f);
GameRegistry.addSmelting(ExtraTreeItems.GRAIN_RYE.get(1), ExtraTreeItems.GRAIN_ROASTED.get(1), 0.0f);
GameRegistry.addSmelting(ExtraTreeItems.GRAIN_CORN.get(1), ExtraTreeItems.GRAIN_ROASTED.get(1), 0.0f);
GameRegistry.addSmelting(ExtraTreeItems.GRAIN_BARLEY.get(1), ExtraTreeItems.GRAIN_ROASTED.get(1), 0.0f);
try {
final Item minium = (Item) Class.forName("com.pahimar.ee3.lib.ItemIds").getField("minium_shard").get(null);
recipeUtil.addShapelessRecipe("papayimar", Food.PAPAYIMAR.get(1), minium, "cropPapaya");
} catch (Exception ignored) {
}
ICarpenterManager carpenterManager = RecipeManagers.carpenterManager;
IStillManager stillManager = RecipeManagers.stillManager;
stillManager.addRecipe(25, ExtraTreeLiquid.Resin.get(5), ExtraTreeLiquid.Turpentine.get(3));
carpenterManager.addRecipe(25, ExtraTreeLiquid.Turpentine.get(50), ItemStack.EMPTY, itemMisc.getStack(ExtraTreeItems.WOOD_WAX, 4), "x", 'x', Mods.Forestry.stack("beeswax"));
FluidStack creosoteOil = Binnie.LIQUID.getFluidStack(ManagerLiquid.CREOSOTE, 50);
if (creosoteOil != null) {
carpenterManager.addRecipe(25, creosoteOil, ItemStack.EMPTY, itemMisc.getStack(ExtraTreeItems.WOOD_WAX, 1), "x", 'x', Mods.Forestry.stack("beeswax"));
}
FuelManager.bronzeEngineFuel.put(ExtraTreeLiquid.Sap.get(1).getFluid(), new EngineBronzeFuel(ExtraTreeLiquid.Sap.get(1).getFluid(), 20, 10000, 1));
FuelManager.bronzeEngineFuel.put(ExtraTreeLiquid.Resin.get(1).getFluid(), new EngineBronzeFuel(ExtraTreeLiquid.Resin.get(1).getFluid(), 30, 10000, 1));
}
Aggregations