mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Fixed usages of deprecated getFullDiscountForTools method (#2622)
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user