mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Cleanup finishBrewing a bit
This commit is contained in:
parent
7f9ada14c8
commit
254f3b5ac9
@ -101,18 +101,20 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
ItemStack item = inventory.getItem(i);
|
ItemStack item = inventory.getItem(i).clone();
|
||||||
|
|
||||||
if (!isEmpty(item) && PotionConfig.getInstance().isValidPotion(item)) {
|
if (isEmpty(item) || !PotionConfig.getInstance().isValidPotion(item)) {
|
||||||
AlchemyPotion input = PotionConfig.getInstance().getPotion(item.getDurability());
|
continue;
|
||||||
AlchemyPotion output = PotionConfig.getInstance().getPotion(input.getChildDataValue(ingredient));
|
}
|
||||||
|
|
||||||
if (output != null) {
|
AlchemyPotion input = PotionConfig.getInstance().getPotion(item.getDurability());
|
||||||
inventory.setItem(i, output.toItemStack(item.getAmount()).clone());
|
AlchemyPotion output = PotionConfig.getInstance().getPotion(input.getChildDataValue(ingredient));
|
||||||
|
|
||||||
if (player != null) {
|
if (output != null) {
|
||||||
UserManager.getPlayer(player).getAlchemyManager().handlePotionBrewSuccesses(1);
|
inventory.setItem(i, output.toItemStack(item.getAmount()).clone());
|
||||||
}
|
|
||||||
|
if (player != null) {
|
||||||
|
UserManager.getPlayer(player).getAlchemyManager().handlePotionBrewSuccesses(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user