From 0e9674a9125289c5d6672d6029e160756bb34b5b Mon Sep 17 00:00:00 2001 From: Jacob Martin Date: Sun, 19 Jun 2016 19:33:01 -0500 Subject: [PATCH] Fix brewing stand fuel refill loop. If a brewing stand had 1 as a fuel value, and a brew was started (setting the fuel level to 0), the brewing stand would refill on its own while mcMMO would keep setting the fuel value back to 0. This used up all of the available blaze powder. --- .../com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java | 6 ++++-- 1 file changed, 4 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..a9885b73c 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java @@ -69,8 +69,10 @@ public class AlchemyBrewTask extends BukkitRunnable { return; } - - ((BrewingStand) brewingStand).setFuelLevel(fuel); + + if (fuel != 0 || ((BrewingStand) brewingStand).getFuelLevel() != 20) { + ((BrewingStand) brewingStand).setFuelLevel(fuel); + } brewTimer -= brewSpeed;