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