diff options
author | nea <nea@nea.moe> | 2023-08-25 14:59:49 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-25 14:59:52 +0200 |
commit | ddc00804f1d2f909eae4461fb8d2e7571be107fc (patch) | |
tree | d684d2a46904f4daa21fcc63b8f693c590496a6f /src/main/kotlin | |
parent | 784231941661a3108549a1b5cd499bc5f7de2e46 (diff) | |
download | firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.gz firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.bz2 firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.zip |
Auto Sprint
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/fixes/Fixes.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/fixes/Fixes.kt b/src/main/kotlin/moe/nea/firmament/features/fixes/Fixes.kt index 77397bc..1077f31 100644 --- a/src/main/kotlin/moe/nea/firmament/features/fixes/Fixes.kt +++ b/src/main/kotlin/moe/nea/firmament/features/fixes/Fixes.kt @@ -8,6 +8,10 @@ package moe.nea.firmament.features.fixes import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig +import moe.nea.firmament.util.MC +import net.minecraft.client.MinecraftClient +import net.minecraft.client.option.KeyBinding +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable object Fixes : FirmamentFeature { override val identifier: String @@ -15,11 +19,20 @@ object Fixes : FirmamentFeature { object TConfig : ManagedConfig(identifier) { val fixUnsignedPlayerSkins by toggle("player-skins") { true } + val autoSprint by toggle("auto-sprint") { false } } override val config: ManagedConfig get() = TConfig + fun handleIsPressed( + keyBinding: KeyBinding, + cir: CallbackInfoReturnable<Boolean> + ) { + if (keyBinding === MinecraftClient.getInstance().options.sprintKey && TConfig.autoSprint && MC.player?.isSprinting != true) + cir.returnValue = true + } + override fun onLoad() { } } |