Skip to content

Commit

Permalink
Wtf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Jan 13, 2024
1 parent d2c1c2a commit 854ad72
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void onPacket(PacketEvent event) {
flagged = false;
}

if (ProtocolBase.getManager().getTargetVersion().isNewerThan(VersionEnum.r1_9_3tor1_9_4)) {
if (ProtocolBase.getManager().getTargetVersion().isNewerThanOrEqualTo(VersionEnum.r1_10)) {
if (packet instanceof C08PacketPlayerBlockPlacement) {
((C08PacketPlayerBlockPlacement) packet).facingX = 0.5F;
((C08PacketPlayerBlockPlacement) packet).facingY = 0.5F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,9 @@ class KillAura : Module() {
GL11.glBegin(GL11.GL_LINE_LOOP)

for (i in 0..360 step 60 - 14) { // You can change circle accuracy (60 - accuracy)
GL11.glColor3f(
0 / 255.0f,
255 / 255.0f,
255 / 255.0f
)
if (target!!.hurtTime == 0)
GL11.glColor3f(0 / 255.0f, 255 / 255.0f, 255 / 255.0f)
else GL11.glColor3f(255 / 255.0f, 0 / 255.0f, 255 / 255.0f)
GL11.glVertex2f(
cos(i * Math.PI / 180.0).toFloat() * 0.8f,
(sin(i * Math.PI / 180.0).toFloat() * 0.8f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ class Speed : Module() {
val motionYValue = FloatValue("MotionY", 0.42f, 0f, 2f) {
modeName.equals("watchdogcustom", ignoreCase = true)
}
val semiStrafeValue = BoolValue("SemiStrafe", true) {
modeName.equals("watchdogground", ignoreCase = true)
}

@JvmField
val speedValue = FloatValue("CustomSpeed", 1.0f, 0.2f, 2f) { typeValue.get().equals("custom", ignoreCase = true) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,21 @@ class WatchdogCustom : SpeedMode("WatchdogCustom") {
val thePlayer = mc.thePlayer ?: return

val speedModule = Client.moduleManager.getModule(Speed::class.java)!!
val scaffoldModule = Client.moduleManager.getModule(Scaffold::class.java)
val timer = Client.moduleManager.getModule(Timer::class.java)

if (isMoving()) {
when {
thePlayer.onGround && thePlayer.isCollidedVertically -> {
thePlayer.motionY = getJumpBoostModifier(
if (scaffoldModule!!.state) 0.41999 else speedModule.motionYValue.get().toDouble(), true
speedModule.motionYValue.get().toDouble(), true
)

if (scaffoldModule.state) {
strafe(0.37F)
} else {
strafe(
(max(
speedModule.customSpeedValue.get() + getSpeedEffect() * 0.1,
getBaseMoveSpeed(0.2873)
)).toFloat()
)
}
strafe(
(max(
speedModule.customSpeedValue.get() + getSpeedEffect() * 0.1,
getBaseMoveSpeed(0.2873)
)).toFloat()
)
}

else -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class WatchdogGround : SpeedMode("WatchdogGround") {
} else {
MovementUtils.strafe(0.46f)
}
} else if (mc.thePlayer.fallDistance > 0.1 && mc.thePlayer.hurtTime != 0) {
} else if (mc.thePlayer.fallDistance > 0.1 && mc.thePlayer.hurtTime != 0 && speed.semiStrafeValue.get()) {
if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
MovementUtils.strafe(0.175f)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Breaker : Module() {
private val rangeValue = FloatValue("Range", 5F, 1F, 7F, "m")
private val actionValue = ListValue("Action", arrayOf("Destroy", "Use"), "Destroy")
private val instantValue = BoolValue("Instant", false)
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Normal")
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Packet")
private val rotationsValue = BoolValue("Rotations", true)
private val movementFix = BoolValue("MovementFix", true) { rotationsValue.get() }
private val surroundingsValue = BoolValue("Surroundings", false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CivBreak : Module() {
private val delayValue = IntegerValue("Instant-Delay", 1, 1, 20) { modeValue.get().equals("instant", true) }
private val range = FloatValue("Range", 5F, 1F, 6F)
private val rotationsValue = BoolValue("Rotations", true)
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Normal")
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Packet")
private val airResetValue = BoolValue("Air-Reset", false)
private val rangeResetValue = BoolValue("Range-Reset", false)
private val redValue = IntegerValue("R", 255, 0, 255)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class Scaffold : Module() {
*/
// Global settings
private val allowTower = BoolValue("EnableTower", true)
private val towerMove = BoolValue("TowerMove", true) { allowTower.get() }
private val towerMove =
ListValue("TowerWhen", arrayOf("Always", "Moving", "Standing"), "Always") { allowTower.get() }
private val towerModeValue = ListValue(
"TowerMode", arrayOf(
"Jump",
Expand Down Expand Up @@ -146,7 +147,7 @@ class Scaffold : Module() {
.equals("aac", ignoreCase = true)
}
private val preRotationValue = ListValue("WaitRotationMode", arrayOf("Normal", "Lock", "None"), "Normal")
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Normal")
private val swingValue = ListValue("Swing", arrayOf("Normal", "Packet", "None"), "Packet")

// Delay
private val placeableDelay = BoolValue("PlaceableDelay", false)
Expand Down Expand Up @@ -200,7 +201,6 @@ class Scaffold : Module() {
private val customMoveSpeedValue = FloatValue("CustomMoveSpeed", 0.2f, 0f, 5f) { customSpeedValue.get() }
private val downValue = BoolValue("Down", true)
private val noHitCheckValue = BoolValue("NoHitCheck", false)
private val sameYValue = BoolValue("KeepY", false)
private val autoJumpValue = BoolValue("AutoJump", false)
private val smartSpeedValue = BoolValue("SpeedKeepY", true)
private val safeWalkValue = BoolValue("SafeWalk", false)
Expand Down Expand Up @@ -372,7 +372,9 @@ class Scaffold : Module() {
}
if (faceBlock)
place()
if (allowTower.get() && GameSettings.isKeyDown(mc.gameSettings.keyBindJump) && !GameSettings.isKeyDown(mc.gameSettings.keyBindSneak) && blocksAmount > 0 && MovementUtils.isRidingBlock() && (!MovementUtils.isMoving() && !towerMove.get() || towerMove.get())
if (allowTower.get() && GameSettings.isKeyDown(mc.gameSettings.keyBindJump) && !GameSettings.isKeyDown(mc.gameSettings.keyBindSneak) && blocksAmount > 0 && MovementUtils.isRidingBlock() && (towerMove.get()
.equals("always", true) || !MovementUtils.isMoving() && towerMove.get()
.equals("standing", true) || MovementUtils.isMoving() && towerMove.get().equals("moving", true))
) {
canTower = true
when (towerModeValue.get().lowercase(Locale.getDefault())) {
Expand Down Expand Up @@ -652,7 +654,7 @@ class Scaffold : Module() {
// Auto Jump thingy
if (shouldGoDown) {
launchY = mc.thePlayer.posY.toInt() - 1
} else if (!sameYValue.get()) {
} else {
if (!autoJumpValue.get() && !(smartSpeedValue.get() && Client.moduleManager.getModule(
Speed::class.java
)!!.state) || GameSettings.isKeyDown(mc.gameSettings.keyBindJump) || mc.thePlayer.posY < launchY
Expand Down Expand Up @@ -847,7 +849,7 @@ class Scaffold : Module() {
@EventTarget
fun onMotion(event: MotionEvent) {
if (blocksAmount <= 0) return
if (canTower && event.eventState == EventState.POST && !towerMove.get()) {
if (canTower && !MovementUtils.isMoving() && event.eventState == EventState.POST) {
mc.thePlayer.motionX = 0.0
mc.thePlayer.motionZ = 0.0
}
Expand Down Expand Up @@ -1076,7 +1078,7 @@ class Scaffold : Module() {
mc.thePlayer.posZ
) else BlockPos(
mc.thePlayer.posX, mc.thePlayer.posY - 0.6, mc.thePlayer.posZ
).down()) else if (!canTower && (sameYValue.get() || (autoJumpValue.get() || smartSpeedValue.get() && Client.moduleManager.getModule(
).down()) else if (!canTower && ((autoJumpValue.get() || smartSpeedValue.get() && Client.moduleManager.getModule(
Speed::class.java
)!!.state) && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) && launchY <= mc.thePlayer.posY
) BlockPos(
Expand Down Expand Up @@ -1117,7 +1119,7 @@ class Scaffold : Module() {
if (placeableDelay.get()) delayTimer.reset()
return
}
if (!canTower && (!delayTimer.hasTimePassed(delay) || (sameYValue.get() || (autoJumpValue.get() || smartSpeedValue.get() && Client.moduleManager.getModule(
if (!canTower && (!delayTimer.hasTimePassed(delay) || ((autoJumpValue.get() || smartSpeedValue.get() && Client.moduleManager.getModule(
Speed::class.java
)!!.state) && !GameSettings.isKeyDown(mc.gameSettings.keyBindJump)) && launchY - 1 != (targetPlace)!!.vec3.yCoord.toInt())
) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class Crosshair extends Module {
/**
* The Size val.
*/
public FloatValue sizeVal = new FloatValue("Size/Length", 9, 0.25F, 15);
public FloatValue sizeVal = new FloatValue("Size/Length", 8, 0.25F, 15);
/**
* The Gap val.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ import net.aspw.client.visual.client.clickgui.dropdown.ClickGui
import net.aspw.client.visual.client.clickgui.tab.NewUi
import net.aspw.client.visual.font.semi.Fonts
import net.aspw.client.visual.font.smooth.FontLoaders
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiChat
import net.minecraft.client.gui.inventory.GuiInventory
import net.minecraft.network.play.client.C14PacketTabComplete
import net.minecraft.network.play.server.S2EPacketCloseWindow
import net.minecraft.network.play.server.S3APacketTabComplete
import net.minecraft.network.play.server.S45PacketTitle
import java.awt.Color

@ModuleInfo(name = "Interface", description = "", category = ModuleCategory.VISUAL, array = false)
class Interface : Module() {
Expand Down Expand Up @@ -55,13 +53,12 @@ class Interface : Module() {
val inputString = clientNameValue.get()
val firstChar = inputString[0]
val restOfString = inputString.substring(1)
val showName =
if (Access.canConnect) "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS() else "$firstChar§d$restOfString" + " §b[" + Client.CLIENT_VERSION + "] | FPS: " + Minecraft.getDebugFPS()
val showName = "§l$firstChar§r§f$restOfString" + if (!Access.canConnect) " - Disconnected" else ""
FontLoaders.SF20.drawStringWithShadow(
showName,
2.0,
3.0,
Color(169, 0, 170).rgb
RenderUtils.skyRainbow(0, 0.5f, 1.0f).rgb
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package net.aspw.client.injection.forge.mixins.network;

import com.mojang.authlib.GameProfile;
import com.mojang.authlib.exceptions.AuthenticationException;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.viaversion.viaversion.api.connection.UserConnection;
import net.aspw.client.protocol.ProtocolBase;
import net.minecraft.client.network.NetHandlerLoginClient;
import net.minecraft.network.NetworkManager;
import net.raphimc.vialegacy.protocols.release.protocol1_7_2_5to1_6_4.storage.ProtocolMetadataStorage;
import net.raphimc.vialoader.util.VersionEnum;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import java.util.Objects;

@Mixin(NetHandlerLoginClient.class)
public class MixinNetHandlerLoginClient {

@Shadow
@Final
private NetworkManager networkManager;

@Redirect(method = "handleEncryptionRequest", at = @At(value = "INVOKE", target = "Lcom/mojang/authlib/minecraft/MinecraftSessionService;joinServer(Lcom/mojang/authlib/GameProfile;Ljava/lang/String;Ljava/lang/String;)V"), remap = false)
public void onlyJoinServerIfPremium(MinecraftSessionService instance, GameProfile profile, String authenticationToken, String serverId) throws AuthenticationException {
if (ProtocolBase.getManager().getPlatform().isSingleplayer().get()) return;
if (ProtocolBase.getManager().getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_6_4)) {
final UserConnection user = networkManager.channel().attr(ProtocolBase.LOCAL_VIA_USER).get();
if (user != null && user.has(ProtocolMetadataStorage.class) && !Objects.requireNonNull(user.get(ProtocolMetadataStorage.class)).authenticate) {
return;
}
}
instance.joinServer(profile, authenticationToken, serverId);
}
}
1 change: 1 addition & 0 deletions src/main/resources/client.forge.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"item.MixinNBTTagCompound",
"network.MixinBlockedServers",
"network.MixinGuiConnecting_1",
"network.MixinNetHandlerLoginClient",
"network.MixinNetHandlerPlayClient",
"network.MixinNetworkManager",
"network.MixinNetworkManager_5",
Expand Down

0 comments on commit 854ad72

Please sign in to comment.