mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Check if input is a water bottle first
This commit is contained in:
parent
b107a8dc7c
commit
1becc874ba
@ -33,13 +33,17 @@ public enum PotionStage {
|
||||
|
||||
public static PotionStage getPotionStage(AlchemyPotion input, AlchemyPotion output) {
|
||||
PotionStage potionStage = getPotionStage(output);
|
||||
if (getPotionStage(input) == potionStage) {
|
||||
if (!isWaterBottle(input) && getPotionStage(input) == potionStage) {
|
||||
potionStage = PotionStage.FIVE;
|
||||
}
|
||||
|
||||
return potionStage;
|
||||
}
|
||||
|
||||
private static boolean isWaterBottle(AlchemyPotion input) {
|
||||
return input.getEffects().isEmpty();
|
||||
}
|
||||
|
||||
public static PotionStage getPotionStage(AlchemyPotion alchemyPotion) {
|
||||
Potion potion = Potion.fromItemStack(new ItemStack(Material.POTION, 1, alchemyPotion.getDataValue()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user