Fix: blaze burner overfill and automation issue

Currently when inserting an item that smelts > 50 items such as lava buckets into an unfueled blaze burner, its burn time will go over maximum.
This fixes that by limiting added burn time from a single item to 98% of max burn time.
Also fixes #3518
This commit is contained in:
NotSoEpic 2022-10-29 09:43:20 +08:00
parent 0c5ccf38ee
commit 172c8da43e

View file

@ -192,7 +192,7 @@ public class BlazeBurnerTileEntity extends SmartTileEntity {
newBurnTime = 1000; newBurnTime = 1000;
newFuel = FuelType.SPECIAL; newFuel = FuelType.SPECIAL;
} else { } else {
newBurnTime = ForgeHooks.getBurnTime(itemStack, null); newBurnTime = (int)Math.min(ForgeHooks.getBurnTime(itemStack, null), (float)(MAX_HEAT_CAPACITY) * 0.98);
if (newBurnTime > 0) if (newBurnTime > 0)
newFuel = FuelType.NORMAL; newFuel = FuelType.NORMAL;
else if (AllItemTags.BLAZE_BURNER_FUEL_REGULAR.matches(itemStack)) { else if (AllItemTags.BLAZE_BURNER_FUEL_REGULAR.matches(itemStack)) {