Skip to content

Commit

Permalink
fixed speed when pressing space key!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Oct 4, 2023
1 parent 5c094a3 commit e540811
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 42 deletions.
26 changes: 18 additions & 8 deletions NightX.iws
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@
<component name="ChangeListManager">
<list default="true" id="af093b99-5942-419c-869b-8b2d7cb4dd2a" name="変更" comment="">
<change beforePath="$PROJECT_DIR$/NightX.iws" beforeDir="false" afterPath="$PROJECT_DIR$/NightX.iws" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Speed.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Speed.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/visual/SilentView.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/visual/SilentView.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/AntiVelocity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/AntiVelocity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Flight.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Flight.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Parkour.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/Parkour.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/other/Jump.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/other/Jump.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/other/YPort.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/other/YPort.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/spartan/SpartanYPort.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/spartan/SpartanYPort.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/watchdog/WatchdogBoost.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/watchdog/WatchdogBoost.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/watchdog/WatchdogStable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/movement/speeds/watchdog/WatchdogStable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/other/FreeLook.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/other/FreeLook.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Freecam.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Freecam.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Scaffold.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Scaffold.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Step.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/player/Step.kt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
Expand Down Expand Up @@ -190,7 +200,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -265,7 +275,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -292,7 +302,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -307,7 +317,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -382,7 +392,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -397,7 +407,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import net.aspw.client.util.timer.MSTimer
import net.aspw.client.value.BoolValue
import net.aspw.client.value.FloatValue
import net.aspw.client.value.ListValue
import net.minecraft.client.settings.GameSettings
import net.minecraft.network.play.client.C03PacketPlayer
import net.minecraft.network.play.client.C03PacketPlayer.*
import net.minecraft.network.play.client.C0FPacketConfirmTransaction
Expand Down Expand Up @@ -308,7 +309,7 @@ class AntiVelocity : Module() {
}

"matrixground" -> {
if (mc.thePlayer.onGround && !mc.gameSettings.keyBindJump.isKeyDown)
if (mc.thePlayer.onGround && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump))
mc.thePlayer.onGround = false
}

Expand Down Expand Up @@ -453,7 +454,7 @@ class AntiVelocity : Module() {
"matrixground" -> {
packet.motionX = (packet.getMotionX() * 0.36).toInt()
packet.motionZ = (packet.getMotionZ() * 0.36).toInt()
if (mc.thePlayer.onGround && !mc.gameSettings.keyBindJump.isKeyDown) {
if (mc.thePlayer.onGround && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
packet.motionY = (-628.7).toInt()
packet.motionX = (packet.getMotionX() * 0.6).toInt()
packet.motionZ = (packet.getMotionZ() * 0.6).toInt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ class Flight : Module() {
mc.thePlayer.motionY = vanillaMotionYValue.get().toDouble()
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand All @@ -894,7 +894,7 @@ class Flight : Module() {
mc.thePlayer.motionY = -1E-10
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += 0.4f
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -932,7 +932,7 @@ class Flight : Module() {
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
mc.thePlayer.noClip = true
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -995,7 +995,7 @@ class Flight : Module() {
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionZ = 0.0

if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -1087,7 +1087,7 @@ class Flight : Module() {
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -1135,7 +1135,7 @@ class Flight : Module() {
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -1268,7 +1268,7 @@ class Flight : Module() {
}

"aac1.9.10" -> {
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
aacJump += 0.2
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -1316,7 +1316,7 @@ class Flight : Module() {
mc.netHandler.addToSendQueue(
C06PacketPlayerPosLook(
mc.thePlayer.posX + mc.thePlayer.motionX * 999,
mc.thePlayer.posY + (if (mc.gameSettings.keyBindJump.isKeyDown) 1.5624 else 0.00000001) - if (mc.gameSettings.keyBindSneak.isKeyDown) 0.0624 else 0.00000002,
mc.thePlayer.posY + (if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) 1.5624 else 0.00000001) - if (mc.gameSettings.keyBindSneak.isKeyDown) 0.0624 else 0.00000002,
mc.thePlayer.posZ + mc.thePlayer.motionZ * 999,
mc.thePlayer.rotationYaw,
mc.thePlayer.rotationPitch,
Expand Down Expand Up @@ -1347,7 +1347,7 @@ class Flight : Module() {
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaVSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand All @@ -1358,11 +1358,11 @@ class Flight : Module() {
}

"jetpack" -> {
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += 0.14
if (mc.thePlayer.isSprinting) {
mc.thePlayer.motionX *= 1.15
mc.thePlayer.motionZ *= 1.15
mc.thePlayer.motionX *= 1.12
mc.thePlayer.motionZ *= 1.12
}
}
}
Expand Down Expand Up @@ -1455,7 +1455,7 @@ class Flight : Module() {
.equals("damage", ignoreCase = true) && pearlState == 1 && mc.thePlayer.hurtTime > 0
) pearlState = 2
if (pearlState == 2) {
if (mc.gameSettings.keyBindJump.isKeyDown) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) {
mc.thePlayer.motionY += vanillaSpeed.toDouble()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
Expand Down Expand Up @@ -1612,7 +1612,10 @@ class Flight : Module() {
when (event.eventState) {
EventState.PRE -> {
mc.thePlayer.motionY =
if (mc.gameSettings.keyBindJump.isKeyDown) 2.0 else if (mc.gameSettings.keyBindJump.isKeyDown) -2.0 else 0.0
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) 2.0 else if (GameSettings.isKeyDown(
mc.gameSettings.keyBindJump
)
) -2.0 else 0.0
var var10_8 = 0
while (var10_8 < 3) {
PacketUtils.sendPacketNoEvent(
Expand Down Expand Up @@ -2199,7 +2202,10 @@ class Flight : Module() {
"clip" -> if (clipNoMove.get()) event.zeroXZ()

"veruslowhop" -> {
if (!mc.thePlayer.isInWeb && !mc.thePlayer.isInLava && !mc.thePlayer.isInWater && !mc.thePlayer.isOnLadder && !mc.gameSettings.keyBindJump.isKeyDown && mc.thePlayer.ridingEntity == null) {
if (!mc.thePlayer.isInWeb && !mc.thePlayer.isInLava && !mc.thePlayer.isInWater && !mc.thePlayer.isOnLadder && !GameSettings.isKeyDown(
mc.gameSettings.keyBindJump
) && mc.thePlayer.ridingEntity == null
) {
if (MovementUtils.isMoving()) {
mc.gameSettings.keyBindJump.pressed = false
if (mc.thePlayer.onGround) {
Expand All @@ -2221,7 +2227,7 @@ class Flight : Module() {
event.z = Math.cos(Math.toRadians(mc.thePlayer.rotationYaw.toDouble())) * 2.4
cubecraftTeleportTickTimer.reset()
}
if (mc.gameSettings.keyBindJump.isKeyDown && cubecraftTeleportYTickTimer.hasTimePassed(2)) {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump) && cubecraftTeleportYTickTimer.hasTimePassed(2)) {
event.y = 1.6
cubecraftTeleportYTickTimer.reset()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ 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.util.MovementUtils
import net.minecraft.client.settings.GameSettings

@ModuleInfo(name = "Parkour", description = "", category = ModuleCategory.MOVEMENT)
class Parkour : Module() {

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (MovementUtils.isMoving() && mc.thePlayer.onGround && !mc.thePlayer.isSneaking && !mc.gameSettings.keyBindSneak.isKeyDown && !mc.gameSettings.keyBindJump.isKeyDown &&
if (MovementUtils.isMoving() && mc.thePlayer.onGround && !mc.thePlayer.isSneaking && !mc.gameSettings.keyBindSneak.isKeyDown && !GameSettings.isKeyDown(
mc.gameSettings.keyBindJump
) &&
mc.theWorld.getCollidingBoundingBoxes(
mc.thePlayer, mc.thePlayer.entityBoundingBox
.offset(0.0, -0.5, 0.0).expand(-0.001, 0.0, -0.001)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.aspw.client.features.module.impl.movement.Speed;
import net.aspw.client.features.module.impl.movement.speeds.SpeedMode;
import net.aspw.client.util.MovementUtils;
import net.minecraft.client.settings.GameSettings;

/**
* The type Jump.
Expand All @@ -30,7 +31,7 @@ public void onUpdate() {

if (speed == null)
return;
if (MovementUtils.isMoving() && mc.thePlayer.onGround && !mc.gameSettings.keyBindJump.isKeyDown() && !(mc.thePlayer.isInWater() || mc.thePlayer.isInLava()) && mc.thePlayer.jumpTicks == 0) {
if (MovementUtils.isMoving() && mc.thePlayer.onGround && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump) && !(mc.thePlayer.isInWater() || mc.thePlayer.isInLava()) && mc.thePlayer.jumpTicks == 0) {
mc.thePlayer.jump();
mc.thePlayer.jumpTicks = 10;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockAir;
import net.minecraft.block.material.Material;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
Expand Down Expand Up @@ -36,7 +37,7 @@ public YPort() {

@Override
public void onMotion() {
if (!safeJump && !mc.gameSettings.keyBindJump.isKeyDown() && !mc.thePlayer.isOnLadder() && !mc.thePlayer.isInsideOfMaterial(Material.water) && !mc.thePlayer.isInsideOfMaterial(Material.lava) && !mc.thePlayer.isInWater() && ((!(this.getBlock(-1.1) instanceof BlockAir) && !(this.getBlock(-1.1) instanceof BlockAir)) || (!(this.getBlock(-0.1) instanceof BlockAir) && mc.thePlayer.motionX != 0.0 && mc.thePlayer.motionZ != 0.0 && !mc.thePlayer.onGround && mc.thePlayer.fallDistance < 3.0f && mc.thePlayer.fallDistance > 0.05)) && this.level == 3)
if (!safeJump && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump) && !mc.thePlayer.isOnLadder() && !mc.thePlayer.isInsideOfMaterial(Material.water) && !mc.thePlayer.isInsideOfMaterial(Material.lava) && !mc.thePlayer.isInWater() && ((!(this.getBlock(-1.1) instanceof BlockAir) && !(this.getBlock(-1.1) instanceof BlockAir)) || (!(this.getBlock(-0.1) instanceof BlockAir) && mc.thePlayer.motionX != 0.0 && mc.thePlayer.motionZ != 0.0 && !mc.thePlayer.onGround && mc.thePlayer.fallDistance < 3.0f && mc.thePlayer.fallDistance > 0.05)) && this.level == 3)
mc.thePlayer.motionY = -0.3994;

double xDist = mc.thePlayer.posX - mc.thePlayer.prevPosX;
Expand Down
Loading

0 comments on commit e540811

Please sign in to comment.