Fix cable wrong "transferred" calculation

This commit is contained in:
DBotThePony 2025-01-15 20:32:06 +07:00
parent 6fb9f4474e
commit 90dc125b1b
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -97,7 +97,7 @@ class EnergyCableGraph : GraphNodeList<EnergyCableBlockEntity.Node, EnergyCableG
}
}
val min = if (simulate) segments.minOf { it.throughput(instantSnapshot) } else segments.minOf { it.availableThroughput }
val min = minOf(if (simulate) segments.minOf { it.throughput(instantSnapshot) } else segments.minOf { it.availableThroughput }, amount)
if (min.isPositive) {
if (simulate)