From 25cad3afc6cb99642278c3e24f41910b73cbf6bd Mon Sep 17 00:00:00 2001 From: minoneer Date: Thu, 9 Jun 2016 02:10:27 +0200 Subject: [PATCH] Fix brewing stands consuming all remaining fuel items when the fuel bar is refilled --- .../gmail/nossr50/runnables/skills/AlchemyBrewTask.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java index e046dee2f..0a3065325 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java @@ -28,6 +28,7 @@ public class AlchemyBrewTask extends BukkitRunnable { private double brewTimer; private Player player; private int fuel; + private boolean firstRun = true; public AlchemyBrewTask(BlockState brewingStand, Player player) { this.brewingStand = brewingStand; @@ -69,8 +70,11 @@ public class AlchemyBrewTask extends BukkitRunnable { return; } - - ((BrewingStand) brewingStand).setFuelLevel(fuel); + + if (firstRun) { + firstRun = false; + ((BrewingStand) brewingStand).setFuelLevel(fuel); + } brewTimer -= brewSpeed;