diff --git a/src/main/kotlin/codes/som/hibiscus/features/combat/Criticals.kt b/src/main/kotlin/codes/som/hibiscus/features/combat/Criticals.kt index 0dee4ec..983741d 100644 --- a/src/main/kotlin/codes/som/hibiscus/features/combat/Criticals.kt +++ b/src/main/kotlin/codes/som/hibiscus/features/combat/Criticals.kt @@ -6,6 +6,7 @@ import codes.som.hibiscus.events.SendPacketEvent import codes.som.hibiscus.mixins.MixinExtPlayerInteractEntityC2SPacket import codes.som.hibiscus.player import codes.som.hibiscus.util.ext.requireExtension +import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket @@ -19,6 +20,14 @@ class Criticals : Feature("Criticals", FeatureCategory.COMBAT) { if (packet.typeHandler.type != PlayerInteractEntityC2SPacket.InteractType.ATTACK) return@on + player.isSprinting = false + player.networkHandler.sendPacket( + ClientCommandC2SPacket( + player, + ClientCommandC2SPacket.Mode.STOP_SPRINTING + ) + ) + player.networkHandler.sendPacket( PlayerMoveC2SPacket.PositionAndOnGround( player.x,