Skip to content

Commit

Permalink
Ok BIG
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Jan 13, 2024
1 parent 1d7a9cf commit 6de3c1a
Show file tree
Hide file tree
Showing 31 changed files with 382 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import net.aspw.client.event.Listenable
import net.aspw.client.features.command.impl.ModuleCommand
import net.aspw.client.features.module.impl.combat.*
import net.aspw.client.features.module.impl.exploit.*
import net.aspw.client.features.module.impl.other.SnakeGame
import net.aspw.client.features.module.impl.movement.*
import net.aspw.client.features.module.impl.other.*
import net.aspw.client.features.module.impl.player.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class KillAura : Module() {
}

// Modes
val rotations = ListValue("RotationMode", arrayOf("Undetectable", "Standard", "Zero", "None"), "Undetectable")
val rotations = ListValue("RotationMode", arrayOf("Standard", "Zero", "None"), "Standard")

// Turn Speed
private val maxTurnSpeed: FloatValue =
Expand Down Expand Up @@ -148,11 +148,6 @@ class KillAura : Module() {

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) }
private val multiCombo = BoolValue("MultiCombo", false)
private val amountValue = IntegerValue("Multi-Packet", 5, 0, 20, "x") { multiCombo.get() }

Expand Down Expand Up @@ -322,9 +317,7 @@ class KillAura : Module() {
}

fun update() {
if (cancelRun || (noInventoryAttackValue.get() && (mc.currentScreen is GuiContainer ||
System.currentTimeMillis() - containerOpen < 200))
)
if (cancelRun)
return

// Update target
Expand Down Expand Up @@ -420,7 +413,7 @@ class KillAura : Module() {
}

private fun updateKA() {
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding) return
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding || noInventoryAttackValue.get() && mc.currentScreen is GuiContainer) return

if (cancelRun) {
target = null
Expand All @@ -430,16 +423,6 @@ class KillAura : Module() {
return
}

if (noInventoryAttackValue.get() && (mc.currentScreen is GuiContainer ||
System.currentTimeMillis() - containerOpen < 200)
) {
target = null
currentTarget = null
hitable = false
if (mc.currentScreen is GuiContainer) containerOpen = System.currentTimeMillis()
return
}

if (coolDownCheck.get() && CooldownHelper.getAttackCooldownProgress() < 1f) {
return
}
Expand Down Expand Up @@ -517,20 +500,10 @@ class KillAura : Module() {
return
}

if (noInventoryAttackValue.get() && (mc.currentScreen is GuiContainer ||
System.currentTimeMillis() - containerOpen < 200)
) {
target = null
currentTarget = null
hitable = false
if (mc.currentScreen is GuiContainer) containerOpen = System.currentTimeMillis()
return
}

target ?: return

if (espValue.get()) {
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding) return
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding || noInventoryAttackValue.get() && mc.currentScreen is GuiContainer) return
GL11.glPushMatrix()
GL11.glTranslated(
target!!.lastTickPosX + (target!!.posX - target!!.lastTickPosX) * mc.timer.renderPartialTicks - mc.renderManager.renderPosX,
Expand Down Expand Up @@ -859,7 +832,7 @@ class KillAura : Module() {
* Update killaura rotations to enemy
*/
private fun updateRotations(entity: Entity): Boolean {
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding) return false
if (clickOnly.get() && !mc.gameSettings.keyBindAttack.isKeyDown || mc.thePlayer.isRiding || noInventoryAttackValue.get() && mc.currentScreen is GuiContainer) return false
if (rotations.get().equals("none", true)) return true

val defRotation = getTargetRotation(entity) ?: return false
Expand All @@ -882,46 +855,27 @@ class KillAura : Module() {
private fun getTargetRotation(entity: Entity): Rotation? {
val boundingBox = entity.entityBoundingBox
if (rotations.get().equals("Standard", ignoreCase = true)) {
if (maxTurnSpeed.get() <= 0F)
return RotationUtils.serverRotation

val limitedRotation = RotationUtils.serverRotation?.let {
RotationUtils.limitAngleChange(
it,
RotationUtils.OtherRotation(
boundingBox,
RotationUtils.getCenter(entity.entityBoundingBox),
false,
mc.thePlayer!!.getDistanceToEntityBox(entity) < rangeValue.get(),
true,
maxRange
), (Math.random() * (maxTurnSpeed.get() - minTurnSpeed.get()) + minTurnSpeed.get()).toFloat()
)
}

return limitedRotation
}
if (rotations.get().equals("Undetectable", ignoreCase = true)) {
if (rotations.get().equals("Zero", ignoreCase = true)) {
if (maxTurnSpeed.get() <= 0F)
return RotationUtils.serverRotation

val (_, rotation) = RotationUtils.searchCenter(
boundingBox,
false,
true,
false,
if (!throughWallsValue.get()) mc.thePlayer!!.getDistanceToEntityBox(entity) < rangeValue.get() else false,
maxRange,
if (randomValue.get()) 0.5F else 0F,
false
) ?: return null

val limitedRotation = RotationUtils.serverRotation?.let {
RotationUtils.limitAngleChange(
it, rotation,
(Math.random() * (maxTurnSpeed.get() - minTurnSpeed.get()) + minTurnSpeed.get()).toFloat()
)
}

return limitedRotation
}
if (rotations.get().equals("Zero", ignoreCase = true)) {
return RotationUtils.calculate(getNearestPointBB(mc.thePlayer.getPositionEyes(1F), boundingBox))
}
return RotationUtils.serverRotation
Expand Down Expand Up @@ -1071,10 +1025,7 @@ class KillAura : Module() {
* Range
*/
private val maxRange: Float
get() = if (!noHitCheck.get()) max(
rangeValue.get(),
if (!throughWallsValue.get()) rangeValue.get() else 0.0f
) else max(rangeValue.get(), if (!throughWallsValue.get()) rangeValue.get() else 0.0f)
get() = max(rangeValue.get(), rangeValue.get())

/**
* HUD Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import net.aspw.client.value.ListValue
import net.aspw.client.visual.font.semi.Fonts
import net.aspw.client.visual.font.smooth.FontLoaders
import net.aspw.client.visual.hud.element.elements.Notification
import net.minecraft.client.gui.GuiGameOver
import net.minecraft.client.gui.ScaledResolution
import net.minecraft.entity.Entity
import net.minecraft.entity.item.EntityBoat
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.Client
import net.aspw.client.event.EventTarget
import net.aspw.client.event.PacketEvent
import net.aspw.client.event.Render3DEvent
Expand All @@ -19,7 +18,6 @@ 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 java.util.*
import java.util.concurrent.LinkedBlockingQueue

Expand Down
20 changes: 7 additions & 13 deletions src/main/java/net/aspw/client/features/module/impl/visual/Cape.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Cape : Module() {
"Mode",
arrayOf(
"None",
"NightXSmooth",
"NightX",
"Delta",
"Funny",
Expand Down Expand Up @@ -52,21 +53,12 @@ class Cape : Module() {
"Minecon2016",
"MojangDeveloper",
"Migrator",
"Vanilla"
"Vanilla",
"CherryBlossom"
),
"NightX"
"NightXSmooth"
) { customCape.get() }

val movingModeValue = ListValue(
"MovingMode",
arrayOf(
"Smooth",
"Vanilla"
),
"Smooth"
)


private val capeCache = hashMapOf<String, CapeStyle>()
fun getCapeLocation(value: String): ResourceLocation {
if (capeCache[value.uppercase(Locale.getDefault())] == null) {
Expand All @@ -82,6 +74,7 @@ class Cape : Module() {

enum class CapeStyle(val location: ResourceLocation) {
NONE(ResourceLocation("client/cape/none.png")),
NIGHTXSMOOTH(ResourceLocation("client/cape/nightxsmooth.png")),
NIGHTX(ResourceLocation("client/cape/animation/nightx/base.png")),
DELTA(ResourceLocation("client/cape/delta.png")),
FUNNY(ResourceLocation("client/cape/funny.png")),
Expand All @@ -108,7 +101,8 @@ class Cape : Module() {
MINECON2016(ResourceLocation("client/cape/2016.png")),
MOJANGDEVELOPER(ResourceLocation("client/cape/mojangdeveloper.png")),
MIGRATOR(ResourceLocation("client/cape/migrator.png")),
VANILLA(ResourceLocation("client/cape/vanilla.png"))
VANILLA(ResourceLocation("client/cape/vanilla.png")),
CHERRYBLOSSOM(ResourceLocation("client/cape/cherryblossom.png"))
}

override val tag: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ 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.protocol.ProtocolBase
import net.aspw.client.util.AnimationUtils
import net.aspw.client.util.network.Access
import net.aspw.client.util.render.RenderUtils
Expand Down Expand Up @@ -57,7 +56,7 @@ class Interface : Module() {
val firstChar = inputString[0]
val restOfString = inputString.substring(1)
val showName =
if (Access.canConnect) "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS() + " | version: " + ProtocolBase.getManager().targetVersion.getName() else "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS() + " | version: " + ProtocolBase.getManager().targetVersion.getName() + " | Disconnected"
if (Access.canConnect) "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS() else "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS()
FontLoaders.SF20.drawStringWithShadow(
showName,
2.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package net.aspw.client.features.module.impl.visual
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.value.FloatValue

@ModuleInfo(name = "ItemPhysics", spacedName = "Item Physics", description = "", category = ModuleCategory.VISUAL)
class ItemPhysics : Module()
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ import net.aspw.client.value.ListValue
array = false
)
class SilentView : Module() {
val rotationMode = ListValue("Mode", arrayOf("Normal", "Old"), "Normal")
val rotatingCheckValue = BoolValue("RotatingCheck", false)
val bodyLockValue = BoolValue("BodyLock", false)
private val rotationMode = ListValue("Mode", arrayOf("Fast", "Smooth"), "Fast")
private val bodyLockValue = BoolValue("BodyLock", false) { rotationMode.get().equals("smooth", true) }

var playerYaw: Float? = null
var pitchRotating = false
var bodyLocked = false
var oldRotating = false

companion object {
@JvmStatic
Expand All @@ -36,24 +38,44 @@ class SilentView : Module() {
}
}

override fun onDisable() {
playerYaw = null
pitchRotating = false
bodyLocked = false
oldRotating = false
headPitch = 0f
prevHeadPitch = 0f
}

@EventTarget
fun onMotion(event: MotionEvent) {
if (mc.thePlayer == null) return
if (RotationUtils.targetRotation == null && rotatingCheckValue.get() || !rotatingCheckValue.get()) {
when (rotationMode.get().lowercase()) {
"normal" -> {
prevHeadPitch = headPitch
headPitch = RotationUtils.serverRotation?.pitch!!
playerYaw = RotationUtils.serverRotation?.yaw!!
}

"old" -> {
if (mc.thePlayer.ticksExisted % 10 == 0) {
prevHeadPitch = headPitch
headPitch = RotationUtils.serverRotation?.pitch!!
playerYaw = RotationUtils.serverRotation?.yaw!!
}
}
if (mc.thePlayer == null || RotationUtils.targetRotation == null) {
playerYaw = null
pitchRotating = false
bodyLocked = false
oldRotating = false
headPitch = 0f
prevHeadPitch = 0f
return
}

when (rotationMode.get().lowercase()) {
"fast" -> {
prevHeadPitch = headPitch
headPitch = RotationUtils.serverRotation?.pitch!!
pitchRotating = true
oldRotating = true
mc.thePlayer.renderYawOffset = RotationUtils.serverRotation?.yaw!!
mc.thePlayer.rotationYawHead = RotationUtils.serverRotation?.yaw!!
}

"smooth" -> {
prevHeadPitch = headPitch
headPitch = RotationUtils.serverRotation?.pitch!!
pitchRotating = true
if (bodyLockValue.get())
bodyLocked = true
playerYaw = RotationUtils.serverRotation?.yaw!!
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.aspw.client.Client;
import net.aspw.client.event.BlockBBEvent;
import net.aspw.client.features.module.impl.combat.Criticals;
import net.aspw.client.features.module.impl.combat.KillAura;
import net.aspw.client.features.module.impl.exploit.NoMouseIntersect;
import net.aspw.client.features.module.impl.movement.NoFall;
import net.aspw.client.features.module.impl.visual.XRay;
Expand Down Expand Up @@ -120,9 +119,8 @@ private void shouldSideBeRendered(CallbackInfoReturnable<Boolean> callbackInfoRe
@Inject(method = "isCollidable", at = @At("HEAD"), cancellable = true)
private void isCollidable(CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
final NoMouseIntersect noMouseIntersect = Objects.requireNonNull(Client.moduleManager.getModule(NoMouseIntersect.class));
final KillAura killAura = Objects.requireNonNull(Client.moduleManager.getModule(KillAura.class));

if (noMouseIntersect.getState() && !(noMouseIntersect.getBlockValue().get() == Block.getIdFromBlock((Block) (Object) this)) || killAura.getState() && killAura.getTarget() != null)
if (noMouseIntersect.getState() && !(noMouseIntersect.getBlockValue().get() == Block.getIdFromBlock((Block) (Object) this)))
callbackInfoReturnable.setReturnValue(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.aspw.client.Client;
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.protocol.ProtocolBase;
import net.aspw.client.util.EntityUtils;
import net.aspw.client.util.MinecraftInstance;
Expand Down
Loading

0 comments on commit 6de3c1a

Please sign in to comment.