use of forestry.energy.blocks.BlockRegistryEnergy 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);
}
}
Aggregations