Skip to content

Commit

Permalink
IThinkYouLoveIt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Apr 30, 2024
1 parent 1ddee25 commit 8101016
Show file tree
Hide file tree
Showing 11 changed files with 181 additions and 84 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 = "B112"
const val CLIENT_VERSION = "B113"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"

var isStarting = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package net.aspw.client.features.command.impl

import net.aspw.client.Launch
import net.aspw.client.event.EventTarget
import net.aspw.client.event.PacketEvent
import net.aspw.client.features.command.Command
import net.aspw.client.features.module.impl.visual.Interface
import net.minecraft.network.play.client.C0BPacketEntityAction

class RemoteViewCommand : Command("remoteview", arrayOf("rv")) {
/**
Expand Down Expand Up @@ -36,14 +33,6 @@ class RemoteViewCommand : Command("remoteview", arrayOf("rv")) {
}
}

@EventTarget
fun onPacket(event: PacketEvent) {
val packet = event.packet
if (packet is C0BPacketEntityAction) {
event.cancelEvent()
}
}

override fun tabComplete(args: Array<String>): List<String> {
if (args.isEmpty()) return emptyList()

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

ClientUtils.getLogger().info("Successfully loaded modules")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class WatchdogGround : SpeedMode("WatchdogGround") {
mc.thePlayer.triggerAchievement(StatList.jumpStat)
val baseSpeed = 0.482f
if (mc.thePlayer.isPotionActive(Potion.moveSpeed))
MovementUtils.strafe(baseSpeed + ((mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).amplifier + 1).toFloat() * 0.0575f))
MovementUtils.strafe(baseSpeed + ((mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).amplifier + 1).toFloat() * 0.057f))
else MovementUtils.strafe(baseSpeed)
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Blink : Module() {
private val pulseTimer = MSTimer()
private var fakePlayer: EntityOtherPlayerMP? = null
private var disableLogger = false

override fun onEnable() {
if (mc.thePlayer == null) return
if (!pulseValue.get()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
package net.aspw.client.features.module.impl.player

import net.aspw.client.event.EventTarget
import net.aspw.client.event.MotionEvent
import net.aspw.client.event.PacketEvent
import net.aspw.client.event.UpdateEvent
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.MovementUtils
import net.aspw.client.utils.PacketUtils
import net.aspw.client.value.BoolValue
import net.aspw.client.value.FloatValue
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.client.settings.GameSettings
import net.minecraft.network.play.client.C03PacketPlayer
import net.minecraft.network.play.client.C0BPacketEntityAction
import org.lwjgl.input.Keyboard

@ModuleInfo(name = "Freecam", category = ModuleCategory.PLAYER, keyBind = Keyboard.KEY_F8)
class Freecam : Module() {
private val speedValue = FloatValue("Speed", 1f, 0f, 2f, "m")
private val noClipValue = BoolValue("NoClip", true)
private var fakePlayer: EntityOtherPlayerMP? = null

var fakePlayer: EntityOtherPlayerMP? = null
private var oldX = 0.0
private var oldY = 0.0
private var oldZ = 0.0
private var oldYaw = 0f
private var oldPitch = 0f
private var oldGround = false
private var oldFlying = false

override fun onEnable() {
if (mc.thePlayer == null) return
Expand All @@ -37,12 +34,13 @@ class Freecam : Module() {
oldYaw = mc.thePlayer.rotationYaw
oldPitch = mc.thePlayer.rotationPitch
oldGround = mc.thePlayer.onGround
oldFlying = mc.thePlayer.capabilities.isFlying
mc.thePlayer.motionY += 0.42f
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
mc.theWorld.addEntityToWorld(-1000, fakePlayer)
if (noClipValue.get()) mc.thePlayer.noClip = true
}

override fun onDisable() {
Expand All @@ -53,34 +51,26 @@ class Freecam : Module() {
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionZ = 0.0
mc.thePlayer.capabilities.isFlying = oldFlying
}

@EventTarget
fun onUpdate(event: UpdateEvent?) {
if (noClipValue.get()) mc.thePlayer.noClip = true
mc.thePlayer.fallDistance = 0f
val value = speedValue.get()
mc.thePlayer.motionY = 0.0
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) mc.thePlayer.motionY += value.toDouble()
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
mc.thePlayer.motionY -= value.toDouble()
mc.gameSettings.keyBindSneak.pressed = false
}
MovementUtils.strafe(value)
fun onWorld(event: WorldEvent) {
state = false
chat("Freecam was disabled")
}

@EventTarget
fun onMotion(event: MotionEvent) {
mc.thePlayer.cameraPitch = 0f
mc.thePlayer.cameraYaw = 0f
fun onUpdate(event: UpdateEvent?) {
if (noClipValue.get()) mc.thePlayer.noClip = true
mc.thePlayer.onGround = false
mc.thePlayer.capabilities.isFlying = true
}

@EventTarget
fun onPacket(event: PacketEvent) {
val packet = event.packet
if (packet is C03PacketPlayer || packet is C0BPacketEntityAction) {
if (packet is C03PacketPlayer) {
event.cancelEvent()
PacketUtils.sendPacketNoEvent(
C03PacketPlayer.C06PacketPlayerPosLook(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
package net.aspw.client.features.module.impl.player

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.utils.MovementUtils
import net.aspw.client.utils.PacketUtils
import net.aspw.client.value.FloatValue
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.client.settings.GameSettings
import net.minecraft.network.play.client.C03PacketPlayer
import kotlin.math.cos
import kotlin.math.sin

@ModuleInfo(name = "ReverseFreecam", "Reverse Freecam", category = ModuleCategory.PLAYER)
class ReverseFreecam : Module() {
private var speedValue = FloatValue("Speed", 0.5f, 0f, 1f)
private var vSpeedValue = FloatValue("V-Speed", 0.5f, 0f, 1f)

private var fakePlayer: EntityOtherPlayerMP? = null
private var startX: Double? = null
private var startY: Double? = null
private var startZ: Double? = null

override fun onDisable() {
reset()
}

private fun reset() {
if (fakePlayer != null) {
mc.theWorld.removeEntityFromWorld(fakePlayer!!.entityId)
fakePlayer = null
}
if (startX != null && startY != null && startZ != null) {
startX = null
startY = null
startZ = null
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak))
mc.gameSettings.keyBindSneak.pressed = true
}

@EventTarget
fun onWorld(event: WorldEvent) {
state = false
chat("ReverseFreecam was disabled")
}

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (startX != null && startY != null && startZ != null) {
if (MovementUtils.isMoving()) {
startX = startX!! - sin(MovementUtils.getDirection()) * speedValue.get()
startZ = startZ!! + cos(MovementUtils.getDirection()) * speedValue.get()
}
if (GameSettings.isKeyDown(mc.gameSettings.keyBindJump))
startY = startY!! + vSpeedValue.get()
if (GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)) {
startY = startY!! - vSpeedValue.get()
mc.gameSettings.keyBindSneak.pressed = false
}
}
}

@EventTarget
fun onMotion(event: MotionEvent) {
if (startX == null)
startX = mc.thePlayer.posX
if (startY == null)
startY = mc.thePlayer.posY
if (startZ == null)
startZ = mc.thePlayer.posZ
mc.thePlayer.cameraPitch = 0f
mc.thePlayer.cameraYaw = 0f
}

@EventTarget
fun onTeleport(event: TeleportEvent) {
startX = event.posX
startY = event.posY
startZ = event.posZ
event.cancelEvent()
}

@EventTarget
fun onMove(event: MoveEvent) {
event.zero()
}

@EventTarget
fun onPacket(event: PacketEvent) {
val packet = event.packet

if (packet is C03PacketPlayer) {
fakePlayer = EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.gameProfile)
fakePlayer!!.clonePlayer(mc.thePlayer, true)
fakePlayer!!.copyLocationAndAnglesFrom(mc.thePlayer)
fakePlayer!!.prevRotationYaw = mc.thePlayer.prevRotationYaw
fakePlayer!!.prevRotationPitch = mc.thePlayer.prevRotationPitch
fakePlayer!!.prevRenderYawOffset = mc.thePlayer.prevRenderYawOffset
fakePlayer!!.prevRotationYawHead = mc.thePlayer.prevRotationYawHead
fakePlayer!!.rotationYaw = mc.thePlayer.rotationYaw
fakePlayer!!.rotationPitch = mc.thePlayer.rotationPitch
fakePlayer!!.renderYawOffset = mc.thePlayer.renderYawOffset
fakePlayer!!.rotationYawHead = mc.thePlayer.rotationYawHead
fakePlayer!!.posX = startX!!
fakePlayer!!.posY = startY!!
fakePlayer!!.posZ = startZ!!
mc.theWorld.addEntityToWorld(-1337, fakePlayer)
event.cancelEvent()
if (startX != null && startY != null && startZ != null)
PacketUtils.sendPacketNoEvent(
C03PacketPlayer.C06PacketPlayerPosLook(
startX!!,
startY!!,
startZ!!,
packet.yaw,
packet.pitch,
packet.onGround
)
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -495,22 +495,26 @@ class Scaffold : Module() {
if (mc.thePlayer.onGround) {
offGroundTicks = 0
} else offGroundTicks++
if ((hypixelCount == 0 || !mc.thePlayer.isPotionActive(Potion.moveSpeed) && hypixelCount >= 5 || mc.thePlayer.isPotionActive(
Potion.moveSpeed
) && hypixelCount >= 6) && autoJumpValue.get().equals("hypixelkeepy", true)
) {
mc.thePlayer.motionX *= 0.1
mc.thePlayer.motionZ *= 0.1
if (mc.thePlayer.posY >= launchY + 1 && mc.thePlayer.posY < launchY + 2) {
KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode)
hypixelCount++
}
if (!mc.thePlayer.isPotionActive(Potion.moveSpeed) && hypixelCount >= 6 || mc.thePlayer.isPotionActive(

if (autoJumpValue.get().equals("hypixelkeepy", true)) {
if (hypixelCount == 0 || !mc.thePlayer.isPotionActive(Potion.moveSpeed) && hypixelCount >= 5 || mc.thePlayer.isPotionActive(
Potion.moveSpeed
) && hypixelCount >= 7
)
hypixelCount = 0
) && hypixelCount >= 6
) {
mc.thePlayer.motionX *= 0.1
mc.thePlayer.motionZ *= 0.1
if (mc.thePlayer.posY >= launchY + 1 && mc.thePlayer.posY < launchY + 2) {
KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode)
hypixelCount++
}
if (!mc.thePlayer.isPotionActive(Potion.moveSpeed) && hypixelCount >= 6 || mc.thePlayer.isPotionActive(
Potion.moveSpeed
) && hypixelCount >= 7
)
hypixelCount = 0
}
}

if (desyncValue.get()) {
synchronized(positions) {
positions.add(
Expand All @@ -527,7 +531,6 @@ class Scaffold : Module() {
}
}

// scaffold custom speed if enabled
if (customSpeedValue.get()) MovementUtils.strafe(customMoveSpeedValue.get())
if (sprintModeValue.get().equals("off", ignoreCase = true) || sprintModeValue.get()
.equals("ground", ignoreCase = true) && !mc.thePlayer.onGround || sprintModeValue.get()
Expand Down Expand Up @@ -662,12 +665,8 @@ class Scaffold : Module() {
faceBlock = true

try {
if (faceBlock) {
if (faceBlock)
place()
} else if (slot != mc.thePlayer.inventoryContainer.getSlot(InventoryUtils.findAutoBlockBlock()).slotIndex) {
mc.thePlayer.inventory.currentItem = InventoryUtils.findAutoBlockBlock() - 36
mc.playerController.updateController()
}
} catch (ignored: Exception) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public void renderItemInFirstPerson(final float partialTicks) {
break;
}
case "Moon": {
GL11.glTranslated(Animations.blockPosX.get().doubleValue() - 0.08, Animations.blockPosY.get().doubleValue() + 0.06, Animations.blockPosZ.get().doubleValue());
GL11.glTranslated(Animations.blockPosX.get().doubleValue() - 0.08, Animations.blockPosY.get().doubleValue() + 0.12, Animations.blockPosZ.get().doubleValue());
final float var9 = MathHelper.sin(MathHelper.sqrt_float(this.mc.thePlayer.getSwingProgress(partialTicks)) * 3.1415927F);
GL11.glTranslated(0.0D, 0.0D, 0.0D);
if (Animations.cancelEquip.get())
Expand Down
Loading

0 comments on commit 8101016

Please sign in to comment.