From 1becc874ba378ad5015c8014df618d7fd912d778 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Mon, 9 Jun 2014 22:55:03 +0200 Subject: [PATCH] Check if input is a water bottle first --- .../gmail/nossr50/datatypes/skills/alchemy/PotionStage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/alchemy/PotionStage.java b/src/main/java/com/gmail/nossr50/datatypes/skills/alchemy/PotionStage.java index 9f8df4fba..68ec76428 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/alchemy/PotionStage.java +++ b/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()));