Skip to content

Commit

Permalink
fix: 可視性が一番低いもので上書きされる処理を削除 (#6)をrevert
Browse files Browse the repository at this point in the history
This reverts commit e8875c4.
  • Loading branch information
Toshimichi0915 authored Aug 22, 2023
1 parent 15ee6c2 commit 8e85d33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.21
loader_version=0.14.19
# Mod Properties
maven_group=net.toshimichi
archives_base_name=kze-plus
Expand Down
14 changes: 9 additions & 5 deletions src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ public static VisibilityMode getVisibilityMode() {
VisibilityMode mode = KzePlus.getInstance().getDefaultVisibility();

if (player.isSneaking()) {
return options.getHideOnSneak();
} else if (player.isSprinting() || gameOptions.forwardKey.isPressed() && gameOptions.sprintKey.isPressed()) {
return options.getHideOnSprint();
} else {
return mode;
VisibilityMode candidate = options.getHideOnSneak();
if (candidate.ordinal() > mode.ordinal()) mode = candidate;
}

if (player.isSprinting() || gameOptions.forwardKey.isPressed() && gameOptions.sprintKey.isPressed()) {
VisibilityMode candidate = options.getHideOnSprint();
if (candidate.ordinal() > mode.ordinal()) mode = candidate;
}

return mode;
}
}

0 comments on commit 8e85d33

Please sign in to comment.