From a618436ddd35ca2cbc343b0d4c48435bc7d55f53 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 14 Nov 2023 13:29:59 +0300 Subject: [PATCH] fix android charger not using battery from its own slot --- .../mc/otm/block/entity/tech/AndroidChargerBlockEntity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/AndroidChargerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/AndroidChargerBlockEntity.kt index feb2972cd..83946a3ab 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/AndroidChargerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/AndroidChargerBlockEntity.kt @@ -25,7 +25,8 @@ class AndroidChargerBlockEntity(blockPos: BlockPos, blockState: BlockState) : Ma return AndroidChargerMenu(containerID, inventory, this) } - val energyConfig = ConfigurableEnergy(ProfiledEnergyStorage(WorkerEnergyStorage(this::markDirtyFast, MachinesConfig.ANDROID_CHARGER)), modesTop = FlowDirection.NONE) + override val energy = ProfiledEnergyStorage(WorkerEnergyStorage(this::markDirtyFast, MachinesConfig.ANDROID_CHARGER)) + val energyConfig = ConfigurableEnergy(energy, modesTop = FlowDirection.NONE) init { savetables.stateful(energyConfig::energy, ENERGY_KEY)