Skip to content

Commit

Permalink
Fix Step
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Jan 7, 2024
1 parent e5053bb commit 3392f77
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/aspw/client/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import net.minecraft.util.ResourceLocation
object Client {

// Client information
const val isInDevelopment = false
const val isInDevelopment = true

const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightWare"
const val CLIENT_VERSION = "Release B79"
const val CLIENT_VERSION = "Beta B80"
const val CLIENT_CREATOR = "As_pw"
const val CLIENT_WEBSITE = "https://aspw-w.github.io/NightX-Web"
const val CLIENT_ANNOUNCEMENT = "$CLIENT_WEBSITE/database/announcement.txt"
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/net/aspw/client/features/module/impl/player/Step.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import net.aspw.client.event.*
import net.aspw.client.features.module.Module
import net.aspw.client.features.module.ModuleCategory
import net.aspw.client.features.module.ModuleInfo
import net.aspw.client.features.module.impl.movement.Speed
import net.aspw.client.util.MovementUtils
import net.aspw.client.util.timer.MSTimer
import net.aspw.client.value.BoolValue
Expand Down Expand Up @@ -85,6 +86,11 @@ class Step : Module() {

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (Client.moduleManager.getModule(Speed::class.java)?.state!!) {
mc.thePlayer.stepHeight = 0.5F
return
}

if (usedTimer) {
mc.timer.timerSpeed = 1F
usedTimer = false
Expand Down Expand Up @@ -140,6 +146,11 @@ class Step : Module() {

@EventTarget
fun onMove(event: MoveEvent) {
if (Client.moduleManager.getModule(Speed::class.java)?.state!!) {
mc.thePlayer.stepHeight = 0.5F
return
}

val mode = modeValue.get()

// Motion steps
Expand Down Expand Up @@ -179,6 +190,11 @@ class Step : Module() {
fun onStep(event: StepEvent) {
mc.thePlayer ?: return

if (Client.moduleManager.getModule(Speed::class.java)?.state!!) {
mc.thePlayer.stepHeight = 0.5F
return
}

val mode = modeValue.get()

// Set step to default in some cases
Expand Down Expand Up @@ -212,6 +228,11 @@ class Step : Module() {
if (mc.thePlayer == null || !isStep) // Check if step
return

if (Client.moduleManager.getModule(Speed::class.java)?.state!!) {
mc.thePlayer.stepHeight = 0.5F
return
}

if (mc.thePlayer.entityBoundingBox.minY - stepY > 0.8) {
if (Client.moduleManager[Step::class.java]!!.state && useTimer.get() && mc.thePlayer.onGround && modeValue.get() != "Matrix"
) {
Expand Down

0 comments on commit 3392f77

Please sign in to comment.