From a51398e22053661c4af9043f5a99db42ff9e490f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 14 Apr 2023 13:06:13 +0700 Subject: [PATCH] Fix mattery gui tracking last mattery player state wrong --- src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index 9c2ec1590..d3f648c70 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -204,11 +204,12 @@ object MatteryGUI { if (!ply.isAlive && mattery == null) { mattery = lastState + } else if (ply.isAlive && mattery != null) { + lastState = mattery } if (mattery != null && mattery.isAndroid) { event.isCanceled = true - lastState = mattery if (event.overlay === AIR_LEVEL_ELEMENT) { return @@ -290,11 +291,12 @@ object MatteryGUI { if (!ply.isAlive && mattery == null) { mattery = lastState + } else if (ply.isAlive && mattery != null) { + lastState = mattery } if (mattery != null && mattery.isAndroid) { event.isCanceled = true - lastState = mattery if (!gui.shouldDrawSurvivalElements()) return