package com.juanwan11_magicnation.Items;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


public class itemGemStoneBloodPickaxe extends ItemPickaxe {
//Vars

	protected itemGemStoneBloodPickaxe(ToolMaterial toolMaterial) {
		super(toolMaterial.EMERALD);
		setMaxDamage(50);
		
	}
	@SideOnly(Side.CLIENT)
	public void addInformation(ItemStack itemStack, EntityPlayer player,List list, boolean bool) {
		if (itemStack.isItemEnchanted() != true) {
			list.add("You Must Right Click The Pickaxe ");
			list.add("If Not Then You Will Lose Your Enchantments ");
		} else
		list.add("Uses Left: "+ (itemStack.getMaxDamage()-itemStack.getItemDamageForDisplay()));
	} 
	
	@Override
	public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
		if(itemStack.isItemEnchanted() != true){
			itemStack.addEnchantment(Enchantment.fortune, 5);
			itemStack.addEnchantment(Enchantment.efficiency, 5);
			itemStack.setItemDamage(0);		
		}else if(itemStack.isItemDamaged())
				if(itemStack.getItemDamage()>=50){
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBlood);
					itemStack.setItemDamage(itemStack.getItemDamage()-50);
					Minecraft.getMinecraft().thePlayer.sendChatMessage("You Have Filled The Pickaxe In Magical Essence And Got 50 Durability");
				}else{
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBloodPickaxe);
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBlood);
					Minecraft.getMinecraft().thePlayer.sendChatMessage("You Have Filled The Pickaxe In Magical Essence And It Has Exploded");
				}
			return itemStack;
	}
	
	public boolean onBlockDestroyed(ItemStack itemStack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving)
        {
          if(itemStack.getItemDamage()==50){
                Minecraft.getMinecraft().thePlayer.sendChatMessage("WHY YOU DESTROY THE PICKAXE!!!!");

          }
          itemStack.damageItem(1, entityLiving);

            return false;
        }
}

package com.juanwan11_magicnation.Items;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


public class itemGemStoneBloodPickaxe extends ItemPickaxe {
//Vars

	protected itemGemStoneBloodPickaxe(ToolMaterial toolMaterial) {
		super(toolMaterial.EMERALD);
		setMaxDamage(50);
		
	}
	@SideOnly(Side.CLIENT)
	public void addInformation(ItemStack itemStack, EntityPlayer player,List list, boolean bool) {
		if (itemStack.isItemEnchanted() != true) {
			list.add("You Must Right Click The Pickaxe ");
			list.add("If Not Then You Will Lose Your Enchantments ");
		} else
		list.add("Uses Left: "+ (itemStack.getMaxDamage()-itemStack.getItemDamageForDisplay()));
	} 
	
	@Override
	public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
		if(itemStack.isItemEnchanted() != true){
			itemStack.addEnchantment(Enchantment.fortune, 5);
			itemStack.addEnchantment(Enchantment.efficiency, 5);
			itemStack.setItemDamage(0);		
		}else if(itemStack.isItemDamaged())
				if(itemStack.getItemDamage()>=50){
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBlood);
					itemStack.setItemDamage(itemStack.getItemDamage()-50);
					Minecraft.getMinecraft().thePlayer.sendChatMessage("You Have Filled The Pickaxe In Magical Essence And Got 50 Durability");
				}else{
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBloodPickaxe);
					player.inventory.consumeInventoryItem(MAItems.itemGemStoneBlood);
					Minecraft.getMinecraft().thePlayer.sendChatMessage("You Have Filled The Pickaxe In Magical Essence And It Has Exploded");
				}
			return itemStack;
	}
	
	public boolean onBlockDestroyed(ItemStack itemStack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving)
        {
          if(itemStack.getItemDamage()==50){
                Minecraft.getMinecraft().thePlayer.sendChatMessage("WHY YOU DESTROY THE PICKAXE!!!!");

          }
          itemStack.damageItem(1, entityLiving);

            return false;
        }
        @Override
	public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) {
	Block block = world.getBlock(x, y, z);
        int meta = world.getBlockMetadata(x, y, z);
	if (ForgeHooks.isToolEffective(stack, block, meta)){
            return true;
            	Block block = world.getBlock(x, y-2, z);
        if (ForgeHooks.isToolEffective(stack, block, meta)){
            return true;
	}
		Block block = world.getBlock(x, y+1, z);
        if (ForgeHooks.isToolEffective(stack, block, meta)){
            return true;
	}
	
	}

	}
}

Update itemGemStoneBloodPickaxe.java