From db2ab57bfc4e96f12608460cf14a20578285e60c Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 13 Mar 2023 22:53:41 +0700 Subject: [PATCH] don't trigger AndroidTravelUnderwater if you have air bags --- .../dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 60f2b8c83..0cfa76cc1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -816,8 +816,9 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial } else { if (wasInLiquid) { wasInLiquid = false - val distance = (lastOutsideLiquid - ply.position).length() - AndroidTravelUnderwater.trigger(ply, distance) + + if (!hasFeature(AndroidFeatures.AIR_BAGS)) + AndroidTravelUnderwater.trigger(ply, (lastOutsideLiquid - ply.position).length()) } lastOutsideLiquid = ply.position