I am having issues getting my custom axe to show up in game, but no problems getting the other tools working. I tried a youtube video but it wasnt much help. Basically im unsure whether to have my class extend ItemTool or ItemAxe and how to set it up. Heres my code for the class. When the game loads the axe just doesnt appear and im not noticing any error messages in my console output. If i try the commented out bit instead, it just crashes.
public class ToolAxe extends ItemTool implements IHasModel{
public static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.WOODEN_BUTTON, Blocks.LADDER, Blocks.WOODEN_PRESSURE_PLATE);
public ToolAxe(String name, ToolMaterial material) {
super(material, EFFECTIVE_ON);
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(CreativeTabs.TOOLS);
}
public float getDestroySpeed(ItemStack stack, IBlockState state){
Material material = state.getMaterial();
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getDestroySpeed(stack, state) : this.efficiency;
}
//public class ToolAxe extends ItemAxe implements IHasModel{
//public ToolAxe(String name, ToolMaterial material, float damage, float speed) {
// super(material);
// setUnlocalizedName(name);
// setRegistryName(name);
// attackDamage = damage;
// attackSpeed = speed;
// setCreativeTab(CreativeTabs.TOOLS);
// ModItems.ITEMS.add(this);
//}