Main Class:
PowerFist = new ItemPowerFist(3001, PFIST).setIconIndex(16).setItemName("PowerFist");
LanguageRegistry.addName(PowerFist, "Power Fist");
GameRegistry.addRecipe(new ItemStack(PowerFist, 1), new Object [] {"XTX", "QVQ", " ", 'V', FalloutMain.SciGlove, 'X', Block.pistonBase, 'T', Item.redstoneRepeater, 'Q', FalloutMain.TungstenIngot});
PowerFist Class:
package blfngl.fallout.common;
import net.minecraft.src.Enchantment;
import net.minecraft.src.EnumToolMaterial;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ItemSword;
public class ItemPowerFist extends ItemSword
{
public ItemPowerFist(int itemID, EnumToolMaterial material)
{
super(itemID, material);
}
@Override
public boolean hasEffect(ItemStack par1ItemStack){
par1ItemStack.addEnchantment(Enchantment.knockback, 3);
return true;
}
public String getTextureFile()
{
return "/blfngl/fallout/textures/items.png";
}
}