Skip to content

Commit

Permalink
PICWISH
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 17, 2024
1 parent 61d3994 commit 3e99adc
Show file tree
Hide file tree
Showing 181 changed files with 304 additions and 199 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 = "B121"
const val CLIENT_VERSION = "B122"
const val CLIENT_CHAT = "§7[§5N§di§3g§bh§6t§aX§7] [§eInfo§7] §r"

var isStarting = false
Expand Down
32 changes: 26 additions & 6 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 @@ -2,6 +2,7 @@ package net.aspw.client.features.module.impl.combat

import net.aspw.client.event.AttackEvent
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
Expand All @@ -16,10 +17,15 @@ import net.minecraft.network.play.client.C0BPacketEntityAction
category = ModuleCategory.COMBAT
)
class WTap : Module() {
private val modeValue = ListValue("Mode", arrayOf("FullPacket", "LessPacket", "FakeSneak"), "FullPacket")
private val modeValue = ListValue("Mode", arrayOf("FullPacket", "FakeSneak", "Legit"), "FullPacket")
private val delayValue = IntegerValue("Delay", 4, 1, 10)

private val delayTimer = MSTimer()
private var attackTicks = 0

override fun onDisable() {
attackTicks = 0
}

@EventTarget
fun onAttack(event: AttackEvent) {
Expand All @@ -38,11 +44,6 @@ class WTap : Module() {
mc.thePlayer.serverSprintState = true
}

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

"fakesneak" -> {
mc.netHandler.addToSendQueue(
C0BPacketEntityAction(
Expand All @@ -69,12 +70,31 @@ class WTap : Module() {
)
)
}

"legit" -> attackTicks = 2
}

delayTimer.reset()
}
}

@EventTarget
fun onUpdate(event: UpdateEvent) {
when (modeValue.get().lowercase()) {
"legit" -> {
if (MovementUtils.isMoving()) {
if (attackTicks == 2) {
mc.thePlayer.isSprinting = false
attackTicks = 1
} else if (attackTicks == 1) {
mc.thePlayer.isSprinting = true
attackTicks = 0
}
} else if (attackTicks != 0) attackTicks = 0
}
}
}

override val tag: String
get() = modeValue.get()
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.PlayerUtils
import net.aspw.client.utils.render.RenderUtils
import net.aspw.client.value.IntegerValue

Expand All @@ -15,7 +15,7 @@ class Debug : Module() {

@EventTarget
fun onRender3D(event: Render3DEvent) {
val positions = MovementUtils.predict(rangeValue.get())
val positions = PlayerUtils.predict(rangeValue.get())
RenderUtils.renderLine(positions)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class SilentSneak : Module() {
)
}
sneaking = true
chat("fix")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Speed : Module() {
YPort2(),
Minemen(),
NoRules(),
Sparky(),
VerusHop(),
VerusLowHop(),
VerusFloat(),
Expand Down Expand Up @@ -271,7 +272,8 @@ class Speed : Module() {
"SlowHop",
"Jump",
"Minemen",
"NoRules"
"NoRules",
"Sparky"
),
"YPort",
{ typeValue.get().equals("server", ignoreCase = true) }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.aspw.client.features.module.impl.movement.speeds.server

import net.aspw.client.event.JumpEvent
import net.aspw.client.event.MotionEvent
import net.aspw.client.event.MoveEvent
import net.aspw.client.features.module.impl.movement.speeds.SpeedMode
import net.aspw.client.utils.MovementUtils.isMoving

class Sparky : SpeedMode("Sparky") {

override fun onJump(event: JumpEvent) {}

override fun onUpdate() {
if (isMoving()) {
if (mc.thePlayer.onGround) {
mc.gameSettings.keyBindJump.pressed = false
mc.thePlayer.jump()
} else {
if (mc.thePlayer.fallDistance > 0.7f && mc.thePlayer.fallDistance <= 0.8f) {
mc.thePlayer.setPositionAndUpdate(mc.thePlayer.posX, mc.thePlayer.posY - 0.16, mc.thePlayer.posZ)
mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.16, mc.thePlayer.posZ)
}
}
}
}

override fun onMotion() {}
override fun onMotion(event: MotionEvent) {}
override fun onMove(event: MoveEvent) {}
override fun onDisable() {}
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,59 @@
package net.aspw.client.features.module.impl.player

import net.aspw.client.event.*
import net.aspw.client.event.AttackEvent
import net.aspw.client.event.EventTarget
import net.aspw.client.event.PacketEvent
import net.aspw.client.event.Render2DEvent
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.item.ItemUtils
import net.minecraft.enchantment.Enchantment
import net.minecraft.item.ItemSword
import net.minecraft.network.play.client.C02PacketUseEntity
import net.minecraft.network.play.client.C09PacketHeldItemChange
import net.minecraft.util.BlockPos
import net.minecraft.util.MovingObjectPosition

@ModuleInfo(name = "AutoTool", spacedName = "Auto Tool", category = ModuleCategory.PLAYER)
class AutoTool : Module() {

private var attackEnemy = false
private var spoofedSlot = 0
var isBreaking = false
var lastSlot = 0

override fun onDisable() {
attackEnemy = false
spoofedSlot = 0
isBreaking = false
lastSlot = 0
}

@EventTarget
fun onClick(event: ClickBlockEvent) {
if (!mc.thePlayer.isUsingItem)
switchSlot(event.clickedBlock ?: return)
fun onRender2D(event: Render2DEvent) {
if (!mc.thePlayer.isUsingItem && mc.gameSettings.keyBindAttack.isKeyDown && mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
var bestSpeed = 1F
var bestSlot = -1

val block = mc.theWorld.getBlockState(mc.objectMouseOver.blockPos).block

for (i in 0..8) {
val item = mc.thePlayer.inventory.getStackInSlot(i) ?: continue
val speed = item.getStrVsBlock(block)

if (speed > bestSpeed) {
bestSpeed = speed
bestSlot = i
}
}

if (bestSlot != -1) {
if (mc.thePlayer.inventory.currentItem != bestSlot && !isBreaking)
lastSlot = mc.thePlayer.inventory.currentItem
isBreaking = true
mc.thePlayer.inventory.currentItem = bestSlot
}
} else if (isBreaking) {
mc.thePlayer.inventory.currentItem = lastSlot
isBreaking = false
}
}

@EventTarget
Expand Down Expand Up @@ -58,33 +86,4 @@ class AutoTool : Module() {
event.cancelEvent()
}
}

@EventTarget
fun onUpdate(event: UpdateEvent) {
if (spoofedSlot > 0) {
if (spoofedSlot == 1)
mc.netHandler.addToSendQueue(C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem))
spoofedSlot--
}
}

fun switchSlot(blockPos: BlockPos) {
var bestSpeed = 1F
var bestSlot = -1

val block = mc.theWorld.getBlockState(blockPos).block

for (i in 0..8) {
val item = mc.thePlayer.inventory.getStackInSlot(i) ?: continue
val speed = item.getStrVsBlock(block)

if (speed > bestSpeed) {
bestSpeed = speed
bestSlot = i
}
}

if (bestSlot != -1)
mc.thePlayer.inventory.currentItem = bestSlot
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ class Breaker : Module() {

when {
actionValue.get().equals("destroy", true) || surroundings -> {
val autoTool = Launch.moduleManager[AutoTool::class.java] as AutoTool
if (autoTool.state)
autoTool.switchSlot(currentPos!!)

if (instantValue.get()) {
mc.netHandler.addToSendQueue(
C07PacketPlayerDigging(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ class LegitScaffold : Module() {
return
}

mc.thePlayer.isSwingInProgress = false

val shouldEagle = mc.theWorld.getBlockState(
BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1.0, mc.thePlayer.posZ)
).block === Blocks.air
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.aspw.client.features.module.impl.player

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 Down Expand Up @@ -147,11 +146,6 @@ class Nuker : Module() {
currentBlock = blockPos
attackedBlocks.add(blockPos)

// Call auto tool
val autoTool = Launch.moduleManager.getModule(AutoTool::class.java) as AutoTool
if (autoTool.state)
autoTool.switchSlot(blockPos)

// Start block breaking
if (currentDamage == 0F) {
mc.netHandler.addToSendQueue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Scaffold : Module() {

// Timing
@JvmField
val sprintModeValue = ListValue("SprintMode", arrayOf("Same", "Silent", "Ground", "Air", "Off"), "Same")
val sprintModeValue = ListValue("SprintMode", arrayOf("Same", "Ground", "Air", "Off"), "Same")
private val placeConditionValue =
ListValue("Place-Condition", arrayOf("Air", "FallDown", "NegativeMotion", "Always"), "Always")

Expand Down Expand Up @@ -479,15 +479,13 @@ class Scaffold : Module() {
mc.thePlayer.motionZ = 0.0
place()
if (shouldEagle) {
mc.thePlayer.isSwingInProgress = false
KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode)
hypixelCount++
}
}
if (hypixelCount >= 3) {
if (mc.thePlayer.posY >= launchY + 0.2) {
isHypixeling = true
mc.thePlayer.isSwingInProgress = false
KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode)
hypixelCount++
}
Expand Down Expand Up @@ -546,14 +544,6 @@ class Scaffold : Module() {
}
}

// Sprint
if (sprintModeValue.get().equals("silent", ignoreCase = true)) {
if (packet is C0BPacketEntityAction &&
(packet.action == C0BPacketEntityAction.Action.STOP_SPRINTING || packet.action == C0BPacketEntityAction.Action.START_SPRINTING)
) event.cancelEvent()
}

// AutoBlock
if (packet is C09PacketHeldItemChange)
slot = packet.slotId
}
Expand Down Expand Up @@ -716,7 +706,6 @@ class Scaffold : Module() {
mc.thePlayer.inventory.currentItem = InventoryUtils.findAutoBlockBlock() - 36
mc.playerController.updateController()
}
mc.thePlayer.isSwingInProgress = false
if (startPlaceDelayValue.get() && faceBlock && !startPlaceTimer.hasTimePassed(startPlaceDelay.get())) {
if (!mc.thePlayer.onGround)
startPlaceTimer.tick = startPlaceDelay.get()
Expand Down Expand Up @@ -767,22 +756,6 @@ class Scaffold : Module() {
wdTick = 5
canTower = false
mc.gameSettings.keyBindSneak.pressed = GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)
if (sprintModeValue.get().equals("silent", ignoreCase = true)) {
if (mc.thePlayer.isSprinting) {
PacketUtils.sendPacketNoEvent(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SPRINTING
)
)
PacketUtils.sendPacketNoEvent(
C0BPacketEntityAction(
mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING
)
)
}
}
if (!GameSettings.isKeyDown(mc.gameSettings.keyBindRight)) mc.gameSettings.keyBindRight.pressed = false
if (!GameSettings.isKeyDown(mc.gameSettings.keyBindLeft)) mc.gameSettings.keyBindLeft.pressed = false
lockRotation = null
Expand Down
Loading

0 comments on commit 3e99adc

Please sign in to comment.