Fixed plank make without sufficient funds

Fixed potions not taking doses in some cases
This commit is contained in:
Ceikry
2023-06-06 08:02:55 +00:00
committed by Ryan
parent 3d20bb97d0
commit f5711fcf8f
4 changed files with 31 additions and 34 deletions
@@ -62,7 +62,9 @@ public class Potion extends Drink {
}
}
public static int getDose(Item potion){
public int getDose(Item potion){
for (int i = 0; i < ids.length; i++)
if (ids[i] == potion.getId()) return ids.length - i;
return Integer.parseInt(potion.getName().replaceAll("[^\\d.]",""));
}