Skip to content

Commit 1142bd0

Browse files
committed
Increase checks for item move bypass
1 parent ac36d99 commit 1142bd0

File tree

1 file changed

+7
-1
lines changed
  • src/main/kotlin/com/lambda/client/module/modules/movement

1 file changed

+7
-1
lines changed

src/main/kotlin/com/lambda/client/module/modules/movement/NoSlowDown.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.lambda.client.event.events.PacketEvent
55
import com.lambda.client.module.Category
66
import com.lambda.client.module.Module
77
import com.lambda.client.util.EntityUtils.flooredPosition
8+
import com.lambda.client.util.MovementUtils.isMoving
89
import com.lambda.client.util.threads.safeListener
910
import com.lambda.mixin.world.MixinBlockSoulSand
1011
import 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

Comments
 (0)