Skip to content

Commit

Permalink
BetterThingsToBeHonestly
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetchnoblade committed May 3, 2024
1 parent 7d01870 commit 46f8d4f
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "B115"
const val CLIENT_VERSION = "B116"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"

var isStarting = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ class ModuleManager : Listenable {
PacketMine::class.java,
PacketTracker::class.java,
TargetESP::class.java,
ReverseFreecam::class.java
ReverseFreecam::class.java,
HiderESP::class.java,
LegitVelocity::class.java
)

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

import net.aspw.client.event.EventTarget
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
import net.minecraft.client.settings.GameSettings

@ModuleInfo(name = "LegitVelocity", spacedName = "Legit Velocity", category = ModuleCategory.COMBAT)
class LegitVelocity : Module() {

override fun onDisable() {
if (GameSettings.isKeyDown(mc.gameSettings.keyBindForward))
mc.gameSettings.keyBindForward.pressed = true
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump))
mc.gameSettings.keyBindJump.pressed = true
}

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (mc.thePlayer.hurtTime >= 8) {
mc.gameSettings.keyBindJump.pressed = true
}
if (mc.thePlayer.hurtTime >= 7) {
mc.gameSettings.keyBindForward.pressed = true
} else if (mc.thePlayer.hurtTime >= 4) {
mc.gameSettings.keyBindJump.pressed = false
mc.gameSettings.keyBindForward.pressed = false
} else if (mc.thePlayer.hurtTime > 1) {
mc.gameSettings.keyBindForward.pressed = GameSettings.isKeyDown(mc.gameSettings.keyBindForward)
mc.gameSettings.keyBindJump.pressed = GameSettings.isKeyDown(mc.gameSettings.keyBindJump)
}
}
}
82 changes: 45 additions & 37 deletions src/main/java/net/aspw/client/features/module/impl/combat/WTap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ 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.timer.MSTimer
import net.aspw.client.value.IntegerValue
import net.aspw.client.value.ListValue
import net.minecraft.network.play.client.C0BPacketEntityAction

Expand All @@ -15,55 +17,61 @@ import net.minecraft.network.play.client.C0BPacketEntityAction
)
class WTap : Module() {
private val modeValue = ListValue("Mode", arrayOf("FullPacket", "LessPacket", "FakeSneak"), "FullPacket")
private val delayValue = IntegerValue("Delay", 4, 1, 10)

private val delayTimer = MSTimer()

@EventTarget
fun onAttack(event: AttackEvent) {
if (!MovementUtils.isMoving()) return
when (modeValue.get().lowercase()) {
"fullpacket" -> {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING
if (!MovementUtils.isMoving() || !mc.thePlayer.isSprinting) return
if (delayTimer.hasTimePassed(delayValue.get().toLong())) {
when (modeValue.get().lowercase()) {
"fullpacket" -> {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING
)
)
)
if (mc.thePlayer.isSprinting)
mc.thePlayer.isSprinting = true
mc.thePlayer.serverSprintState = true
}
if (mc.thePlayer.isSprinting)
mc.thePlayer.isSprinting = true
mc.thePlayer.serverSprintState = true
}

"lesspacket" -> {
if (mc.thePlayer.isSprinting)
"lesspacket" -> {
mc.thePlayer.isSprinting = false
mc.thePlayer.serverSprintState = false
}
mc.thePlayer.serverSprintState = false
}

"fakesneak" -> {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SPRINTING
"fakesneak" -> {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SPRINTING
)
)
)
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SNEAKING
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SNEAKING
)
)
)
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING
)
)
)
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SNEAKING
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SNEAKING
)
)
)
}
}

delayTimer.reset()
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.aspw.client.features.module.impl.other

import net.aspw.client.Launch
import net.aspw.client.event.EventTarget
import net.aspw.client.event.UpdateEvent
import net.aspw.client.features.module.Module
Expand All @@ -23,7 +24,9 @@ class Spammer : Module() {
@EventTarget
fun onUpdate(event: UpdateEvent) {
if (spamTimer.hasTimePassed(delayValue.get().toLong())) {
if (randomValue.get())
if (messageValue.get().startsWith("."))
Launch.commandManager.executeCommands(messageValue.get().drop(1))
else if (randomValue.get())
mc.thePlayer.sendChatMessage(messageValue.get() + " " + RandomUtils.randomString(3))
else mc.thePlayer.sendChatMessage(messageValue.get())
spamTimer.reset()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package net.aspw.client.features.module.impl.visual

import net.aspw.client.event.EventTarget
import net.aspw.client.event.Render3DEvent
import net.aspw.client.event.WorldEvent
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.render.RenderUtils
import net.minecraft.entity.item.EntityFallingBlock
import net.minecraft.util.BlockPos
import java.awt.Color

@ModuleInfo(name = "HiderESP", spacedName = "Hider ESP", category = ModuleCategory.VISUAL)
class HiderESP : Module() {

val blocks: MutableMap<BlockPos, Long> = HashMap()

override fun onDisable() {
synchronized(blocks) { blocks.clear() }
}

@EventTarget
fun onWorld(event: WorldEvent) {
synchronized(blocks) { blocks.clear() }
}

@EventTarget
fun onRender3D(event: Render3DEvent?) {
for (i in mc.theWorld.loadedEntityList) {
if (i !is EntityFallingBlock) continue
RenderUtils.drawEntityBox(i, Color(255, 255, 255, 120), true)
}

synchronized(blocks) {
val iterator: MutableIterator<Map.Entry<BlockPos, Long>> = blocks.entries.iterator()
while (iterator.hasNext()) {
val (key, value) = iterator.next()
if (System.currentTimeMillis() - value > 2000L) {
iterator.remove()
continue
}
RenderUtils.drawBlockBox(key, Color(255, 255, 255, 120), true)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

import net.aspw.client.Launch;
import net.aspw.client.event.StrafeEvent;
import net.aspw.client.features.module.impl.combat.HitBox;
import net.aspw.client.features.module.impl.movement.Flight;
import net.aspw.client.utils.EntityUtils;
import net.aspw.client.utils.MinecraftInstance;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.command.ICommandSender;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.util.*;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityDispatcher;
Expand All @@ -24,7 +28,6 @@

import java.util.Objects;
import java.util.Random;
import java.util.UUID;

@Mixin(Entity.class)
public abstract class MixinEntity implements ICommandSender {
Expand Down Expand Up @@ -150,6 +153,14 @@ public boolean isSneaking() {
public void moveEntity(double x, double y, double z) {
}

@Inject(method = "getCollisionBorderSize", at = @At("HEAD"), cancellable = true)
private void getCollisionBorderSize(final CallbackInfoReturnable<Float> callbackInfoReturnable) {
final HitBox hitBox = Objects.requireNonNull(Launch.moduleManager.getModule(HitBox.class));

if (hitBox.getState() && EntityUtils.isSelected(((Entity) ((Object) this)), true))
callbackInfoReturnable.setReturnValue(0.1F + hitBox.getSizeValue().get());
}

/**
* @author As_pw
* @reason Strafe Event
Expand Down

0 comments on commit 46f8d4f

Please sign in to comment.