mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Merge pull request #2951 from minoneer/brewing-fuel
Fix brewing stands consuming all remaining fuel items
This commit is contained in:
commit
e73e628051
@ -28,6 +28,7 @@ public class AlchemyBrewTask extends BukkitRunnable {
|
|||||||
private double brewTimer;
|
private double brewTimer;
|
||||||
private Player player;
|
private Player player;
|
||||||
private int fuel;
|
private int fuel;
|
||||||
|
private boolean firstRun = true;
|
||||||
|
|
||||||
public AlchemyBrewTask(BlockState brewingStand, Player player) {
|
public AlchemyBrewTask(BlockState brewingStand, Player player) {
|
||||||
this.brewingStand = brewingStand;
|
this.brewingStand = brewingStand;
|
||||||
@ -70,7 +71,10 @@ public class AlchemyBrewTask extends BukkitRunnable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (firstRun) {
|
||||||
|
firstRun = false;
|
||||||
((BrewingStand) brewingStand).setFuelLevel(fuel);
|
((BrewingStand) brewingStand).setFuelLevel(fuel);
|
||||||
|
}
|
||||||
|
|
||||||
brewTimer -= brewSpeed;
|
brewTimer -= brewSpeed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user