Search in sources :

Example 1 with EngineDefinition

use of forestry.energy.gadgets.EngineDefinition in project ForestryMC by ForestryMC.

the class PluginIC2 method preInit.

@Override
@Optional.Method(modid = "IC2")
public void preInit() {
    super.preInit();
    definitionEngineTin = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINETIN_META, "forestry.EngineTin", EngineTin.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_tin_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINETIN_META), "###", " X ", "YVY", '#', "ingotTin", 'X', Blocks.glass, 'Y', "gearTin", 'V', Blocks.piston)));
    definitionGenerator = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_GENERATOR_META, "forestry.Generator", MachineGenerator.class, Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/generator_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_GENERATOR_META), "X#X", "XYX", "X#X", '#', Blocks.glass, 'X', Items.gold_ingot, 'Y', ForestryItem.sturdyCasing)));
    emptyCell = IC2Items.getItem("cell");
    if (emptyCell != null) {
        lavaCell = IC2Items.getItem("lavaCell");
        waterCell = IC2Items.getItem("waterCell");
    } else {
        Proxies.log.fine("IC2 empty cell could not be found. Skipped adding IC2 liquid containers.");
    }
    // rubber chain
    treetap = IC2Items.getItem("treetap");
    rubberwood = IC2Items.getItem("rubberWood");
    resin = IC2Items.getItem("resin");
    rubbersapling = IC2Items.getItem("rubberSapling");
    rubberleaves = IC2Items.getItem("rubberLeaves");
    // fermentation
    plantBall = IC2Items.getItem("plantBall");
    compressedPlantBall = IC2Items.getItem("compressedPlantBall");
    // crated
    resin = IC2Items.getItem("resin");
    rubber = IC2Items.getItem("rubber");
    scrap = IC2Items.getItem("scrap");
    uuMatter = IC2Items.getItem("matter");
    silver = IC2Items.getItem("silverIngot");
    brass = IC2Items.getItem("bronzeIngot");
    Circuit.farmRubberManual = new CircuitFarmLogic("manualRubber", FarmLogicRubber.class);
    ICircuitLayout layoutEngineTin = new CircuitLayout("engine.tin");
    ChipsetManager.circuitRegistry.registerLayout(layoutEngineTin);
    ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.ELECTRIC_CHOKE_I, "forestry.energyChoke1");
    ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.FIRE_DAMPENER_I, "forestry.energyDampener1");
    ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.ELECTRIC_EFFICIENCY_I, "forestry.energyEfficiency1");
    ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.ELECTRIC_BOOST_I, "forestry.energyBoost1");
    ChipsetManager.circuitRegistry.registerLegacyMapping(CircuitId.ELECTRIC_BOOST_II, "forestry.energyBoost2");
}
Also used : MachineDefinition(forestry.core.gadgets.MachineDefinition) FarmLogicRubber(forestry.farming.logic.FarmLogicRubber) ICircuitLayout(forestry.api.circuits.ICircuitLayout) EngineDefinition(forestry.energy.gadgets.EngineDefinition) ICircuitLayout(forestry.api.circuits.ICircuitLayout) CircuitLayout(forestry.core.circuits.CircuitLayout) CircuitFarmLogic(forestry.farming.circuits.CircuitFarmLogic)

Example 2 with EngineDefinition

use of forestry.energy.gadgets.EngineDefinition in project ForestryMC by ForestryMC.

the class PluginEnergy method preInit.

@Override
public void preInit() {
    super.preInit();
    ForestryBlock.engine.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "engine");
    definitionEngineCopper = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECOPPER_META, "forestry.EngineCopper", EngineCopper.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECOPPER_META), "###", " X ", "YVY", '#', "ingotCopper", 'X', "blockGlass", 'Y', "gearCopper", 'V', Blocks.piston)));
    definitionEngineBronze = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINEBRONZE_META, "forestry.EngineBronze", EngineBronze.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINEBRONZE_META), "###", " X ", "YVY", '#', "ingotBronze", 'X', "blockGlass", 'Y', "gearBronze", 'V', Blocks.piston)));
    ShapedRecipeCustom clockworkRecipe = null;
    if (GameMode.getGameMode().getBooleanSetting("energy.engine.clockwork")) {
        clockworkRecipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECLOCKWORK_META), "###", " X ", "ZVY", '#', "plankWood", 'X', "blockGlass", 'Y', Items.clock, 'Z', "gearCopper", 'V', Blocks.piston);
    }
    definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECLOCKWORK_META, "forestry.EngineClockwork", EngineClockwork.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
}
Also used : BlockBase(forestry.core.gadgets.BlockBase) EngineDefinition(forestry.energy.gadgets.EngineDefinition) ShapedRecipeCustom(forestry.core.utils.ShapedRecipeCustom)

Aggregations

EngineDefinition (forestry.energy.gadgets.EngineDefinition)2 ICircuitLayout (forestry.api.circuits.ICircuitLayout)1 CircuitLayout (forestry.core.circuits.CircuitLayout)1 BlockBase (forestry.core.gadgets.BlockBase)1 MachineDefinition (forestry.core.gadgets.MachineDefinition)1 ShapedRecipeCustom (forestry.core.utils.ShapedRecipeCustom)1 CircuitFarmLogic (forestry.farming.circuits.CircuitFarmLogic)1 FarmLogicRubber (forestry.farming.logic.FarmLogicRubber)1