mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 21:15:28 +02:00
When burnTime is less than or equal to 0, do not process (#5194)
This commit is contained in:
@@ -68,7 +68,7 @@ public class InventoryListener implements Listener {
|
||||
furnaceState instanceof Furnace ? ((Furnace) furnaceState).getInventory()
|
||||
.getSmelting() : null;
|
||||
|
||||
if (!ItemUtils.isSmeltable(smelting)) {
|
||||
if (!ItemUtils.isSmeltable(smelting) || event.getBurnTime() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -34,6 +34,7 @@ public class SmeltingManager extends SkillManager {
|
||||
* @param burnTime The initial burn time from the {@link FurnaceBurnEvent}
|
||||
*/
|
||||
public int fuelEfficiency(int burnTime) {
|
||||
if (burnTime <= 0) return 0;
|
||||
return Math.min(Short.MAX_VALUE, Math.max(1, burnTime * getFuelEfficiencyMultiplier()));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user