Added machine parts, added some recipes. Fixes #92

This commit is contained in:
modmuss50 2015-08-05 15:35:06 +01:00
parent 79f14f8be6
commit 9e346e6061
5 changed files with 27 additions and 3 deletions

View file

@ -12,11 +12,23 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
import techreborn.client.TechRebornCreativeTab;
import techreborn.init.ModBlocks;
import java.security.InvalidParameterException;
import java.util.List;
public class BlockMachineFrame extends Block {
public static ItemStack getFrameByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModBlocks.machineframe, count, i);
}
}
throw new InvalidParameterException("The part " + name + " could not be found.");
}
public static final String[] types = new String[]
{ "aluminum", "iron", "bronze", "brass", "steel", "titanium" };

View file

@ -60,7 +60,7 @@ public class RecipesIC2 implements ICompatModule {
public void addTRRecipes(){
//General
CraftingHelper.addShapedOreRecipe(
new ItemStack(ModItems.parts, 16, 13),
ItemParts.getPartByName("machineParts", 16),
"CSC", "SCS", "CSC",
'S', "ingotSteel",
'C', IC2Items.getItem("electronicCircuit"));
@ -416,6 +416,10 @@ public class RecipesIC2 implements ICompatModule {
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
//CentrifugeRecipes
//Plantball/Bio Chaff

View file

@ -22,6 +22,7 @@ import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.api.recipe.machines.LatheRecipe;
import techreborn.api.recipe.machines.PlateCuttingMachineRecipe;
import techreborn.blocks.BlockMachineFrame;
import techreborn.blocks.BlockOre;
import techreborn.blocks.BlockStorage;
import techreborn.blocks.BlockStorage2;
@ -913,6 +914,12 @@ public class ModRecipes {
//Basic Circuit Board
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 1), ItemPlates.getPlateByName("electrum", 2), ItemParts.getPartByName("basicCircuitBoard", 2), 120, 5));
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("iron", 1), ItemPlates.getPlateByName("electrum", 2), ItemParts.getPartByName("basicCircuitBoard", 2), 120, 5));
for(String type : BlockMachineFrame.types){
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("machineParts", 1), ItemPlates.getPlateByName(type, 8), BlockMachineFrame.getFrameByName(type, 1), 400, 8));
}
}
static void addIndustrialCentrifugeRecipes() {

View file

@ -41,7 +41,7 @@ public class ItemParts extends Item {
"bronzeGear", "ironGear", "titaniumGear", "steelGear", "tungstensteelGear",
"laserFocus", "ductTape", "lazuriteChunk", "iridiumAlloyIngot", "rockCutterBlade", "superconductor",
"thoriumCell", "doubleThoriumCell", "quadThoriumCell", "plutoniumCell", "doublePlutoniumCell",
"quadPlutoniumCell", "destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor" };
"quadPlutoniumCell", "destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor", "machineParts" };
private IIcon[] textures;

View file

@ -665,6 +665,7 @@ item.techreborn.part.destructoPack.name=Destructopack
item.techreborn.part.iridiumNeutronReflector.name=Iridium Neutron Reflector
item.techreborn.part.massHoleDevice.name=Mass Hole Device
item.techreborn.part.computerMonitor.name=Computer Monitor
item.techreborn.part.machineParts.name=Machine Parts
#Tools