Fixed usages of deprecated getFullDiscountForTools method (#2622)

This commit is contained in:
TheIllusiveC4 authored and Vincent Lee committed 2018-06-18 19:27:33 -07:00
1 parent c9f8347299
commit 5a148b01f3
1 file changed
+2 -2
@@ -299,7 +299,7 @@ public final class ManaItemHandler {
* @return The amount of mana received from the request.
*/
public static int requestManaForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player));
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
int cost = (int) (manaToGet * multiplier);
return (int) (requestMana(stack, player, cost, remove) / multiplier);
}
@@ -313,7 +313,7 @@ public final class ManaItemHandler {
* @return If the request was succesful.
*/
public static boolean requestManaExactForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player));
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
int cost = (int) (manaToGet * multiplier);
return requestManaExact(stack, player, cost, remove);
}