소스 검색

Fix an issue where brewing stands will consume two fuel units for vanilla ingredients.

Jacob Martin 8 년 전
부모
커밋
6388246418
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java

+ 5 - 2
src/main/java/com/gmail/nossr50/runnables/skills/AlchemyBrewTask.java

@@ -52,8 +52,11 @@ public class AlchemyBrewTask extends BukkitRunnable {
         if (Alchemy.brewingStandMap.containsKey(location)) {
             Alchemy.brewingStandMap.get(location).cancel();
         }
-        
-        fuel = ((BrewingStand) brewingStand).getFuelLevel() - 1;
+
+        fuel = ((BrewingStand) brewingStand).getFuelLevel();
+
+        if (((BrewingStand) brewingStand).getBrewingTime() == -1) // Only decrement on our end if it isn't a vanilla ingredient.
+            fuel--;
 
         Alchemy.brewingStandMap.put(location, this);
         this.runTaskTimer(mcMMO.p, 1, 1);