From d798d00ee17040255feae00553fb15153a557610 Mon Sep 17 00:00:00 2001 From: Toshimichi0915 Date: Tue, 22 Aug 2023 20:21:59 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AF=E8=A6=96=E6=80=A7=E3=81=8C?= =?UTF-8?q?=E4=B8=80=E7=95=AA=E4=BD=8E=E3=81=84=E3=82=82=E3=81=AE=E3=81=A7?= =?UTF-8?q?=E4=B8=8A=E6=9B=B8=E3=81=8D=E3=81=95=E3=82=8C=E3=82=8B=E5=87=A6?= =?UTF-8?q?=E7=90=86=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../net/toshimichi/kzeplus/utils/KzeUtils.java | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8fcf803..8d0e765 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.parallel=true # check these on https://fabricmc.net/develop minecraft_version=1.19.4 yarn_mappings=1.19.4+build.2 -loader_version=0.14.19 +loader_version=0.14.21 # Mod Properties maven_group=net.toshimichi archives_base_name=kze-plus diff --git a/src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java b/src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java index 3c14bed..598feb4 100644 --- a/src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java +++ b/src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java @@ -72,15 +72,11 @@ public static VisibilityMode getVisibilityMode() { VisibilityMode mode = KzePlus.getInstance().getDefaultVisibility(); if (player.isSneaking()) { - VisibilityMode candidate = options.getHideOnSneak(); - if (candidate.ordinal() > mode.ordinal()) mode = candidate; + return options.getHideOnSneak(); + } else if (player.isSprinting() || gameOptions.forwardKey.isPressed() && gameOptions.sprintKey.isPressed()) { + return options.getHideOnSprint(); + } else { + return mode; } - - if (player.isSprinting() || gameOptions.forwardKey.isPressed() && gameOptions.sprintKey.isPressed()) { - VisibilityMode candidate = options.getHideOnSprint(); - if (candidate.ordinal() > mode.ordinal()) mode = candidate; - } - - return mode; } }