Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Oct 6, 2023
1 parent d3b7e68 commit 2a22232
Show file tree
Hide file tree
Showing 52 changed files with 510 additions and 524 deletions.
68 changes: 57 additions & 11 deletions NightX.iws

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions src/main/java/net/aspw/client/features/api/ColorElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
*/
public class ColorElement extends IntegerValue {

/**
* Instantiates a new Color element.
*
* @param counter the counter
* @param m the m
* @param basis the basis
*/
public ColorElement(int counter, Material m, IntegerValue basis) {
super("Color" + counter + "-" + m.getColorName(), 255, 0, 255, () -> (basis.get() >= counter));
}

/**
* Instantiates a new Color element.
*
Expand Down
37 changes: 3 additions & 34 deletions src/main/java/net/aspw/client/features/api/CombatManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import net.minecraft.entity.player.EntityPlayer
class CombatManager : Listenable, MinecraftInstance() {
private val lastAttackTimer = MSTimer()

var inCombat = false
private set
private var inCombat = false
var target: EntityLivingBase? = null
private set
val attackedEntityList = mutableListOf<EntityLivingBase>()
val focusedPlayerList = mutableListOf<EntityPlayer>()
private val attackedEntityList = mutableListOf<EntityLivingBase>()
private val focusedPlayerList = mutableListOf<EntityPlayer>()

@EventTarget
fun onUpdate(event: UpdateEvent) {
Expand Down Expand Up @@ -69,35 +68,5 @@ class CombatManager : Listenable, MinecraftInstance() {
focusedPlayerList.clear()
}

// @EventTarget
// fun onPacket(event: PacketEvent) {
// val packet = event.packet
// if(packet is S02PacketChat) {
// val raw = packet.chatComponent.unformattedText
// val found = hackerWords.filter { raw.contains(it, true) }
// if(raw.contains(mc.session.username, true) && found.isNotEmpty()) {
// LiquidBounce.hud.addNotification(Notification("Someone call you a hacker!", found.joinToString(", "), NotifyType.ERROR))
// }
// }
// }

fun getNearByEntity(radius: Float): EntityLivingBase? {
return try {
mc.theWorld.loadedEntityList
.filter { mc.thePlayer.getDistanceToEntity(it) < radius && EntityUtils.isSelected(it, true) }
.sortedBy { it.getDistanceToEntity(mc.thePlayer) }[0] as EntityLivingBase?
} catch (e: Exception) {
null
}
}

fun isFocusEntity(entity: EntityPlayer): Boolean {
if (focusedPlayerList.isEmpty()) {
return true // no need 2 focus
}

return focusedPlayerList.contains(entity)
}

override fun handleEvents() = true
}
9 changes: 4 additions & 5 deletions src/main/java/net/aspw/client/features/api/PacketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ public void onMotion(MotionEvent event) {
swing = Math.max(0, swing - 1);
}
}
for (Object en : mc.theWorld.loadedEntityList) {
Entity entity = (Entity) en;
if (shouldStopRender(entity)) {
entity.renderDistanceWeight = 0.0;
for (Entity en : mc.theWorld.loadedEntityList) {
if (shouldStopRender(en)) {
en.renderDistanceWeight = 0.0;
} else {
entity.renderDistanceWeight = 1.0;
en.renderDistanceWeight = 1.0;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class AntiStaff : Module() {

override fun onInitialize() {
thread {
totalCount = obStaffs.filter { it.isWhitespace() }.count()
println("[Staff/fallback] ${obStaffs}")
totalCount = obStaffs.count { it.isWhitespace() }
println("[Staff/fallback] $obStaffs")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ class AntiVelocity : Module() {
0F,
-1F,
1F,
"%",
{ modeValue.get().equals("aac", ignoreCase = true) || modeValue.get().equals("simple", ignoreCase = true) })
"%"
) { modeValue.get().equals("aac", ignoreCase = true) || modeValue.get().equals("simple", ignoreCase = true) }
private val verticalValue = FloatValue(
"Vertical",
0F,
-1F,
1F,
"%",
{ modeValue.get().equals("aac", ignoreCase = true) || modeValue.get().equals("simple", ignoreCase = true) })
"%"
) { modeValue.get().equals("aac", ignoreCase = true) || modeValue.get().equals("simple", ignoreCase = true) }
private val horizontalExplosionValue = FloatValue("HorizontalExplosion", 0F, 0F, 1F, "%")
private val verticalExplosionValue = FloatValue("VerticalExplosion", 0F, 0F, 1F, "%")
private val modeValue = ListValue(
Expand Down Expand Up @@ -80,33 +80,33 @@ class AntiVelocity : Module() {
)

private val aac5KillAuraValue =
BoolValue("AAC5.2.0-Attack-Only", true, { modeValue.get().equals("aac5.2.0", true) })
BoolValue("AAC5.2.0-Attack-Only", true) { modeValue.get().equals("aac5.2.0", true) }

// Affect chance
private val reduceChance = FloatValue("Chance", 100F, 0F, 100F, "%")
private var shouldAffect: Boolean = true

// Reverse
private val reverseStrengthValue =
FloatValue("ReverseStrength", 1F, 0.1F, 1F, "x", { modeValue.get().equals("reverse", true) })
FloatValue("ReverseStrength", 1F, 0.1F, 1F, "x") { modeValue.get().equals("reverse", true) }
private val reverse2StrengthValue =
FloatValue("SmoothReverseStrength", 0.05F, 0.02F, 0.1F, "x", { modeValue.get().equals("smoothreverse", true) })
FloatValue("SmoothReverseStrength", 0.05F, 0.02F, 0.1F, "x") { modeValue.get().equals("smoothreverse", true) }

// AAC Push
private val aacPushXZReducerValue =
FloatValue("AACPushXZReducer", 2F, 1F, 3F, "x", { modeValue.get().equals("aacpush", true) })
private val aacPushYReducerValue = BoolValue("AACPushYReducer", true, { modeValue.get().equals("aacpush", true) })
FloatValue("AACPushXZReducer", 2F, 1F, 3F, "x") { modeValue.get().equals("aacpush", true) }
private val aacPushYReducerValue = BoolValue("AACPushYReducer", true) { modeValue.get().equals("aacpush", true) }

// legit
private val legitStrafeValue = BoolValue("LegitStrafe", false, { modeValue.get().equals("legit", true) })
private val legitFaceValue = BoolValue("LegitFace", true, { modeValue.get().equals("legit", true) })
private val legitStrafeValue = BoolValue("LegitStrafe", false) { modeValue.get().equals("legit", true) }
private val legitFaceValue = BoolValue("LegitFace", true) { modeValue.get().equals("legit", true) }

//add strafe in aac
private val aacStrafeValue = BoolValue("AACStrafeValue", false, { modeValue.get().equals("aac", true) })
// add strafe in aac
private val aacStrafeValue = BoolValue("AACStrafeValue", false) { modeValue.get().equals("aac", true) }

//epic
// epic
private val phaseOffsetValue =
FloatValue("Phase-Offset", 0.05F, -10F, 10F, "m", { modeValue.get().equals("phase", true) })
FloatValue("Phase-Offset", 0.05F, -10F, 10F, "m") { modeValue.get().equals("phase", true) }

/**
* VALUES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement
import net.minecraft.network.play.client.C09PacketHeldItemChange
import net.minecraft.network.play.client.C0DPacketCloseWindow
import net.minecraft.network.play.client.C16PacketClientStatus
import java.util.function.Function
import java.util.stream.Collectors
import java.util.stream.IntStream

Expand Down Expand Up @@ -56,8 +55,7 @@ class AutoArmor : Module() {
}
.mapToObj { i: Int -> ArmorPiece(mc.thePlayer.inventory.getStackInSlot(i), i) }
.collect(
Collectors.groupingBy(
Function { obj: ArmorPiece? -> obj!!.armorType })
Collectors.groupingBy { obj: ArmorPiece? -> obj!!.armorType }
)
val bestArmor = arrayOfNulls<ArmorPiece>(4)
for ((key, value) in armorPieces) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ import net.minecraft.util.EnumFacing
class AutoHeal : Module() {
// Auto Pot
private val autoPotValue = BoolValue("AutoPot", true)
private val healthValue = FloatValue("Health-Pot", 15F, 0F, 100F, "%", { autoPotValue.get() })
private val delayValue = IntegerValue("Delay-Pot", 300, 0, 5000, "ms", { autoPotValue.get() })
private val regenValue = BoolValue("Heal-Pot", true, { autoPotValue.get() })
private val utilityValue = BoolValue("Utility-Pot", true, { autoPotValue.get() })
private val smartValue = BoolValue("Smart-Pot", true, { autoPotValue.get() })
private val healthValue = FloatValue("Health-Pot", 15F, 0F, 100F, "%") { autoPotValue.get() }
private val delayValue = IntegerValue("Delay-Pot", 300, 0, 5000, "ms") { autoPotValue.get() }
private val regenValue = BoolValue("Heal-Pot", true) { autoPotValue.get() }
private val utilityValue = BoolValue("Utility-Pot", true) { autoPotValue.get() }
private val smartValue = BoolValue("Smart-Pot", true) { autoPotValue.get() }
private val smartTimeoutValue =
IntegerValue("SmartTimeout-Pot", 500, 500, 5000, "ms", { smartValue.get() && autoPotValue.get() })
private val spoofInvValue = BoolValue("InvSpoof-Pot", false, { autoPotValue.get() })
IntegerValue("SmartTimeout-Pot", 500, 500, 5000, "ms") { smartValue.get() && autoPotValue.get() }
private val spoofInvValue = BoolValue("InvSpoof-Pot", false) { autoPotValue.get() }
private val spoofDelayValue =
IntegerValue("InvDelay-Pot", 500, 500, 5000, "ms", { spoofInvValue.get() && autoPotValue.get() })
private val noCombatValue = BoolValue("NoCombat-Pot", true, { autoPotValue.get() })
private val customPitchValue = BoolValue("Custom-Pitch-Pot", false, { autoPotValue.get() })
IntegerValue("InvDelay-Pot", 500, 500, 5000, "ms") { spoofInvValue.get() && autoPotValue.get() }
private val noCombatValue = BoolValue("NoCombat-Pot", true) { autoPotValue.get() }
private val customPitchValue = BoolValue("Custom-Pitch-Pot", false) { autoPotValue.get() }
private val customPitchAngle =
FloatValue("Angle-Pot", 90F, -90F, 90F, "°", { customPitchValue.get() && autoPotValue.get() })
private val debugValue = BoolValue("Debug-Pot", false, { autoPotValue.get() })
FloatValue("Angle-Pot", 90F, -90F, 90F, "°") { customPitchValue.get() && autoPotValue.get() }
private val debugValue = BoolValue("Debug-Pot", false) { autoPotValue.get() }

// Auto Soup
private val autoSoupValue = BoolValue("AutoSoup", false)
private val healthValueA = FloatValue("Health-Soup", 15f, 0f, 20f, { autoSoupValue.get() })
private val delayValueA = IntegerValue("Delay-Soup", 150, 0, 500, "ms", { autoSoupValue.get() })
private val openInventoryValue = BoolValue("OpenInv-Soup", false, { autoSoupValue.get() })
private val simulateInventoryValue = BoolValue("SimulateInventory-Soup", true, { autoSoupValue.get() })
private val bowlValue = ListValue("Bowl-Soup", arrayOf("Drop", "Move", "Stay"), "Drop", { autoSoupValue.get() })

var isRotating = false
var throwing = false
private val healthValueA = FloatValue("Health-Soup", 15f, 0f, 20f) { autoSoupValue.get() }
private val delayValueA = IntegerValue("Delay-Soup", 150, 0, 500, "ms") { autoSoupValue.get() }
private val openInventoryValue = BoolValue("OpenInv-Soup", false) { autoSoupValue.get() }
private val simulateInventoryValue = BoolValue("SimulateInventory-Soup", true) { autoSoupValue.get() }
private val bowlValue = ListValue("Bowl-Soup", arrayOf("Drop", "Move", "Stay"), "Drop") { autoSoupValue.get() }

private var isRotating = false
private var throwing = false
private var rotated = false
private var prevSlot = -1
private var potIndex = -1
Expand Down Expand Up @@ -106,7 +106,7 @@ class AutoHeal : Module() {
fun onMotion(event: MotionEvent) {
if (autoPotValue.get()) {
if (event.eventState == EventState.PRE) {
if (smartValue.get() && !throwQueue.isEmpty()) {
if (smartValue.get() && throwQueue.isNotEmpty()) {
var foundPot = false
for (k in throwQueue.indices.reversed()) {
if (mc.thePlayer.isPotionActive(throwQueue[k])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Criticals : Module() {
private val hurtTimeValue = IntegerValue("HurtTime", 10, 0, 10)
private val onlyAuraValue = BoolValue("OnlyAura", false)

val msTimer = MSTimer()
private val msTimer = MSTimer()
private var readyCrits = false
private var canCrits = true
private var counter = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,26 @@ class KillAura : Module() {
"Angle-Tick",
1,
1,
100,
{ !rotations.get().equals("none", true) })
100
) { !rotations.get().equals("none", true) }

private val animationValue = BoolValue("Animation", false)
private val noInventoryAttackValue = BoolValue("NoInvAttack", false)
private val checkSprintValue = BoolValue("StopSprint", false)
private val throughWallsValue = BoolValue(
"No-Walls",
false,
{ rotations.get().equals("undetectable", true) })
private val randomValue = BoolValue("Random", true, { rotations.get().equals("undetectable", true) })
val movementFix = BoolValue("MovementFix", false, { !rotations.get().equals("none", true) })
private val silentMovementFix = BoolValue("SilentMovementFix", false, { !rotations.get().equals("none", true) })
false
) { rotations.get().equals("undetectable", true) }
private val randomValue = BoolValue("Random", true) { rotations.get().equals("undetectable", true) }
val movementFix = BoolValue("MovementFix", false) { !rotations.get().equals("none", true) }
private val silentMovementFix = BoolValue("SilentMovementFix", false) { !rotations.get().equals("none", true) }
private val multiCombo = BoolValue("MultiCombo", false)
private val amountValue = IntegerValue("Multi-Packet", 5, 0, 20, "x", { multiCombo.get() })
private val amountValue = IntegerValue("Multi-Packet", 5, 0, 20, "x") { multiCombo.get() }

private val noHitCheck = BoolValue(
"NoHitCheck",
false,
{ !rotations.get().equals("none", true) })
false
) { !rotations.get().equals("none", true) }

private val priorityValue = ListValue(
"Priority",
Expand All @@ -164,8 +164,8 @@ class KillAura : Module() {
// Bypasses
private val swingValue = ListValue("Swing", arrayOf("Full", "Smart", "Packet", "None"), "Full")
private val particleValue = ListValue("Particle", arrayOf("Hit", "EveryHit", "Always", "None"), "Hit")
private val sharpnessValue = BoolValue("Sharpness", true, { !particleValue.get().equals("none", true) })
private val criticalsValue = BoolValue("Criticals", true, { !particleValue.get().equals("none", true) })
private val sharpnessValue = BoolValue("Sharpness", true) { !particleValue.get().equals("none", true) }
private val criticalsValue = BoolValue("Criticals", true) { !particleValue.get().equals("none", true) }

// AutoBlock
val autoBlockModeValue =
Expand Down Expand Up @@ -196,15 +196,15 @@ class KillAura : Module() {
) { !autoBlockModeValue.get().equals("Fake", true) && !autoBlockModeValue.get().equals("None", true) }

// Bypass
val silentRotationValue = BoolValue("SilentRotation", true, { !rotations.get().equals("none", true) })
val silentRotationValue = BoolValue("SilentRotation", true) { !rotations.get().equals("none", true) }
private val toggleFreeLook =
BoolValue("ToggleFreeLook", false, { !rotations.get().equals("none", true) && !silentRotationValue.get() })
BoolValue("ToggleFreeLook", false) { !rotations.get().equals("none", true) && !silentRotationValue.get() }

private val fovValue = FloatValue("FOV", 180f, 0f, 180f)

private val failRateValue = FloatValue("FailRate", 0f, 0f, 100f)
private val limitedMultiTargetsValue =
IntegerValue("LimitedMultiTargets", 6, 1, 20, { targetModeValue.get().equals("multi", true) })
IntegerValue("LimitedMultiTargets", 6, 1, 20) { targetModeValue.get().equals("multi", true) }

// Visuals
private val espValue = BoolValue("Round-ESP", true)
Expand All @@ -218,8 +218,8 @@ class KillAura : Module() {

// Target
var target: EntityLivingBase? = null
var currentTarget: EntityLivingBase? = null
var hitable = false
private var currentTarget: EntityLivingBase? = null
private var hitable = false
private val prevTargetEntities = mutableListOf<Int>()

private var markEntity: EntityLivingBase? = null
Expand All @@ -236,7 +236,7 @@ class KillAura : Module() {

// Fake block status
var blockingStatus = false
var verusBlocking = false
private var verusBlocking = false
var fakeBlock = false

/**
Expand Down Expand Up @@ -490,8 +490,8 @@ class KillAura : Module() {

for (i in 0..360 step 60 - 40) { // You can change circle accuracy (60 - accuracy)
GL11.glVertex2f(
Math.cos(i * Math.PI / 180.0).toFloat() * rangeValue.get() - 0.5f,
(Math.sin(i * Math.PI / 180.0).toFloat() * rangeValue.get() - 0.5f)
cos(i * Math.PI / 180.0).toFloat() * rangeValue.get() - 0.5f,
(sin(i * Math.PI / 180.0).toFloat() * rangeValue.get() - 0.5f)
)
}

Expand Down Expand Up @@ -576,8 +576,8 @@ class KillAura : Module() {

for (i in 0..360 step 60 - 20) { // You can change circle accuracy (60 - accuracy)
GL11.glVertex2f(
Math.cos(i * Math.PI / 180.0).toFloat() * 0.8f,
(Math.sin(i * Math.PI / 180.0).toFloat() * 0.8f)
cos(i * Math.PI / 180.0).toFloat() * 0.8f,
(sin(i * Math.PI / 180.0).toFloat() * 0.8f)
)
}

Expand All @@ -593,8 +593,8 @@ class KillAura : Module() {
0 / 255.0f
)
GL11.glVertex2f(
Math.cos(i * Math.PI / 180.0).toFloat() * 0.8f,
(Math.sin(i * Math.PI / 180.0).toFloat() * 0.8f)
cos(i * Math.PI / 180.0).toFloat() * 0.8f,
(sin(i * Math.PI / 180.0).toFloat() * 0.8f)
)
}

Expand Down Expand Up @@ -694,7 +694,6 @@ class KillAura : Module() {
*/
private fun updateTarget() {
// Reset fixed target to null
var searchTarget = null

// Settings
val hurtTime = 10
Expand Down Expand Up @@ -755,12 +754,7 @@ class KillAura : Module() {
if (found)
return

if (searchTarget != null) {
if (target != searchTarget) target = searchTarget
return
} else {
target = null
}
target = null

// Cleanup last targets when no target found and try again
if (prevTargetEntities.isNotEmpty()) {
Expand Down
Loading

0 comments on commit 2a22232

Please sign in to comment.