From fed79e273bf93274d550887473822e05ed516cb0 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 2 Mar 2023 23:51:06 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BA=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt index 1b356d032..933bfdb14 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt @@ -235,7 +235,8 @@ class MatterReplicatorBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : // примем из сети недостающее количество бака материи, или 200 тиков репликации, что меньше val drain = graph.extractMatter(matter.missingMatter .coerceAtMost(drainPerTick * DRAIN_MULT) - .coerceAtMost(job.matterPerTick * (job.ticks - workTicks - ticksAdvanced)), true) + .coerceAtMost(job.matterPerTick * (job.ticks - workTicks - ticksAdvanced)) + .coerceAtLeast(Decimal.ONE), true) if (drain.isZero) { // в сети нет материи