forked from CCBlueX/LiquidBounce
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LEGACY] Added speed NewVerusLowHop mode (CCBlueX#1577)
Tested in: Loyisa (Verus) Anticheat-test (Verus)
- Loading branch information
1 parent
c725e77
commit 71666d4
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
.../ccbluex/liquidbounce/features/module/modules/movement/speedmodes/verus/NewVerusLowHop.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.verus | ||
|
||
import net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.SpeedMode | ||
import net.ccbluex.liquidbounce.utils.MovementUtils.isMoving | ||
import net.ccbluex.liquidbounce.utils.MovementUtils.strafe | ||
import net.minecraft.potion.Potion | ||
|
||
object NewVerusLowHop : SpeedMode("NewVerusLowHop") { | ||
|
||
private var speed = 0.0f | ||
private var airTicks = 0 | ||
|
||
override fun onUpdate() { | ||
if (isMoving) { | ||
if (mc.thePlayer.onGround) { | ||
airTicks = 0 | ||
|
||
// Checks for MoveSpeed potion effect 1 & 2 | ||
speed = if (mc.thePlayer.isPotionActive(Potion.moveSpeed) | ||
&& mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).amplifier == 1) | ||
0.5f else 0.33f | ||
speed = if (mc.thePlayer.isPotionActive(Potion.moveSpeed) | ||
&& mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).amplifier == 2) | ||
0.25f else 0.33f | ||
|
||
mc.thePlayer.jump() | ||
} else { | ||
if (airTicks == 0) { | ||
mc.thePlayer.motionY = -0.09800000190734863 | ||
} | ||
|
||
airTicks++ | ||
speed *= 0.99f | ||
} | ||
|
||
strafe(speed, false) | ||
} | ||
} | ||
} |