<commit_before>package me.deftware.mixin.mixins;

import me.deftware.client.framework.event.events.EventSlowdown;
import net.minecraft.util.MovementInputFromOptions;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import static org.spongepowered.asm.lib.Opcodes.GETFIELD;

@Mixin(MovementInputFromOptions.class)
public class MixinMovementInputFromOptions {

	@Redirect(method = "updatePlayerMoveState", at = @At(value = "FIELD", target = "Lnet/minecraft/util/MovementInputFromOptions;sneak:Z", opcode = GETFIELD))
	private boolean isSneaking(MovementInputFromOptions self) {
		return new EventSlowdown(EventSlowdown.SlowdownType.Sneak).send().isCanceled();
	}

}<commit_msg>Fix EventSlowdown->SlowdownType.Sneak<commit_after>package me.deftware.mixin.mixins;

import static org.spongepowered.asm.lib.Opcodes.GETFIELD;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import me.deftware.client.framework.event.events.EventSlowdown;
import net.minecraft.client.Minecraft;
import net.minecraft.util.MovementInputFromOptions;

@Mixin(MovementInputFromOptions.class)
public class MixinMovementInputFromOptions {

	@Redirect(method = "updatePlayerMoveState", at = @At(value = "FIELD", target = "Lnet/minecraft/util/MovementInputFromOptions;sneak:Z", opcode = GETFIELD))
	private boolean isSneaking(MovementInputFromOptions self) {
		EventSlowdown event = new EventSlowdown(EventSlowdown.SlowdownType.Sneak).send();
		if (event.isCanceled()) {
			return false;
		}
		return Minecraft.getMinecraft().gameSettings.keyBindSneak.isKeyDown();
	}

}
{'fraction_non_alphanumeric': 0.11303344867358708, 'fraction_numerical': 0.0, 'mean_word_length': 6.9953917050691246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563419', 'n_tokens_mistral': 604, 'n_tokens_neox': 573, 'n_words': 80}