From c6e0777942b3d28bdf244a65ae0083b182fd4621 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 20 Jun 2023 17:39:24 +0700 Subject: [PATCH] =?UTF-8?q?YuRaNnNzZZ=20=E2=80=94=20=D0=A1=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=D0=B4=D0=BD=D1=8F,=20=D0=B2=2017:38=20:WiseTree:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/tech/BatteryBankBlockEntity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt index bb98310ec..ec8a38a77 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/BatteryBankBlockEntity.kt @@ -88,6 +88,8 @@ class BatteryBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Matte if (!simulate && !summ.isZero) { setChangedLight() gaugeLevel = (batteryLevel / maxBatteryLevel).toFloat() + } else if (!simulate && container.isEmpty) { + gaugeLevel = 0f } if (!simulate) {