mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 08:54:12 +00:00
40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package tconstruct.items;
|
|
|
|
import tconstruct.library.TConstructRegistry;
|
|
import tconstruct.library.util.IToolPart;
|
|
import mantle.items.abstracts.CraftingItem;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
public class Fletching extends CraftingItem implements IToolPart
|
|
{
|
|
public Fletching()
|
|
{
|
|
super(toolMaterialNames, buildTextureNames("_fletching"), "parts/", "tinker", TConstructRegistry.materialTab);
|
|
this.setHasSubtypes(true);
|
|
this.setMaxDamage(0);
|
|
}
|
|
|
|
private static String[] buildTextureNames (String textureType)
|
|
{
|
|
String[] names = new String[toolMaterialNames.length];
|
|
for (int i = 0; i < toolMaterialNames.length; i++)
|
|
{
|
|
if (toolTextureNames[i].equals(""))
|
|
names[i] = "";
|
|
else
|
|
names[i] = toolTextureNames[i] + textureType;
|
|
}
|
|
return names;
|
|
}
|
|
|
|
public static final String[] toolMaterialNames = new String[] { "feather", "leaf", "slime", "blueslime" };
|
|
|
|
public static final String[] toolTextureNames = new String[] { "feather", "leaf", "slime", "blueslime" };
|
|
|
|
@Override
|
|
public int getMaterialID (ItemStack stack)
|
|
{
|
|
return stack.getItemDamage();
|
|
}
|
|
}
|