Skip to content

Commit

Permalink
Fix HypixelBhop
Browse files Browse the repository at this point in the history
  • Loading branch information
laoshuikaixue committed Jul 11, 2024
1 parent 5a7f70a commit 7d7b640
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package net.ccbluex.liquidbounce.features.module.modules.movement.speeds.other

import net.ccbluex.liquidbounce.features.module.modules.movement.speeds.SpeedMode
import net.ccbluex.liquidbounce.features.module.modules.world.RScaffold.jumpDown
import net.ccbluex.liquidbounce.utils.MoveUtils.isMoving
import net.ccbluex.liquidbounce.utils.PlayerUtil
import net.ccbluex.liquidbounce.value.FloatValue
import net.minecraft.entity.Entity
import kotlin.math.cos
Expand All @@ -17,7 +17,7 @@ class HypixelBhop : SpeedMode("HypixelBhop") {
if ((mc.thePlayer.isInWater || mc.thePlayer.isInLava || mc.thePlayer.isSneaking)) {
return;
}
if (!jumpDown() && isMoving() && mc.currentScreen == null) {
if (!PlayerUtil.jumpDown() && isMoving() && mc.currentScreen == null) {
if (!mc.thePlayer.onGround) {
return
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/net/ccbluex/liquidbounce/utils/PlayerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.*;
import org.lwjgl.input.Keyboard;

import javax.vecmath.Vector3f;
import java.util.ArrayList;
Expand Down Expand Up @@ -267,4 +268,12 @@ public static double getDistanceToFall() {
}
return mc.thePlayer.posY - distance;
}

public static boolean keysDown() {
return Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode()) || Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode()) || Keyboard.isKeyDown(mc.gameSettings.keyBindLeft.getKeyCode()) || Keyboard.isKeyDown(mc.gameSettings.keyBindRight.getKeyCode());
}

public static boolean jumpDown() {
return Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode());
}
}

0 comments on commit 7d7b640

Please sign in to comment.