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