Fixes recipe crashing
This commit is contained in:
parent
6462569b73
commit
8b5a2dc87a
2 changed files with 8 additions and 7 deletions
|
@ -45,6 +45,7 @@ import techreborn.items.ItemIngots;
|
||||||
import techreborn.items.ItemNuggets;
|
import techreborn.items.ItemNuggets;
|
||||||
import techreborn.items.ItemParts;
|
import techreborn.items.ItemParts;
|
||||||
import techreborn.items.ItemPlates;
|
import techreborn.items.ItemPlates;
|
||||||
|
import techreborn.parts.ItemCables;
|
||||||
import techreborn.utils.RecipeUtils;
|
import techreborn.utils.RecipeUtils;
|
||||||
|
|
||||||
public class
|
public class
|
||||||
|
@ -157,12 +158,12 @@ public class
|
||||||
"AAA", "AAA", "AAA",
|
"AAA", "AAA", "AAA",
|
||||||
'A', "ingot" + name.substring(0, 1).toUpperCase() + name.substring(1));
|
'A', "ingot" + name.substring(0, 1).toUpperCase() + name.substring(1));
|
||||||
}
|
}
|
||||||
//TODO can't use cables in recipes
|
|
||||||
// CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("electronicCircuit"),
|
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("electronicCircuit"),
|
||||||
// "WWW", "SRS", "WWW",
|
"WWW", "SRS", "WWW",
|
||||||
// 'R', ItemIngots.getIngotByName("refinediron"),
|
'R', ItemIngots.getIngotByName("refinediron"),
|
||||||
// 'S', Items.redstone,
|
'S', Items.redstone,
|
||||||
// 'W', ItemCables.getCableByName("copper"));
|
'W', ItemCables.getCableByName("insulatedcopper"));
|
||||||
|
|
||||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.wrench),
|
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.wrench),
|
||||||
"BAB", "BBB", "ABA",
|
"BAB", "BBB", "ABA",
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class ItemCables extends ItemMultiPart implements ITexturedItem {
|
||||||
|
|
||||||
public static ItemStack getCableByName(String name, int count) {
|
public static ItemStack getCableByName(String name, int count) {
|
||||||
for (int i = 0; i < EnumCableType.values().length; i++) {
|
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);
|
return new ItemStack(TechRebornParts.cables, count, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue