Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 可視性が一番低いもので上書きされる処理を削除 #6

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.19
loader_version=0.14.21
# Mod Properties
maven_group=net.toshimichi
archives_base_name=kze-plus
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/net/toshimichi/kzeplus/utils/KzeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}