Make Matter Decomposer throttle for 1 tick when buffer can't fit all matter produced
This commit is contained in:
parent
f599f1c2b9
commit
df5c8dc6aa
@ -106,12 +106,17 @@ class MatterDecomposerBlockEntity(pos: BlockPos, state: BlockState)
|
|||||||
if (!status.job.matterValue.isZero)
|
if (!status.job.matterValue.isZero)
|
||||||
status.throttleFast()
|
status.throttleFast()
|
||||||
} else {
|
} else {
|
||||||
status.job.matterValue -= matter.receiveMatter(status.job.matterValue, false)
|
val received = matter.receiveMatter(status.job.matterValue, false)
|
||||||
|
status.job.matterValue -= received
|
||||||
|
|
||||||
if (status.job.matterValue.isPositive)
|
if (status.job.matterValue.isPositive) {
|
||||||
|
if (received.isPositive)
|
||||||
|
status.noMatter(1)
|
||||||
|
else
|
||||||
status.noMatter()
|
status.noMatter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun computeNextJob(id: Int): JobContainer<DecomposerJob> {
|
override fun computeNextJob(id: Int): JobContainer<DecomposerJob> {
|
||||||
val stack = inputContainer[0]
|
val stack = inputContainer[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user