Un-seal BlockEnergyStorageImpl
This commit is contained in:
parent
7e5711d210
commit
cd5f9dff2e
@ -13,13 +13,25 @@ import ru.dbotthepony.mc.otm.core.math.Decimal
|
||||
import ru.dbotthepony.mc.otm.core.nbt.mapPresent
|
||||
import ru.dbotthepony.mc.otm.core.nbt.set
|
||||
|
||||
sealed class BlockEnergyStorageImpl(
|
||||
open class BlockEnergyStorageImpl(
|
||||
protected val listener: () -> Unit,
|
||||
final override val energyFlow: FlowDirection,
|
||||
private val maxBatteryLevelProvider: () -> Decimal,
|
||||
private val maxInputProvider: () -> Decimal?,
|
||||
private val maxOutputProvider: () -> Decimal?,
|
||||
) : IMatteryEnergyStorage, INBTSerializable<CompoundTag?>, IEnergyStorageImpl {
|
||||
constructor(
|
||||
listener: () -> Unit,
|
||||
energyFlow: FlowDirection,
|
||||
values: EnergyBalanceValues
|
||||
) : this(listener, energyFlow, values::energyCapacity, values::energyThroughput, values::energyThroughput)
|
||||
|
||||
constructor(
|
||||
listener: () -> Unit,
|
||||
energyFlow: FlowDirection,
|
||||
values: VerboseEnergyBalanceValues
|
||||
) : this(listener, energyFlow, values::energyCapacity, values::maxEnergyReceive, values::maxEnergyExtract)
|
||||
|
||||
private var maxInputStorage: Decimal? = null
|
||||
private var maxOutputStorage: Decimal? = null
|
||||
private var maxBatteryLevelStorage: Decimal? = null
|
||||
|
Loading…
Reference in New Issue
Block a user