From 99b85a2a11cf3df8b210dcbd2529a1b68af9476d Mon Sep 17 00:00:00 2001 From: Toshimichi0915 Date: Wed, 4 Sep 2024 05:15:02 +0900 Subject: [PATCH] Fix sprint --- gradle.properties | 2 +- .../java/net/toshimichi/thymine/mixin/KeyBindingMixin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index a8059e7..b41451c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.21.1 yarn_mappings=1.21.1+build.3 loader_version=0.16.2 # Mod Properties -mod_version=1.8.6 +mod_version=1.8.7 maven_group=net.toshimichi archives_base_name=thymine # Dependencies diff --git a/src/main/java/net/toshimichi/thymine/mixin/KeyBindingMixin.java b/src/main/java/net/toshimichi/thymine/mixin/KeyBindingMixin.java index 51635e0..6177f4e 100644 --- a/src/main/java/net/toshimichi/thymine/mixin/KeyBindingMixin.java +++ b/src/main/java/net/toshimichi/thymine/mixin/KeyBindingMixin.java @@ -18,8 +18,8 @@ public class KeyBindingMixin { @Inject(at = @At("HEAD"), method = "isPressed", cancellable = true) public void isPressed(CallbackInfoReturnable cir) { - if (ThymineMod.getOptions().toggleSprint && translationKey.equals("key.sprint")) { - cir.setReturnValue(ThymineMod.getOptions().sprint); + if (ThymineMod.getOptions().toggleSprint && ThymineMod.getOptions().sprint && translationKey.equals("key.sprint")) { + cir.setReturnValue(true); } } }