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)