mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-31 06:39:36 +01:00
Fix brewing stands consuming all remaining fuel items when the fuel bar is refilled
This commit is contained in:
parent
11aa126b80
commit
25cad3afc6
@ -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;
|
||||||
@ -69,8 +70,11 @@ public class AlchemyBrewTask extends BukkitRunnable {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
((BrewingStand) brewingStand).setFuelLevel(fuel);
|
if (firstRun) {
|
||||||
|
firstRun = false;
|
||||||
|
((BrewingStand) brewingStand).setFuelLevel(fuel);
|
||||||
|
}
|
||||||
|
|
||||||
brewTimer -= brewSpeed;
|
brewTimer -= brewSpeed;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user