Skip to content

Commit

Permalink
B121
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 13, 2024
1 parent 097f69f commit 61d3994
Show file tree
Hide file tree
Showing 22 changed files with 291 additions and 275 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "B120"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"
const val CLIENT_VERSION = "B121"
const val CLIENT_CHAT = "§7[§5N§di§3g§bh§6t§aX§7] [§eInfo§7] §r"

var isStarting = false

Expand Down
28 changes: 1 addition & 27 deletions src/main/java/net/aspw/client/features/api/PacketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.network.Packet;
import org.lwjgl.opengl.GL11;

import java.awt.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Objects;
Expand Down Expand Up @@ -78,31 +76,7 @@ public void onRender3D(Render3DEvent event) {
findPos(routeX, routeY, routeZ);
routeTimer.reset();
}
Color color = new Color(255, 255, 255, 180);
synchronized (routePositions) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_DEPTH_TEST);
mc.entityRenderer.disableLightmap();
GL11.glBegin(GL11.GL_LINE_STRIP);
RenderUtils.glColor(color);
double renderPosX = mc.getRenderManager().viewerPosX;
double renderPosY = mc.getRenderManager().viewerPosY;
double renderPosZ = mc.getRenderManager().viewerPosZ;
for (Vec3 pos : routePositions) {
GL11.glVertex3d(pos.getX() - renderPosX, pos.getY() - renderPosY, pos.getZ() - renderPosZ);
}
GL11.glColor4d(1.0, 1.0, 1.0, 1.0);
GL11.glEnd();
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
RenderUtils.renderPathFinderLine(routePositions);
} else if (!routePositions.isEmpty())
routePositions.clear();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class ModuleManager : Listenable {
TargetESP::class.java,
ReverseFreecam::class.java,
HiderESP::class.java,
LegitVelocity::class.java
LegitVelocity::class.java,
Debug::class.java
)

ClientUtils.getLogger().info("Successfully loaded modules")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package net.aspw.client.features.module.impl.exploit

import net.aspw.client.event.EventTarget
import net.aspw.client.event.Render3DEvent
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.utils.MovementUtils
import net.aspw.client.utils.render.RenderUtils
import net.aspw.client.value.IntegerValue

@ModuleInfo(name = "Debug", category = ModuleCategory.EXPLOIT)
class Debug : Module() {
private val rangeValue = IntegerValue("Range", 100, 0, 200)

@EventTarget
fun onRender3D(event: Render3DEvent) {
val positions = MovementUtils.predict(rangeValue.get())
RenderUtils.renderLine(positions)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ class Flight : Module() {
MovementUtils.strafe()
}

"blocksmc" -> {
val bb = mc.thePlayer.entityBoundingBox.offset(0.0, 1.0, 0.0)
if (mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isEmpty() && !starteds) {
chat("failed to toggle fly")
state = false
} else chat("waiting...")
}

"vulcanzoom" -> {
pog = false
lastSentX = mc.thePlayer.posX
Expand Down Expand Up @@ -1331,15 +1339,51 @@ class Flight : Module() {
if (event.eventState === EventState.PRE) {
val bb = mc.thePlayer.entityBoundingBox.offset(0.0, 1.0, 0.0)

if (starteds) {
mc.thePlayer.motionY += 0.025
MovementUtils.strafe(0.95f.let { bmcSpeed *= it; bmcSpeed }.toFloat())
}

if (mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isEmpty() && !starteds) {
starteds = true
mc.thePlayer.jump()
MovementUtils.strafe(4.also { bmcSpeed = it.toDouble() }.toFloat())
MovementUtils.strafe(5.also { bmcSpeed = it.toDouble() }.toFloat())
chat("started")
}

if (starteds) {
val pos = mc.thePlayer.position.add(0.0, -1.5, 0.0)
if (mc.thePlayer.onGround) {
PacketUtils.sendPacketNoEvent(
C08PacketPlayerBlockPlacement(
pos,
1,
ItemStack(Blocks.stone.getItem(mc.theWorld, pos)),
0.0F,
0.5F + Math.random().toFloat() * 0.44.toFloat(),
0.0F
)
)
}
if (mc.thePlayer.ticksExisted % 4 == 0) {
chat("sent c08")
PacketUtils.sendPacketNoEvent(
C08PacketPlayerBlockPlacement(
pos,
1,
ItemStack(Blocks.stone.getItem(mc.theWorld, pos)),
0.0F,
0.5F + Math.random().toFloat() * 0.44.toFloat(),
0.0F
)
)
}
MovementUtils.strafe(0.95f.let { bmcSpeed *= it; bmcSpeed }.toFloat())
if (bmcSpeed >= 3.1f)
mc.timer.timerSpeed = 0.45f
else mc.timer.timerSpeed = 0.2f
chat(bmcSpeed.toString())
if (bmcSpeed <= 3f) {
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
chat("disabled")
state = false
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package net.aspw.client.features.module.impl.movement
import net.aspw.client.event.EventState
import net.aspw.client.event.EventTarget
import net.aspw.client.event.MotionEvent
import net.aspw.client.event.UpdateEvent
import net.aspw.client.features.module.Module
import net.aspw.client.features.module.ModuleCategory
import net.aspw.client.features.module.ModuleInfo
Expand All @@ -22,43 +23,46 @@ class SilentSneak : Module() {
get() = modeValue.get()

@EventTarget
fun onMotion(event: MotionEvent) {
if (mc.thePlayer.isSneaking)
sneaking = false
if (!sneaking && !mc.thePlayer.isSneaking) {
when (modeValue.get().lowercase(Locale.getDefault())) {
"legit" -> mc.gameSettings.keyBindSneak.pressed = true
fun onUpdate(event: UpdateEvent) {
if (modeValue.get().equals("legit", true))
mc.gameSettings.keyBindSneak.pressed = true
}

"normal" -> {
if (event.eventState === EventState.PRE) {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SNEAKING
)
@EventTarget
fun onMotion(event: MotionEvent) {
if (modeValue.get().equals("normal", true)) {
if (mc.thePlayer.isSneaking)
sneaking = false
if (!sneaking && !mc.thePlayer.isSneaking) {
if (event.eventState === EventState.PRE) {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SNEAKING
)
}
)
}
sneaking = true
chat("fix")
}
sneaking = true
}
}

override fun onDisable() {
sneaking = false
if (mc.thePlayer == null) return
when (modeValue.get().lowercase(Locale.getDefault())) {
"legit" -> if (!GameSettings.isKeyDown(
mc.gameSettings.keyBindSneak
)
) mc.gameSettings.keyBindSneak.pressed = false

"normal" -> mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SNEAKING
)
)

"legit" -> if (!GameSettings.isKeyDown(
mc.gameSettings.keyBindSneak
)
) mc.gameSettings.keyBindSneak.pressed = false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@
import net.aspw.client.utils.MovementUtils;
import net.minecraft.potion.Potion;

/**
* The type Verus hop.
*/
public class VerusHop extends SpeedMode {

/**
* Instantiates a new Verus hop.
*/
public VerusHop() {
super("VerusHop");
}
Expand All @@ -31,12 +25,11 @@ public void onUpdate() {
if (mc.thePlayer.onGround) {
mc.thePlayer.jump();
if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
MovementUtils.strafe(0.56f);
MovementUtils.strafe(0.55f);
} else {
MovementUtils.strafe(0.48f);
MovementUtils.strafe(0.47f);
}
}
MovementUtils.strafe();
} else MovementUtils.strafe();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class PacketTracker : Module() {
val packet = event.packet

if (transactionIDValue.get() && packet is C0FPacketConfirmTransaction)
chat("§c[Transaction ID]: §r" + packet.uid.toString())
chat("§c[Transaction ID] §r" + packet.uid.toString())

if (keepAliveKeyValue.get() && packet is C00PacketKeepAlive)
chat("§c[KeepAlive Key]: §r" + packet.key.toString())
chat("§c[KeepAlive Key] §r" + packet.key.toString())
}
}
54 changes: 17 additions & 37 deletions src/main/java/net/aspw/client/features/module/impl/player/Blink.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ import net.minecraft.network.Packet
import net.minecraft.network.play.client.*
import net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition
import net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook
import org.lwjgl.opengl.GL11
import java.awt.Color
import net.minecraft.util.Vec3
import java.util.*
import java.util.concurrent.LinkedBlockingQueue

@ModuleInfo(name = "Blink", category = ModuleCategory.PLAYER)
class Blink : Module() {
private val pulseValue = BoolValue("Pulse", true)
private val packets = LinkedBlockingQueue<Packet<*>>()
private val positions = LinkedList<DoubleArray>()
private val positions = LinkedList<Vec3>()
private val c0FValue = BoolValue("C0FCancel", false)
private val pulseDelayValue = IntegerValue("PulseDelay", 400, 10, 5000, "ms") { pulseValue.get() }
private val pulseTimer = MSTimer()
Expand All @@ -34,22 +33,20 @@ class Blink : Module() {

override fun onEnable() {
if (mc.thePlayer == null) return
if (!pulseValue.get()) {
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
mc.theWorld.addEntityToWorld(-1337, fakePlayer)
}
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
mc.theWorld.addEntityToWorld(-1337, fakePlayer)
synchronized(positions) {
positions.add(
doubleArrayOf(
Vec3(
mc.thePlayer.posX,
mc.thePlayer.entityBoundingBox.minY + mc.thePlayer.getEyeHeight() / 2,
mc.thePlayer.posZ
)
)
positions.add(doubleArrayOf(mc.thePlayer.posX, mc.thePlayer.entityBoundingBox.minY, mc.thePlayer.posZ))
positions.add(Vec3(mc.thePlayer.posX, mc.thePlayer.entityBoundingBox.minY, mc.thePlayer.posZ))
}
pulseTimer.reset()
}
Expand All @@ -67,7 +64,7 @@ class Blink : Module() {
fun onPacket(event: PacketEvent) {
val packet = event.packet
if (mc.thePlayer == null || disableLogger) return
if (packet is C03PacketPlayer) // Cancel all movement stuff
if (packet is C03PacketPlayer)
event.cancelEvent()
if (packet is C04PacketPlayerPosition || packet is C06PacketPlayerPosLook ||
packet is C08PacketPlayerBlockPlacement ||
Expand All @@ -83,44 +80,27 @@ class Blink : Module() {
fun onUpdate(event: UpdateEvent?) {
synchronized(positions) {
positions.add(
doubleArrayOf(
Vec3(
mc.thePlayer.posX,
mc.thePlayer.entityBoundingBox.minY,
mc.thePlayer.posZ
)
)
}
if (pulseValue.get() && pulseTimer.hasTimePassed(pulseDelayValue.get().toLong())) {
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
mc.theWorld.addEntityToWorld(-1337, fakePlayer)
blink()
pulseTimer.reset()
}
}

@EventTarget
fun onRender3D(event: Render3DEvent?) {
val color = Color(255, 255, 255, 180)
synchronized(positions) {
GL11.glPushMatrix()
GL11.glDisable(GL11.GL_TEXTURE_2D)
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
GL11.glEnable(GL11.GL_LINE_SMOOTH)
GL11.glEnable(GL11.GL_BLEND)
GL11.glDisable(GL11.GL_DEPTH_TEST)
mc.entityRenderer.disableLightmap()
GL11.glBegin(GL11.GL_LINE_STRIP)
RenderUtils.glColor(color)
val renderPosX = mc.renderManager.viewerPosX
val renderPosY = mc.renderManager.viewerPosY
val renderPosZ = mc.renderManager.viewerPosZ
for (pos in positions) GL11.glVertex3d(pos[0] - renderPosX, pos[1] - renderPosY, pos[2] - renderPosZ)
GL11.glColor4d(1.0, 1.0, 1.0, 1.0)
GL11.glEnd()
GL11.glEnable(GL11.GL_DEPTH_TEST)
GL11.glDisable(GL11.GL_LINE_SMOOTH)
GL11.glDisable(GL11.GL_BLEND)
GL11.glEnable(GL11.GL_TEXTURE_2D)
GL11.glPopMatrix()
}
RenderUtils.renderLine(positions)
}

override val tag: String
Expand Down
Loading

0 comments on commit 61d3994

Please sign in to comment.