Add upgrades to matter replicator
This commit is contained in:
parent
035c3edcad
commit
b00d275d0f
@ -16,6 +16,7 @@ import ru.dbotthepony.mc.otm.block.entity.MachineJobEventLoop
|
||||
import ru.dbotthepony.mc.otm.block.entity.MatteryWorkerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.capability.FlowDirection
|
||||
import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
||||
import ru.dbotthepony.mc.otm.capability.UpgradeType
|
||||
import ru.dbotthepony.mc.otm.capability.energy.BlockEnergyStorageImpl
|
||||
import ru.dbotthepony.mc.otm.capability.energy.ProfiledEnergyStorage
|
||||
import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage
|
||||
@ -29,6 +30,7 @@ import ru.dbotthepony.mc.otm.capability.matter.ReplicationTask
|
||||
import ru.dbotthepony.mc.otm.config.ConciseBalanceValues
|
||||
import ru.dbotthepony.mc.otm.container.HandlerFilter
|
||||
import ru.dbotthepony.mc.otm.container.MatteryContainer
|
||||
import ru.dbotthepony.mc.otm.container.UpgradeContainer
|
||||
import ru.dbotthepony.mc.otm.core.math.Decimal
|
||||
import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue
|
||||
import ru.dbotthepony.mc.otm.core.math.defineDecimal
|
||||
@ -105,7 +107,8 @@ class MatterReplicatorBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) :
|
||||
}
|
||||
}
|
||||
|
||||
val energy = ProfiledEnergyStorage(WorkerEnergyStorage(::powerLevelUpdated, ENERGY_VALUES))
|
||||
override val upgrades = UpgradeContainer(this::setChangedLight, 3, UpgradeType.BASIC)
|
||||
val energy = ProfiledEnergyStorage(WorkerEnergyStorage(::powerLevelUpdated, upgrades.transform(ENERGY_VALUES)))
|
||||
val matter = ProfiledMatterStorage(MatterStorageImpl(::matterLevelUpdated, FlowDirection.INPUT, ::MATTER_CAPACITY))
|
||||
val container = MatteryContainer(::itemContainerUpdated, 5).also(::addDroppableContainer)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user