Send matter back into network when not working, inside matter replicator

This commit is contained in:
DBotThePony 2023-07-19 11:29:07 +07:00
parent b00d275d0f
commit fe870bd4a8
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -191,6 +191,14 @@ class MatterReplicatorBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) :
var lastRender = 0L
var particleRenderScore = 0L
override fun tick() {
super.tick()
if (jobEventLoops[0].currentJob == null && matter.storedMatter.isPositive) {
matter.extractMatter(matterNode.graph.receiveMatter(matter.storedMatter, false), false)
}
}
override fun computeNextJob(id: Int): JobContainer<ReplicatorJob> {
if (energy.batteryLevel < BASE_CONSUMPTION) {
return JobContainer.noEnergy()