From d69d25f692e1bbef9ef8ce3f9d5295db5376f7a5 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 2 Oct 2022 22:11:47 +0700 Subject: [PATCH] Fix nanobots armor crash --- .../dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt index 9c9cce77c..58523e791 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt @@ -44,7 +44,7 @@ class NanobotsArmorFeature(android: MatteryPlayerCapability) : AndroidFeature(An ticksPassed = 0 if (!event.source.isBypassArmor && layers > 0) { - val absorbed = event.amount * STRENGTH[layers] + val absorbed = event.amount * STRENGTH[layers - 1] if (absorbed > 0.1f) { val powerRequired = ENERGY_PER_HITPOINT * absorbed