question: 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 ) ; }
target:  Requests mana from items in a given player's inventory. This version also checks for IManaDiscountArmor items equipped to lower the cost.