1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

Check if input is a water bottle first

This commit is contained in:
TfT_02
2014-06-09 22:55:03 +02:00
parent b107a8dc7c
commit 1becc874ba

View File

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