diff --git a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java index f42584b25f..8b9f9ae360 100644 --- a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java +++ b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java @@ -114,6 +114,7 @@ public static void finishBrewing(BlockState brewingStand, Player player, boolean } List inputList = new ArrayList<>(); + ItemStack[] outputList = new ItemStack[3]; for (int i = 0; i < 3; i++) { ItemStack item = inventory.getItem(i); @@ -128,7 +129,7 @@ public static void finishBrewing(BlockState brewingStand, Player player, boolean inputList.add(input); if (output != null) { - inventory.setItem(i, output.toItemStack(item.getAmount()).clone()); + outputList[i] = output.toItemStack(item.getAmount()).clone(); } } @@ -139,6 +140,12 @@ public static void finishBrewing(BlockState brewingStand, Player player, boolean return; } + for (int i = 0; i < 3; i++) { + if(outputList[i] != null) { + inventory.setItem(i, outputList[i]); + } + } + removeIngredient(inventory, player); for (AlchemyPotion input : inputList) {