From 3183e13103fa8c49c563797c93771cf3f6e4b7d9 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 29 Dec 2021 16:36:52 +0700 Subject: [PATCH] Burn fuel if buffer is less than 1 MtE --- .../mc/otm/block/entity/BlockEntityChemicalGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt index 57d69ca6f..207ac86b1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt @@ -251,7 +251,7 @@ class BlockEntityChemicalGenerator(pos: BlockPos, state: BlockState) : BlockEnti if (!container.getItem(0).isEmpty) { val ticks = ForgeHooks.getBurnTime(container.getItem(0), null) - if (ticks >= 4 && (energy.batteryLevel.isZero() || GENERATION_SPEED * (ticks / 4) + energy.batteryLevel < energy.maxBatteryLevel)) { + if (ticks >= 4 && (energy.batteryLevel < Fraction.ONE || GENERATION_SPEED * (ticks / 4) + energy.batteryLevel < energy.maxBatteryLevel)) { working_ticks_total = ticks / 4 working_ticks = ticks / 4 container.getItem(0).shrink(1)