Added recipes for ore processors

This commit is contained in:
DarkGuardsman 2013-10-25 02:46:45 -04:00
parent cc37505fe0
commit ec93256cd2
3 changed files with 26 additions and 18 deletions

View file

@ -75,7 +75,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
RenderArmbot.MODEL.render(0.0625F, 0, 0);
GL11.glPopMatrix();
}
else if (AssemblyLine.processorMachine != null && block.blockID == AssemblyLine.processorMachine.blockID && metadata == 0)
else if (AssemblyLine.recipeLoader.processorMachine != null && block.blockID == AssemblyLine.recipeLoader.processorMachine.blockID && metadata == 0)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "CrusherBlock.png"));
GL11.glPushMatrix();
@ -86,7 +86,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
this.modelCrushor.renderPiston(0.0625f, 4);
GL11.glPopMatrix();
}
else if (AssemblyLine.processorMachine != null && block.blockID == AssemblyLine.processorMachine.blockID && metadata == 4)
else if (AssemblyLine.recipeLoader.processorMachine != null && block.blockID == AssemblyLine.recipeLoader.processorMachine.blockID && metadata == 4)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "GrinderBlock.png"));
GL11.glPushMatrix();

View file

@ -7,25 +7,27 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import cpw.mods.fml.common.registry.GameRegistry;
import dark.assembly.common.machine.BlockCrate;
import dark.assembly.common.machine.processor.BlockProcessor;
import dark.core.common.RecipeLoader;
public class ALRecipeLoader extends RecipeLoader
{
public Block blockConveyorBelt;
public Block blockManipulator;
public BlockCrate blockCrate;
public Block blockImprinter;
public Block blockEncoder;
public Block blockDetector;
public Block blockRejector;
public Block blockArmbot;
public Block blockCraneController;
public Block blockCraneFrame;
public Block blockTurntable;
public static Block blockConveyorBelt;
public static Block blockManipulator;
public static BlockCrate blockCrate;
public static Block blockImprinter;
public static Block blockEncoder;
public static Block blockDetector;
public static Block blockRejector;
public static Block blockArmbot;
public static Block blockCraneController;
public static Block blockCraneFrame;
public static Block blockTurntable;
public static Block processorMachine;
public Item itemImprint;
public Item itemDisk;
public static Item itemImprint;
public static Item itemDisk;
@Override
public void loadRecipes()
@ -38,7 +40,7 @@ public class ALRecipeLoader extends RecipeLoader
private void createUERecipes()
{
// Armbot
GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', RecipeLoader.steelPlate, 'C', RecipeLoader.circuit2, 'I', RecipeLoader.steel, 'M', RecipeLoader.motor }));
//GameRegistry.addRecipe(new ShapedOreRecipe(blockArmbot, new Object[] { "II ", "SIS", "MCM", 'S', RecipeLoader.steelPlate, 'C', RecipeLoader.circuit2, 'I', RecipeLoader.steel, 'M', RecipeLoader.motor }));
// Disk
GameRegistry.addRecipe(new ShapedOreRecipe(itemDisk, new Object[] { "III", "ICI", "III", 'I', itemImprint, 'C', RecipeLoader.circuit2 }));
// Encoder
@ -53,6 +55,12 @@ public class ALRecipeLoader extends RecipeLoader
GameRegistry.addRecipe(new ShapedOreRecipe(blockTurntable, new Object[] { "IMI", " P ", 'M', RecipeLoader.motor, 'P', Block.pistonBase, 'I', RecipeLoader.steel }));
// Manipulator
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(blockManipulator, 2), new Object[] { Block.dispenser, RecipeLoader.circuit }));
if (processorMachine instanceof BlockProcessor)
{
new RecipeGrid(new ItemStack(processorMachine, 1, BlockProcessor.ProcessorData.GRINDER.startMeta), 3, 3).setRowOne(steel, steel, steel).setRowTwo(steelPlate, motor, steelPlate).setRowThree(steel, circuit2, steel).RegisterRecipe();
new RecipeGrid(new ItemStack(processorMachine, 1, BlockProcessor.ProcessorData.CRUSHER.startMeta), 3, 3).setRowOne(steel, steelPlate, steel).setRowTwo(Block.pistonBase, steelPlate, Block.pistonBase).setRowThree(steel, circuit2, steel).RegisterRecipe();
}
}
private void createStandardRecipes()

View file

@ -91,7 +91,7 @@ public class AssemblyLine extends ModPrefab
public static boolean REQUIRE_NO_POWER = false;
public static boolean VINALLA_RECIPES = false;
public static Block processorMachine;
@Override
@EventHandler
@ -156,7 +156,7 @@ public class AssemblyLine extends ModPrefab
recipeLoader.blockEncoder = new BlockEncoder();
recipeLoader.blockArmbot = new BlockArmbot();
recipeLoader.blockTurntable = new BlockTurntable();
AssemblyLine.processorMachine = ModObjectRegistry.createNewBlock("ALBlockProcessor", AssemblyLine.MOD_ID, BlockProcessor.class, ItemBlockHolder.class);
recipeLoader.processorMachine = ModObjectRegistry.createNewBlock("ALBlockProcessor", AssemblyLine.MOD_ID, BlockProcessor.class, ItemBlockHolder.class);
recipeLoader.itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
recipeLoader.itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());