Fixes recipe crashing

This commit is contained in:
modmuss50 2016-03-06 13:37:46 +00:00
parent 6462569b73
commit 8b5a2dc87a
2 changed files with 8 additions and 7 deletions

View file

@ -45,6 +45,7 @@ import techreborn.items.ItemIngots;
import techreborn.items.ItemNuggets;
import techreborn.items.ItemParts;
import techreborn.items.ItemPlates;
import techreborn.parts.ItemCables;
import techreborn.utils.RecipeUtils;
public class
@ -157,12 +158,12 @@ public class
"AAA", "AAA", "AAA",
'A', "ingot" + name.substring(0, 1).toUpperCase() + name.substring(1));
}
//TODO can't use cables in recipes
// CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("electronicCircuit"),
// "WWW", "SRS", "WWW",
// 'R', ItemIngots.getIngotByName("refinediron"),
// 'S', Items.redstone,
// 'W', ItemCables.getCableByName("copper"));
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("electronicCircuit"),
"WWW", "SRS", "WWW",
'R', ItemIngots.getIngotByName("refinediron"),
'S', Items.redstone,
'W', ItemCables.getCableByName("insulatedcopper"));
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.wrench),
"BAB", "BBB", "ABA",

View file

@ -28,7 +28,7 @@ public class ItemCables extends ItemMultiPart implements ITexturedItem {
public static ItemStack getCableByName(String name, int count) {
for (int i = 0; i < EnumCableType.values().length; i++) {
if (EnumCableType.values()[i].name().equalsIgnoreCase(name)) {
if (EnumCableType.values()[i].getName().equalsIgnoreCase(name)) {
return new ItemStack(TechRebornParts.cables, count, i);
}
}