package me.deftware.mixin.mixins.input;

import me.deftware.client.framework.event.events.EventSlowdown;
import net.minecraft.client.input.KeyboardInput;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;

@Mixin(KeyboardInput.class)
public class MixinMovementInputFromOptions {

    @ModifyVariable(method = "tick", at = @At("HEAD"))
    public boolean onTick(boolean slowDown) {
        EventSlowdown event = new EventSlowdown(EventSlowdown.SlowdownType.Sneak);
        event.broadcast();
        return !event.isCanceled() && slowDown;
    }
}

@@ -307,16 +307,24 @@
 %0A@Mixin(
+value = 
 Keyboard
@@ -334,16 +334,32 @@
 ut.class
+, priority = 999
 )%0Apublic

fix compatibility w/ clientcommands