Merge pull request #2951 from minoneer/brewing-fuel

Fix brewing stands consuming all remaining fuel items
This commit is contained in:
t00thpick1 2016-06-25 12:53:20 -04:00 committed by GitHub
commit e73e628051

View File

@ -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;
@ -70,7 +71,10 @@ public class AlchemyBrewTask extends BukkitRunnable {
return;
}
((BrewingStand) brewingStand).setFuelLevel(fuel);
if (firstRun) {
firstRun = false;
((BrewingStand) brewingStand).setFuelLevel(fuel);
}
brewTimer -= brewSpeed;