2013-07-26 21:18:53 -07:00
|
|
|
package tconstruct.items;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2013-12-31 15:30:34 -05:00
|
|
|
import net.minecraft.block.Block;
|
2013-07-26 21:18:53 -07:00
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
|
|
public class MetalPattern extends Pattern
|
|
|
|
|
{
|
|
|
|
|
|
2013-12-31 15:30:34 -05:00
|
|
|
public MetalPattern(String patternType, String folder)
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
2013-12-31 15:30:34 -05:00
|
|
|
super(patternName, getPatternNames(patternType), folder);
|
2013-07-26 21:18:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected static String[] getPatternNames (String partType)
|
|
|
|
|
{
|
|
|
|
|
String[] names = new String[patternName.length];
|
|
|
|
|
for (int i = 0; i < patternName.length; i++)
|
|
|
|
|
if (!(patternName[i].equals("")))
|
|
|
|
|
names[i] = partType + patternName[i];
|
2013-11-23 09:31:19 -05:00
|
|
|
else
|
|
|
|
|
names[i] = "";
|
2013-07-26 21:18:53 -07:00
|
|
|
return names;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
|
2013-11-23 09:31:19 -05:00
|
|
|
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" };
|
2013-07-26 21:18:53 -07:00
|
|
|
|
2013-12-31 15:30:34 -05:00
|
|
|
public void getSubItems (Block b)
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
|
|
|
|
for (int i = 0; i < patternName.length; i++)
|
|
|
|
|
if (!(patternName[i].equals("")))
|
2013-12-31 15:30:34 -05:00
|
|
|
list.add(new ItemStack(b, 1, i));
|
2013-07-26 21:18:53 -07:00
|
|
|
}
|
|
|
|
|
}
|