Skip to content

Commit

Permalink
Create MineplexPhase.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
C00LC0D35 authored Jan 4, 2024
1 parent 92b8ed0 commit 698ed3c
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

package net.ccbluex.liquidbounce.features.module.modules.exploit.phases.vanilla

import net.ccbluex.liquidbounce.event.MoveEvent
import net.ccbluex.liquidbounce.features.module.modules.exploit.phases.PhaseMode
import net.ccbluex.liquidbounce.utils.MovementUtils
import net.ccbluex.liquidbounce.utils.timer.TickTimer
import kotlin.math.cos
import kotlin.math.sin

class MineplexPhase : PhaseMode("Mineplex") {
private var mineplexClip = false
private val ticktimer = TickTimer()
override fun onEnable() {
mineplexClip = false
ticktimer.reset()
}

override fun onMove(event: MoveEvent) {
if (mc.thePlayer.isCollidedHorizontally) mineplexClip = true
if (!mineplexClip) return
ticktimer.update()
event.x = 0.0
event.z = 0.0
if (ticktimer.hasTimePassed(3)) {
ticktimer.reset()
mineplexClip = false
} else if (ticktimer.hasTimePassed(1)) {
val offset = if (ticktimer.hasTimePassed(2)) 1.6 else 0.06
val direction = MovementUtils.direction
mc.thePlayer.setPosition(mc.thePlayer.posX + -sin(direction) * offset, mc.thePlayer.posY, mc.thePlayer.posZ + cos(direction) * offset)
}
}
}

0 comments on commit 698ed3c

Please sign in to comment.