changed recipes
This commit is contained in:
parent
e3816bb574
commit
6dc9cb3255
2 changed files with 96 additions and 62 deletions
|
@ -132,12 +132,12 @@ public class AssemblyLine
|
|||
// TODO: MAKE THIS FALSE EVERY BUILD!
|
||||
public static final boolean DEBUG = false;
|
||||
public static boolean REQUIRE_NO_POWER = false;
|
||||
public static boolean VINALLA_RECIPES = false;
|
||||
|
||||
@PreInit
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
FMLog.setParent(FMLLog.getLogger());
|
||||
// UniversalElectricity.register(this, 1, 2, 6, false);
|
||||
instance = this;
|
||||
|
||||
/* UPDATE NOTIFIER */
|
||||
|
@ -160,8 +160,12 @@ public class AssemblyLine
|
|||
itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
|
||||
itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
|
||||
|
||||
REQUIRE_NO_POWER = !CONFIGURATION.get("general", "requirePower", true).getBoolean(true) || PowerSystems.runPowerLess(PowerSystems.INDUSTRIALCRAFT, PowerSystems.BUILDCRAFT, PowerSystems.MEKANISM);
|
||||
CONFIGURATION.save();
|
||||
AssemblyLine.REQUIRE_NO_POWER = !CONFIGURATION.get("general", "requirePower", true).getBoolean(true) || PowerSystems.runPowerLess(PowerSystems.INDUSTRIALCRAFT, PowerSystems.BUILDCRAFT, PowerSystems.MEKANISM);
|
||||
AssemblyLine.VINALLA_RECIPES = CONFIGURATION.get("general", "Vinalla_Recipes", true).getBoolean(false);
|
||||
if (CONFIGURATION.hasChanged())
|
||||
{
|
||||
CONFIGURATION.save();
|
||||
}
|
||||
|
||||
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
|
||||
|
||||
|
@ -198,14 +202,13 @@ public class AssemblyLine
|
|||
public void load(FMLInitializationEvent evt)
|
||||
{
|
||||
proxy.init();
|
||||
GrabDictionary.registerList();
|
||||
|
||||
FMLog.info("Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
||||
|
||||
/* MCMOD.INFO FILE BUILDER? */
|
||||
meta.modId = AssemblyLine.MOD_ID;
|
||||
meta.name = AssemblyLine.MOD_NAME;
|
||||
meta.description = "Simi Realistic factory system for minecraft bring in conveyor belts, robotic arms, and simple factory machines";
|
||||
meta.description = "Simi Realistic factory system for minecraft bring in conveyor belts, robotic arms, and simple machines";
|
||||
|
||||
meta.url = "http://universalelectricity.com/assembly-line";
|
||||
|
||||
|
@ -215,66 +218,10 @@ public class AssemblyLine
|
|||
meta.credits = "Please see the website.";
|
||||
meta.autogenerated = false;
|
||||
|
||||
this.createStandardRecipes();
|
||||
this.createUERecipes();
|
||||
Recipes.loadRecipes();
|
||||
|
||||
}
|
||||
|
||||
private void createVanillaRecipes()
|
||||
{
|
||||
System.out.println("No crafting ingredient source found. Creating cheap-o vanilla recipes.");
|
||||
// Armbot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "ingotIron", 'C', Item.redstoneRepeater, 'I', "ingotIron", 'M', Block.pistonBase }));
|
||||
// Disk
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', Item.redstoneRepeater }));
|
||||
// Encoder
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotIron", 'C', Item.redstoneRepeater }));
|
||||
// Detector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "S S", 'S', "ingotIron", 'C', Block.torchRedstoneActive, 'E', Item.eyeOfEnder }));
|
||||
// Conveyor Belt
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotIron", 'W', Block.planks, 'M', Block.pistonBase }));
|
||||
// Rejector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "WPW", "@R@", '@', "ingotIron", 'R', Item.redstone, 'P', Block.pistonBase, 'C', Block.torchRedstoneActive, 'W', Item.redstone }));
|
||||
// Turntable
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "P", "P", 'P', Block.pistonBase }));
|
||||
// Manipulator
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, Block.torchRedstoneActive }));
|
||||
}
|
||||
|
||||
private void createUERecipes()
|
||||
{
|
||||
DarkMain.forceLoadBCItems(this, AssemblyLine.CHANNEL);
|
||||
System.out.println("BasicComponents Found...adding UE recipes for Assembly Line.");
|
||||
// Armbot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', "plateSteel", 'C', "advancedCircuit", 'I', "ingotSteel", 'M', "motor" }));
|
||||
// Disk
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', "advancedCircuit" }));
|
||||
// Encoder
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', itemImprint, 'S', "ingotSteel", 'C', "advancedCircuit" }));
|
||||
// Detector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockDetector, new Object[] { "SES", "SCS", "S S", 'S', "ingotSteel", 'C', "basicCircuit", 'E', Item.eyeOfEnder }));
|
||||
// Conveyor Belt
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', "ingotSteel", 'W', Block.planks, 'M', "motor" }));
|
||||
// Rejector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockRejector, new Object[] { "CPC", "@R@", '@', "ingotSteel", 'R', Item.redstone, 'P', Block.pistonBase, 'C', "basicCircuit" }));
|
||||
// Turntable
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "M", "P", 'M', "motor", 'P', Block.pistonBase }));
|
||||
// Manipulator
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, "basicCircuit" }));
|
||||
}
|
||||
|
||||
private void createStandardRecipes()
|
||||
{
|
||||
// Imprint
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
// Imprinter
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
// Crate
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.wood }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 0), 'S', Item.ingotIron, 'T', Block.wood }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(blockCrate, 1, 1), 'S', Item.ingotIron, 'T', Block.wood }));
|
||||
}
|
||||
|
||||
public static void printSidedData(String data)
|
||||
{
|
||||
System.out.print(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT ? "[C]" : "[S]");
|
||||
|
|
87
src/minecraft/assemblyline/common/Recipes.java
Normal file
87
src/minecraft/assemblyline/common/Recipes.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package assemblyline.common;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class Recipes
|
||||
{
|
||||
static Object circuit;
|
||||
static Object circuit2;
|
||||
static Object circuit3;
|
||||
static Object steel;
|
||||
static Object steelPlate;
|
||||
static Object motor;
|
||||
|
||||
public static void loadRecipes()
|
||||
{
|
||||
circuit = Item.redstoneRepeater;
|
||||
circuit2 = Item.comparator;
|
||||
steel = Item.ingotIron;
|
||||
steelPlate = Item.ingotGold;
|
||||
motor = Block.pistonBase;
|
||||
|
||||
if (!AssemblyLine.VINALLA_RECIPES)
|
||||
{
|
||||
if (OreDictionary.getOres("basicCircuit").size() > 0)
|
||||
{
|
||||
circuit = "basicCircuit";
|
||||
}
|
||||
if (OreDictionary.getOres("advancedCircuit").size() > 0)
|
||||
{
|
||||
circuit = "advancedCircuit";
|
||||
}
|
||||
if (OreDictionary.getOres("ingotSteel").size() > 0)
|
||||
{
|
||||
steel = "ingotSteel";
|
||||
}
|
||||
if (OreDictionary.getOres("plateSteel").size() > 0)
|
||||
{
|
||||
steelPlate = "plateSteel";
|
||||
}
|
||||
if (OreDictionary.getOres("motor").size() > 0)
|
||||
{
|
||||
motor = "motor";
|
||||
}
|
||||
|
||||
}
|
||||
Recipes.createStandardRecipes();
|
||||
Recipes.createUERecipes();
|
||||
}
|
||||
|
||||
private static void createUERecipes()
|
||||
{
|
||||
// Armbot
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', Recipes.steelPlate, 'C', Recipes.circuit2, 'I', Recipes.steel, 'M', Recipes.motor }));
|
||||
// Disk
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.itemDisk, new Object[] { "III", "ICI", "III", 'I', AssemblyLine.itemImprint, 'C', Recipes.circuit2 }));
|
||||
// Encoder
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockEncoder, new Object[] { "SIS", "SCS", "SSS", 'I', AssemblyLine.itemImprint, 'S', Recipes.steel, 'C', Recipes.circuit2 }));
|
||||
// Detector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockDetector, new Object[] { "SES", "SCS", "S S", 'S', Recipes.steel, 'C', Recipes.circuit, 'E', Item.eyeOfEnder }));
|
||||
// Conveyor Belt
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockConveyorBelt, 10), new Object[] { "III", "WMW", 'I', Recipes.steel, 'W', Block.planks, 'M', Recipes.motor }));
|
||||
// Rejector
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockRejector, new Object[] { "CPC", "@R@", '@', Recipes.steel, 'R', Item.redstone, 'P', Block.pistonBase, 'C', Recipes.circuit }));
|
||||
// Turntable
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockTurntable, new Object[] { "IMI", " P ", 'M', Recipes.motor, 'P', Block.pistonBase, 'I', Recipes.steel }));
|
||||
// Manipulator
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(AssemblyLine.blockManipulator, 2), new Object[] { Block.dispenser, Recipes.circuit }));
|
||||
}
|
||||
|
||||
private static void createStandardRecipes()
|
||||
{
|
||||
// Imprint
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.itemImprint, 2), new Object[] { "R", "P", "I", 'P', Item.paper, 'R', Item.redstone, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
// Imprinter
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(AssemblyLine.blockImprinter, new Object[] { "SIS", "SPS", "WCW", 'S', Item.ingotIron, 'C', Block.chest, 'W', Block.workbench, 'P', Block.pistonBase, 'I', new ItemStack(Item.dyePowder, 1, 0) }));
|
||||
// Crate
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 0), new Object[] { "TST", "S S", "TST", 'S', Item.ingotIron, 'T', Block.planks }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 1), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(AssemblyLine.blockCrate, 1, 0), 'S', Recipes.steel, 'T', Block.wood }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(AssemblyLine.blockCrate, 1, 2), new Object[] { "TST", "SCS", "TST", 'C', new ItemStack(AssemblyLine.blockCrate, 1, 1), 'S', Recipes.steelPlate, 'T', Block.wood }));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue