Browse Source

Check if input is a water bottle first

TfT_02 11 years ago
parent
commit
1becc874ba

+ 5 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/alchemy/PotionStage.java

@@ -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()));