2014-05-02 21:31:20 +02:00
|
|
|
/*******************************************************************************
|
2014-08-07 08:29:25 +02:00
|
|
|
* Copyright (c) 2011-2014 SirSengir.
|
|
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
|
* are made available under the terms of the GNU Lesser Public License v3
|
|
|
|
|
* which accompanies this distribution, and is available at
|
2014-08-07 02:56:58 -07:00
|
|
|
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
2014-05-02 21:31:20 +02:00
|
|
|
*
|
2014-08-07 08:29:25 +02:00
|
|
|
* Various Contributors including, but not limited to:
|
|
|
|
|
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
2014-05-02 21:31:20 +02:00
|
|
|
******************************************************************************/
|
|
|
|
|
package forestry.plugins;
|
|
|
|
|
|
2014-12-16 00:27:13 -08:00
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
|
import net.minecraft.init.Items;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
|
|
import net.minecraftforge.fluids.FluidStack;
|
|
|
|
|
|
2014-05-02 21:31:20 +02:00
|
|
|
import cpw.mods.fml.common.network.IGuiHandler;
|
2014-12-16 00:27:13 -08:00
|
|
|
|
2014-05-02 21:31:20 +02:00
|
|
|
import forestry.api.recipes.RecipeManagers;
|
|
|
|
|
import forestry.core.GameMode;
|
|
|
|
|
import forestry.core.config.Defaults;
|
|
|
|
|
import forestry.core.config.ForestryBlock;
|
|
|
|
|
import forestry.core.config.ForestryItem;
|
2014-12-13 18:58:49 -08:00
|
|
|
import forestry.core.fluids.Fluids;
|
2014-05-02 21:31:20 +02:00
|
|
|
import forestry.core.gadgets.BlockBase;
|
|
|
|
|
import forestry.core.gadgets.MachineDefinition;
|
|
|
|
|
import forestry.core.gadgets.MachineNBTDefinition;
|
|
|
|
|
import forestry.core.items.ItemForestryBlock;
|
|
|
|
|
import forestry.core.items.ItemNBTTile;
|
|
|
|
|
import forestry.core.proxy.Proxies;
|
|
|
|
|
import forestry.core.utils.RecipeUtil;
|
|
|
|
|
import forestry.core.utils.ShapedRecipeCustom;
|
|
|
|
|
import forestry.factory.GuiHandlerFactory;
|
|
|
|
|
import forestry.factory.gadgets.MachineBottler;
|
|
|
|
|
import forestry.factory.gadgets.MachineCarpenter;
|
|
|
|
|
import forestry.factory.gadgets.MachineCentrifuge;
|
|
|
|
|
import forestry.factory.gadgets.MachineFabricator;
|
|
|
|
|
import forestry.factory.gadgets.MachineFermenter;
|
|
|
|
|
import forestry.factory.gadgets.MachineMoistener;
|
|
|
|
|
import forestry.factory.gadgets.MachineRaintank;
|
|
|
|
|
import forestry.factory.gadgets.MachineSqueezer;
|
|
|
|
|
import forestry.factory.gadgets.MachineStill;
|
|
|
|
|
import forestry.factory.gadgets.MillRainmaker;
|
|
|
|
|
import forestry.factory.gadgets.TileWorktable;
|
|
|
|
|
import forestry.factory.recipes.CraftGuideIntegration;
|
2014-11-26 23:40:37 -08:00
|
|
|
import forestry.factory.triggers.FactoryTriggers;
|
2014-12-16 00:27:13 -08:00
|
|
|
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-09-27 12:46:54 -07:00
|
|
|
@Plugin(pluginID = "Factory", name = "Factory", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.factory.description")
|
2014-09-20 22:43:13 -07:00
|
|
|
public class PluginFactory extends ForestryPlugin {
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
public static MachineDefinition definitionBottler;
|
|
|
|
|
public static MachineDefinition definitionCarpenter;
|
|
|
|
|
public static MachineDefinition definitionCentrifuge;
|
|
|
|
|
public static MachineDefinition definitionFermenter;
|
|
|
|
|
public static MachineDefinition definitionMoistener;
|
|
|
|
|
public static MachineDefinition definitionSqueezer;
|
|
|
|
|
public static MachineDefinition definitionStill;
|
|
|
|
|
public static MachineDefinition definitionRainmaker;
|
|
|
|
|
public static MachineDefinition definitionFabricator;
|
|
|
|
|
public static MachineDefinition definitionRaintank;
|
|
|
|
|
public static MachineDefinition definitionWorktable;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void preInit() {
|
|
|
|
|
super.preInit();
|
|
|
|
|
|
2014-12-16 00:27:13 -08:00
|
|
|
RecipeManagers.craftingProviders = Arrays.asList(
|
|
|
|
|
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
|
|
|
|
|
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
|
|
|
|
|
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
|
|
|
|
|
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
|
|
|
|
|
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
|
|
|
|
|
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
|
|
|
|
|
RecipeManagers.stillManager = new MachineStill.RecipeManager()
|
|
|
|
|
);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "factory");
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
BlockBase factoryTESR = ((BlockBase) ForestryBlock.factoryTESR.block());
|
|
|
|
|
|
|
|
|
|
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_BOTTLER_META, "forestry.Bottler", MachineBottler.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/bottler_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_BOTTLER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', ForestryItem.canEmpty,
|
|
|
|
|
'Y', ForestryItem.sturdyCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CARPENTER_META, "forestry.Carpenter", MachineCarpenter.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/carpenter_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CARPENTER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"XYX",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "ingotBronze",
|
|
|
|
|
'Y', ForestryItem.sturdyCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", MachineCentrifuge.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/centrifuge_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CENTRIFUGE_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"XYX",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "ingotCopper",
|
|
|
|
|
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_FERMENTER_META, "forestry.Fermenter", MachineFermenter.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/fermenter_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_FERMENTER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "gearBronze",
|
|
|
|
|
'Y', ForestryItem.sturdyCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_MOISTENER_META, "forestry.Moistener", MachineMoistener.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/moistener_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_MOISTENER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "gearCopper",
|
|
|
|
|
'Y', ForestryItem.sturdyCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_SQUEEZER_META, "forestry.Squeezer", MachineSqueezer.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/squeezer_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_SQUEEZER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"XYX",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "ingotTin",
|
|
|
|
|
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_STILL_META, "forestry.Still", MachineStill.class,
|
|
|
|
|
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/still_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_STILL_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', Items.redstone,
|
|
|
|
|
'Y', ForestryItem.sturdyCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", MillRainmaker.class,
|
|
|
|
|
Proxies.render.getRenderMill(Defaults.TEXTURE_PATH_BLOCKS + "/rainmaker_"), ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_RAINMAKER_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', "gearTin",
|
|
|
|
|
'Y', ForestryItem.hardenedCasing)));
|
|
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryBlock.factoryPlain.registerBlock(new BlockBase(Material.iron), ItemNBTTile.class, "factory2");
|
|
|
|
|
|
|
|
|
|
BlockBase factoryPlain = ((BlockBase) ForestryBlock.factoryPlain.block());
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Defaults.DEFINITION_FABRICATOR_META, "forestry.Fabricator", MachineFabricator.class,
|
|
|
|
|
ShapedRecipeCustom.createShapedRecipe(
|
|
|
|
|
ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_FABRICATOR_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"XZX",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', Items.gold_ingot,
|
|
|
|
|
'Y', ForestryItem.sturdyCasing,
|
2014-08-18 05:20:29 -07:00
|
|
|
'Z', Blocks.chest))
|
|
|
|
|
.setFaces(0, 1, 2, 3, 4, 4));
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Defaults.DEFINITION_RAINTANK_META, "forestry.Raintank", MachineRaintank.class,
|
|
|
|
|
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_RAINTANK_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"X#X",
|
|
|
|
|
"XYX",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', Blocks.glass,
|
|
|
|
|
'X', Items.iron_ingot,
|
|
|
|
|
'Y', ForestryItem.sturdyCasing))
|
2014-08-18 05:20:29 -07:00
|
|
|
.setFaces(0, 1, 0, 0, 0, 0));
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
definitionWorktable = factoryPlain.addDefinition(new MachineNBTDefinition(Defaults.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class,
|
|
|
|
|
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_WORKTABLE_META),
|
2014-05-02 21:31:20 +02:00
|
|
|
"B",
|
|
|
|
|
"W",
|
|
|
|
|
"C",
|
|
|
|
|
'B', Items.book,
|
|
|
|
|
'W', Blocks.crafting_table,
|
2014-08-18 05:20:29 -07:00
|
|
|
'C', Blocks.chest))
|
|
|
|
|
.setFaces(0, 1, 2, 3, 4, 4));
|
2014-11-26 23:40:37 -08:00
|
|
|
|
|
|
|
|
// Triggers
|
2014-11-29 19:53:40 -08:00
|
|
|
if (PluginManager.Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
|
2014-11-26 23:40:37 -08:00
|
|
|
FactoryTriggers.initialize();
|
|
|
|
|
}
|
2014-05-02 21:31:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void doInit() {
|
|
|
|
|
super.doInit();
|
|
|
|
|
|
|
|
|
|
definitionBottler.register();
|
|
|
|
|
definitionCarpenter.register();
|
|
|
|
|
definitionCentrifuge.register();
|
|
|
|
|
definitionFabricator.register();
|
|
|
|
|
definitionFermenter.register();
|
|
|
|
|
definitionMoistener.register();
|
|
|
|
|
definitionRaintank.register();
|
|
|
|
|
definitionSqueezer.register();
|
|
|
|
|
definitionStill.register();
|
|
|
|
|
definitionRainmaker.register();
|
|
|
|
|
definitionWorktable.register();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void postInit() {
|
|
|
|
|
super.postInit();
|
|
|
|
|
|
|
|
|
|
if (Proxies.common.isModLoaded("craftguide"))
|
|
|
|
|
CraftGuideIntegration.register();
|
|
|
|
|
else
|
|
|
|
|
Proxies.log.info("Skipping CraftGuide integration.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void registerItems() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void registerBackpackItems() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void registerRecipes() {
|
|
|
|
|
|
|
|
|
|
// / FABRICATOR
|
2014-12-13 18:58:49 -08:00
|
|
|
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 0), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotCopper"});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 1), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotTin"});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 2), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotBronze"});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 3), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.iron_ingot});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 4), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.gold_ingot});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 5), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.diamond});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 6), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Blocks.obsidian});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 7), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.blaze_powder});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 9), new Object[]{
|
2014-08-18 05:20:29 -07:00
|
|
|
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.emerald});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 10),
|
2014-08-18 05:20:29 -07:00
|
|
|
new Object[]{" X ", "#X#", "XXX", '#', Items.redstone, 'X', "gemApatite"});
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 11),
|
2014-08-18 05:20:29 -07:00
|
|
|
new Object[]{" X ", "#X#", "XXX", '#', Items.redstone, 'X', new ItemStack(Items.dye, 1, 4)});
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-08-18 05:20:29 -07:00
|
|
|
String[] dyes = {"dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime",
|
|
|
|
|
"dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite"};
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-12-13 18:58:49 -08:00
|
|
|
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
2014-12-24 00:43:22 -08:00
|
|
|
FluidStack liquidGlass = Fluids.GLASS.getFluid(Defaults.BUCKET_VOLUME);
|
2014-08-18 05:20:29 -07:00
|
|
|
for (int i = 0; i < 16; i++)
|
2014-12-13 18:58:49 -08:00
|
|
|
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Defaults.WILDCARD), liquidGlass, ForestryBlock.glass.getItemStack(1, 15 - i), new Object[]{"#", "X", '#', dyes[i],
|
|
|
|
|
'X', ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD)});
|
|
|
|
|
}
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// / SQUEEZER
|
2014-12-13 18:58:49 -08:00
|
|
|
int appleMulchAmount = GameMode.getGameMode().getIntegerSetting("squeezer.mulch.apple");
|
|
|
|
|
int appleJuiceAmount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.apple");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.apple)}, Fluids.JUICE.getFluid(appleJuiceAmount),
|
2014-12-13 18:58:49 -08:00
|
|
|
ForestryItem.mulch.getItemStack(), appleMulchAmount);
|
|
|
|
|
|
|
|
|
|
int seedOilAmount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.seed");
|
2014-12-24 00:43:22 -08:00
|
|
|
FluidStack seedOil = Fluids.SEEDOIL.getFluid(seedOilAmount);
|
2014-12-13 18:58:49 -08:00
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.wheat_seeds)}, seedOil);
|
|
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.pumpkin_seeds)}, seedOil);
|
|
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.melon_seeds)}, seedOil);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.phosphor.getItemStack(2), new ItemStack(Blocks.cobblestone)}, Fluids.LAVA.getFluid(1600));
|
|
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Blocks.cactus)}, Fluids.WATER.getFluid(500));
|
|
|
|
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.snowball), ForestryItem.craftingMaterial.getItemStack(4, 5)}, Fluids.ICE.getFluid(4000));
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// STILL
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.stillManager.addRecipe(Defaults.STILL_DESTILLATION_DURATION, Fluids.BIOMASS.getFluid(Defaults.STILL_DESTILLATION_INPUT),
|
2014-12-24 00:38:42 -08:00
|
|
|
Fluids.ETHANOL.getFluid(Defaults.STILL_DESTILLATION_OUTPUT));
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-12-23 12:43:57 -08:00
|
|
|
// convert old honey to new honey
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.stillManager.addRecipe(1, Fluids.LEGACY_HONEY.getFluid(1000), Fluids.HONEY.getFluid(1000));
|
2014-12-23 12:43:57 -08:00
|
|
|
|
2014-05-02 21:31:20 +02:00
|
|
|
// MOISTENER
|
|
|
|
|
RecipeManagers.moistenerManager.addRecipe(new ItemStack(Items.wheat_seeds), new ItemStack(Blocks.mycelium), 5000);
|
|
|
|
|
RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.mossy_cobblestone), 20000);
|
|
|
|
|
RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stonebrick, 1, 1), 20000);
|
|
|
|
|
|
|
|
|
|
// FERMENTER
|
2014-12-13 18:58:49 -08:00
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.sapling, 1, i), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-12-13 18:58:49 -08:00
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.cactus), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS);
|
|
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Items.wheat), GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
|
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Items.reeds), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cane"), Fluids.BIOMASS);
|
|
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.brown_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
|
|
|
|
|
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.red_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// FABRICATOR
|
2014-12-13 18:58:49 -08:00
|
|
|
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.fabricatorManager.addSmelting(new ItemStack(Blocks.glass), Fluids.GLASS.getFluid(1000), 1000);
|
|
|
|
|
RecipeManagers.fabricatorManager.addSmelting(new ItemStack(Blocks.glass_pane), Fluids.GLASS.getFluid(375), 1000);
|
|
|
|
|
RecipeManagers.fabricatorManager.addSmelting(new ItemStack(Blocks.sand), Fluids.GLASS.getFluid(1000), 3000);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// / CARPENTER
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(250), null, ForestryItem.impregnatedCasing.getItemStack(),
|
2014-08-18 05:20:29 -07:00
|
|
|
"###",
|
|
|
|
|
"# #",
|
|
|
|
|
"###",
|
|
|
|
|
'#', "logWood");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(500), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryBlock.core.getItemStack(1, Defaults.DEFINITION_ESCRITOIRE_META),
|
|
|
|
|
"# ",
|
|
|
|
|
"###",
|
|
|
|
|
"# #",
|
|
|
|
|
'#', "plankWood");
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// RESOURCES
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(10, Fluids.SEEDOIL.getFluid(100), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryItem.stickImpregnated.getItemStack(2),
|
|
|
|
|
"#",
|
|
|
|
|
"#",
|
|
|
|
|
'#', "logWood");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(250), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryItem.woodPulp.getItemStack(4),
|
|
|
|
|
"#",
|
|
|
|
|
'#', "logWood");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(250), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
new ItemStack(Items.paper, 1),
|
|
|
|
|
"#",
|
|
|
|
|
"#",
|
|
|
|
|
'#', "pulpWood");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(1000), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryBlock.soil.getItemStack(9),
|
|
|
|
|
"###",
|
|
|
|
|
"#X#",
|
|
|
|
|
"###",
|
|
|
|
|
'#', Blocks.dirt,
|
|
|
|
|
'X', ForestryItem.mulch);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(1000), null,
|
2014-08-18 05:20:29 -07:00
|
|
|
ForestryBlock.soil.getItemStack(8, 1),
|
|
|
|
|
"#X#",
|
|
|
|
|
"XYX", "#X#",
|
|
|
|
|
'#', Blocks.dirt,
|
|
|
|
|
'X', Blocks.sand,
|
|
|
|
|
'Y', ForestryItem.mulch);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(75, Fluids.WATER.getFluid(5000), null, ForestryItem.hardenedCasing.getItemStack(),
|
2014-08-18 05:20:29 -07:00
|
|
|
"# #",
|
|
|
|
|
" Y ",
|
|
|
|
|
"# #",
|
|
|
|
|
'#', Items.diamond,
|
|
|
|
|
'Y', ForestryItem.sturdyCasing);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// / CHIPSETS
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(20, Fluids.WATER.getFluid(1000), null, ForestryItem.circuitboards.getItemStack(1, 0),
|
2014-11-29 22:13:28 -08:00
|
|
|
"R R", "R#R", "R R", '#', "ingotTin", 'R', Items.redstone);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(40, Fluids.WATER.getFluid(1000), null, ForestryItem.circuitboards.getItemStack(1, 1),
|
2014-11-29 22:13:28 -08:00
|
|
|
"R#R", "R#R", "R#R", '#', "ingotBronze", 'R', Items.redstone);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(80, Fluids.WATER.getFluid(1000), null, ForestryItem.circuitboards.getItemStack(1, 2),
|
2014-11-29 22:13:28 -08:00
|
|
|
"R#R", "R#R", "R#R", '#', Items.iron_ingot, 'R', Items.redstone);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(80, Fluids.WATER.getFluid(1000), null, ForestryItem.circuitboards.getItemStack(1, 3),
|
2014-11-29 22:13:28 -08:00
|
|
|
"R#R", "R#R", "R#R", '#', Items.gold_ingot, 'R', Items.redstone);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(40, Fluids.WATER.getFluid(1000), null, ForestryItem.solderingIron.getItemStack(),
|
2014-11-29 22:13:28 -08:00
|
|
|
" # ", "# #", " B", '#', Items.iron_ingot, 'B', "ingotBronze");
|
2014-05-02 21:31:20 +02:00
|
|
|
// ForestryCore.oreHandler.registerCarpenterRecipe(solderingIron);
|
|
|
|
|
|
|
|
|
|
// RAIN SUBSTRATES
|
2014-10-01 22:28:21 -07:00
|
|
|
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(1000), null, ForestryItem.iodineCharge.getItemStack(),
|
2014-10-01 22:28:21 -07:00
|
|
|
"Z#Z",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', ForestryItem.pollenCluster,
|
|
|
|
|
'X', Items.gunpowder,
|
|
|
|
|
'Y', ForestryItem.canEmpty,
|
|
|
|
|
'Z', ForestryItem.honeyDrop);
|
|
|
|
|
// ForestryCore.oreHandler.registerCarpenterRecipe(iodineCapsule);
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(1000), null, ForestryItem.craftingMaterial.getItemStack(1, 4),
|
2014-10-01 22:28:21 -07:00
|
|
|
"Z#Z",
|
|
|
|
|
"#Y#",
|
|
|
|
|
"X#X",
|
|
|
|
|
'#', ForestryItem.royalJelly,
|
|
|
|
|
'X', Items.gunpowder,
|
|
|
|
|
'Y', ForestryItem.canEmpty,
|
|
|
|
|
'Z', ForestryItem.honeydew);
|
|
|
|
|
// ForestryCore.oreHandler.registerCarpenterRecipe(dissipationCharge);
|
|
|
|
|
}
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// Ender pearl
|
2014-11-29 22:13:28 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(100, null, new ItemStack(Items.ender_pearl, 1), " # ", "###", " # ", '#',
|
|
|
|
|
ForestryItem.craftingMaterial.getItemStack(1, 1));
|
2014-05-02 21:31:20 +02:00
|
|
|
// Woven Silk
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(500), null, ForestryItem.craftingMaterial.getItemStack(1, 3),
|
2014-11-29 22:13:28 -08:00
|
|
|
"###", "###", "###", '#', ForestryItem.craftingMaterial.getItemStack(1, 2));
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// Boxes
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(5, Fluids.WATER.getFluid(1000), null, ForestryItem.carton.getItemStack(2),
|
2014-11-29 22:13:28 -08:00
|
|
|
" # ", "# #", " # ", '#', "pulpWood");
|
2014-12-24 00:43:22 -08:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(20, Fluids.WATER.getFluid(1000), null, ForestryItem.crate.getItemStack(24),
|
2014-11-29 22:13:28 -08:00
|
|
|
" # ", "# #", " # ", '#', "logWood");
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// Assembly Kits
|
2014-08-18 05:20:29 -07:00
|
|
|
RecipeManagers.carpenterManager.addRecipe(20, null, ForestryItem.carton.getItemStack(), ForestryItem.kitPickaxe.getItemStack(), new Object[]{
|
2014-05-02 21:31:20 +02:00
|
|
|
"###",
|
|
|
|
|
" X ",
|
|
|
|
|
" X ",
|
|
|
|
|
'#', "ingotBronze",
|
2014-08-18 05:20:29 -07:00
|
|
|
'X', "stickWood"});
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
RecipeManagers.carpenterManager.addRecipe(20, null, ForestryItem.carton.getItemStack(), ForestryItem.kitShovel.getItemStack(),
|
2014-08-18 05:20:29 -07:00
|
|
|
new Object[]{" # ", " X ", " X ", '#', "ingotBronze", 'X', "stickWood"});
|
2014-05-02 21:31:20 +02:00
|
|
|
|
|
|
|
|
// Reclamation
|
|
|
|
|
RecipeManagers.carpenterManager.addRecipe(null, ForestryItem.ingotBronze.getItemStack(2, ForestryItem.ingotBronze.item().getMaxDamage()),
|
2014-11-29 22:13:28 -08:00
|
|
|
"#", '#', ForestryItem.brokenBronzePickaxe);
|
|
|
|
|
RecipeManagers.carpenterManager.addRecipe(null, ForestryItem.ingotBronze.getItemStack(), "#", '#', ForestryItem.brokenBronzeShovel);
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2014-12-25 23:43:30 -08:00
|
|
|
// Crating and uncrating
|
2014-10-01 19:41:18 -07:00
|
|
|
if (PluginManager.Module.STORAGE.isEnabled()) {
|
2014-12-25 23:43:30 -08:00
|
|
|
PluginStorage.createCrateRecipes();
|
2014-10-01 19:41:18 -07:00
|
|
|
}
|
2014-05-02 21:31:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IGuiHandler getGuiHandler() {
|
|
|
|
|
return new GuiHandlerFactory();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|