public static int requestManaForTool(ItemStack stack,EntityPlayer player,int manaToGet,boolean remove){
  float multiplier=Math.max(0F,1F - getFullDiscountForTools(player));
  int cost=(int)(manaToGet * multiplier);
  return (int)(requestMana(stack,player,cost,remove) / multiplier);
}

public static int requestManaForTool ( ItemStack stack , EntityPlayer player , int manaToGet , boolean remove ) { float multiplier = Math . max ( 0F , 1F - getFullDiscountForTools ( player ) ) ; int cost = ( int ) ( manaToGet * multiplier ) ; return ( int ) ( requestMana ( stack , player , cost , remove ) / multiplier ) ; }
requests mana from items in a given player ' s inventory . this version also checks for imanadiscountarmor items equipped to lower the cost .
