From 6660a929b9af1960e9edf736b240b43e89cd6058 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 27 Jun 2023 22:22:58 +0700 Subject: [PATCH] Don't do full battery refill --- .../ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index 110ba7170..28e18f30c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -1276,7 +1276,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial mattery.iteration++ mattery.shouldSendIteration = true mattery.deathLog.addLast(ply.tickCount to ply.combatTracker.deathMessage) - mattery.androidEnergy.fillBattery() // если смерть была от разряда батареи, то предотвращаем софтлок + mattery.androidEnergy.batteryLevel = mattery.androidEnergy.batteryLevel.coerceAtLeast(Decimal(20_000)) // если смерть была от разряда батареи, то предотвращаем софтлок while (mattery.deathLog.size > 6) { mattery.deathLog.removeFirst()