@@ -5,6 +5,7 @@ import com.lambda.client.event.events.PacketEvent
55import com.lambda.client.module.Category
66import com.lambda.client.module.Module
77import com.lambda.client.util.EntityUtils.flooredPosition
8+ import com.lambda.client.util.MovementUtils.isMoving
89import com.lambda.client.util.threads.safeListener
910import com.lambda.mixin.world.MixinBlockSoulSand
1011import com.lambda.mixin.world.MixinBlockWeb
@@ -41,6 +42,9 @@ object NoSlowDown : Module(
4142 private val shield by setting(" Shield" , true , { ! allItems })
4243
4344 private var savedClickWindow = CPacketClickWindow ()
45+
46+ private const val upSpoofDistance = 0.0656
47+
4448 /*
4549 * InputUpdateEvent is called just before the player is slowed down @see EntityPlayerSP.onLivingUpdate)
4650 * We'll abuse this fact, and multiply moveStrafe and moveForward by 5 to nullify the *0.2f hardcoded by Mojang.
@@ -60,6 +64,8 @@ object NoSlowDown : Module(
6064 && player.onGround
6165 && it.packet is CPacketClickWindow
6266 && it.packet != savedClickWindow
67+ && player.isMoving
68+ && world.getCollisionBoxes(player, player.entityBoundingBox.offset(0.0 , upSpoofDistance, 0.0 )).isEmpty()
6369 ) {
6470 savedClickWindow = it.packet
6571
@@ -69,7 +75,7 @@ object NoSlowDown : Module(
6975 player.connection.sendPacket(CPacketEntityAction (player, CPacketEntityAction .Action .STOP_SPRINTING ))
7076 }
7177
72- player.connection.sendPacket(CPacketPlayer .Position (player.posX, player.posY + 0.0626 , player.posZ, false ))
78+ player.connection.sendPacket(CPacketPlayer .Position (player.posX, player.posY + upSpoofDistance , player.posZ, false ))
7379 player.connection.sendPacket(it.packet)
7480
7581 if (player.isSprinting) {
0 commit comments