Use inlined variant
This commit is contained in:
parent
0d42378ad7
commit
188f7c51b4
@ -41,7 +41,7 @@ class SynchronizedPowerWithBattery(
|
||||
|
||||
fun tick() {
|
||||
if (!item.isEmpty && battery < maxBattery) {
|
||||
item.getCapability(ForgeCapabilities.ENERGY).ifPresent {
|
||||
item.getCapability(ForgeCapabilities.ENERGY).ifPresentK {
|
||||
if (it is IMatteryEnergyStorage) {
|
||||
battery += it.extractEnergyInner(maxBattery - battery, false)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user