Search in sources :

Example 1 with ShapedRecipeCustom

use of forestry.core.utils.ShapedRecipeCustom in project ForestryMC by ForestryMC.

the class PluginMail method preInit.

@Override
public void preInit() {
    super.preInit();
    PluginCore.rootCommand.addChildCommand(new CommandMail());
    new TickHandlerMailClient();
    ForestryBlock.mail.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "mail");
    ShapedRecipeCustom recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Defaults.DEFINITION_MAILBOX_META), " # ", "#Y#", "XXX", '#', "ingotTin", 'X', Blocks.chest, 'Y', ForestryItem.sturdyCasing);
    BlockBase mail = ((BlockBase) ForestryBlock.mail.block());
    definitionMailbox = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_MAILBOX_META, "forestry.Mailbox", MachineMailbox.class, recipe).setFaces(0, 1, 2, 2, 2, 2, 0, 7));
    recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Defaults.DEFINITION_TRADESTATION_META), "Z#Z", "#Y#", "XWX", '#', ForestryItem.tubes.getItemStack(1, 2), 'X', Blocks.chest, 'Y', ForestryItem.sturdyCasing, 'Z', ForestryItem.tubes.getItemStack(1, 3), 'W', ForestryItem.circuitboards.getItemStack(1, 2));
    definitionTradestation = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_TRADESTATION_META, "forestry.Tradestation", MachineTrader.class, recipe).setFaces(0, 1, 2, 3, 4, 4, 0, 7));
    definitionPhilatelist = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_PHILATELIST_META, "forestry.Philatelist", MachinePhilatelist.class).setFaces(0, 1, 2, 3, 2, 2, 0, 7));
}
Also used : MachineDefinition(forestry.core.gadgets.MachineDefinition) BlockBase(forestry.core.gadgets.BlockBase) MachineTrader(forestry.mail.gadgets.MachineTrader) MachineMailbox(forestry.mail.gadgets.MachineMailbox) TickHandlerMailClient(forestry.mail.TickHandlerMailClient) ShapedRecipeCustom(forestry.core.utils.ShapedRecipeCustom) MachinePhilatelist(forestry.mail.gadgets.MachinePhilatelist) CommandMail(forestry.mail.commands.CommandMail)

Example 2 with ShapedRecipeCustom

use of forestry.core.utils.ShapedRecipeCustom 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

BlockBase (forestry.core.gadgets.BlockBase)2 ShapedRecipeCustom (forestry.core.utils.ShapedRecipeCustom)2 MachineDefinition (forestry.core.gadgets.MachineDefinition)1 EngineDefinition (forestry.energy.gadgets.EngineDefinition)1 TickHandlerMailClient (forestry.mail.TickHandlerMailClient)1 CommandMail (forestry.mail.commands.CommandMail)1 MachineMailbox (forestry.mail.gadgets.MachineMailbox)1 MachinePhilatelist (forestry.mail.gadgets.MachinePhilatelist)1 MachineTrader (forestry.mail.gadgets.MachineTrader)1