This commit is contained in:
DBotThePony 2023-03-27 18:34:20 +07:00
parent d373393a5c
commit 42dcd22043
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -230,7 +230,7 @@ class MatterReconstructorBlockEntity(blockPos: BlockPos, blockState: BlockState)
val graph = matterNode.graph as MatterGraph? val graph = matterNode.graph as MatterGraph?
if (graph != null) { if (graph != null) {
val toDrain = (matterPerTick * EXTRACT_TICKS.coerceAtMost(item.damageValue)).coerceAtLeast(Decimal.ZERO).coerceAtMost(matter.missingMatter) val toDrain = (matterPerTick * EXTRACT_TICKS.coerceAtMost(item.damageValue) - matter.storedMatter).coerceAtLeast(Decimal.ZERO).coerceAtMost(matter.missingMatter)
matter.receiveMatterInner(graph.extractMatter(toDrain, false), false) matter.receiveMatterInner(graph.extractMatter(toDrain, false), false)
} }
} }