Skip to content

Commit

Permalink
Merge pull request #1 from Wurst-Imperium/master
Browse files Browse the repository at this point in the history
Update branch
  • Loading branch information
bendy1234 authored Nov 5, 2022
2 parents 5abefde + f12612d commit 5f5f577
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ org.gradle.jvmargs=-Xmx1G
# check these at https://fabricmc.net/develop/ and
# https://www.curseforge.com/minecraft/mc-mods/fabric-api
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.18
loader_version=0.14.9
yarn_mappings=1.19.2+build.28
loader_version=0.14.10

#Fabric api
fabric_version=0.62.0+1.19.2
fabric_version=0.64.0+1.19.2

# Mod Properties
mod_version = v7.29-MC1.19.2
mod_version = v7.30-MC1.19.2
maven_group = net.wurstclient
archives_base_name = Wurst-Client

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/WurstClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum WurstClient
public static final MinecraftClient MC = MinecraftClient.getInstance();
public static final IMinecraftClient IMC = (IMinecraftClient)MC;

public static final String VERSION = "7.29";
public static final String VERSION = "7.30";
public static final String MC_VERSION = "1.19.2";

private WurstAnalytics analytics;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/wurstclient/hack/HackList.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@

public final class HackList implements UpdateListener
{
public final AirPlaceHack airPlaceHack = new AirPlaceHack();
public final AnchorAuraHack anchorAuraHack = new AnchorAuraHack();
public final AntiAfkHack antiAfkHack = new AntiAfkHack();
public final AntiBlindHack antiBlindHack = new AntiBlindHack();
public final AntiCactusHack antiCactusHack = new AntiCactusHack();
public final AntiHungerHack antiHungerHack = new AntiHungerHack();
public final AntiKnockbackHack antiKnockbackHack = new AntiKnockbackHack();
public final AntiSpamHack antiSpamHack = new AntiSpamHack();
public final AntiWaterPushHack antiWaterPushHack = new AntiWaterPushHack();
Expand Down Expand Up @@ -65,6 +67,8 @@ public final class HackList implements UpdateListener
public final BowAimbotHack bowAimbotHack = new BowAimbotHack();
public final BuildRandomHack buildRandomHack = new BuildRandomHack();
public final BunnyHopHack bunnyHopHack = new BunnyHopHack();
public final CameraDistanceHack cameraDistanceHack =
new CameraDistanceHack();
public final CameraNoClipHack cameraNoClipHack = new CameraNoClipHack();
public final CaveFinderHack caveFinderHack = new CaveFinderHack();
public final ChatTranslatorHack chatTranslatorHack =
Expand Down
55 changes: 55 additions & 0 deletions src/main/java/net/wurstclient/hacks/AirPlaceHack.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2014-2022 Wurst-Imperium and contributors.
*
* This source code is subject to the terms of the GNU General Public
* License, version 3. If a copy of the GPL was not distributed with this
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
*/
package net.wurstclient.hacks;

import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.events.RightClickListener;
import net.wurstclient.hack.Hack;
import net.wurstclient.settings.SliderSetting;
import net.wurstclient.settings.SliderSetting.ValueDisplay;

@SearchTags({"air place"})
public final class AirPlaceHack extends Hack implements RightClickListener
{
private final SliderSetting range =
new SliderSetting("Range", 5, 1, 6, 0.05, ValueDisplay.DECIMAL);

public AirPlaceHack()
{
super("AirPlace");
setCategory(Category.BLOCKS);
addSetting(range);
}

@Override
public void onEnable()
{
EVENTS.add(RightClickListener.class, this);
}

@Override
public void onDisable()
{
EVENTS.remove(RightClickListener.class, this);
}

@Override
public void onRightClick(RightClickEvent event)
{
HitResult hitResult = MC.player.raycast(range.getValue(), 0, false);
if(!(hitResult instanceof BlockHitResult blockHitResult))
return;

IMC.getInteractionManager().rightClickBlock(
blockHitResult.getBlockPos(), blockHitResult.getSide(),
blockHitResult.getPos());
}
}
72 changes: 72 additions & 0 deletions src/main/java/net/wurstclient/hacks/AntiHungerHack.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Copyright (c) 2014-2022 Wurst-Imperium and contributors.
*
* This source code is subject to the terms of the GNU General Public
* License, version 3. If a copy of the GPL was not distributed with this
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
*/
package net.wurstclient.hacks;

import net.minecraft.network.Packet;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.events.PacketOutputListener;
import net.wurstclient.hack.Hack;

@SearchTags({"anti hunger"})
public final class AntiHungerHack extends Hack implements PacketOutputListener
{
public AntiHungerHack()
{
super("AntiHunger");
setCategory(Category.MOVEMENT);
}

@Override
public void onEnable()
{
EVENTS.add(PacketOutputListener.class, this);
}

@Override
public void onDisable()
{
EVENTS.remove(PacketOutputListener.class, this);
}

@Override
public void onSentPacket(PacketOutputEvent event)
{
if(!(event.getPacket() instanceof PlayerMoveC2SPacket oldPacket))
return;

if(!MC.player.isOnGround() || MC.player.fallDistance > 0.5)
return;

if(MC.interactionManager.isBreakingBlock())
return;

double x = oldPacket.getX(-1);
double y = oldPacket.getY(-1);
double z = oldPacket.getZ(-1);
float yaw = oldPacket.getYaw(-1);
float pitch = oldPacket.getPitch(-1);

Packet<?> newPacket;
if(oldPacket.changesPosition())
if(oldPacket.changesLook())
newPacket =
new PlayerMoveC2SPacket.Full(x, y, z, yaw, pitch, false);
else
newPacket =
new PlayerMoveC2SPacket.PositionAndOnGround(x, y, z, false);
else if(oldPacket.changesLook())
newPacket =
new PlayerMoveC2SPacket.LookAndOnGround(yaw, pitch, false);
else
newPacket = new PlayerMoveC2SPacket.OnGroundOnly(false);

event.setPacket(newPacket);
}
}
35 changes: 35 additions & 0 deletions src/main/java/net/wurstclient/hacks/CameraDistanceHack.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2014-2022 Wurst-Imperium and contributors.
*
* This source code is subject to the terms of the GNU General Public
* License, version 3. If a copy of the GPL was not distributed with this
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
*/
package net.wurstclient.hacks;

import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.hack.Hack;
import net.wurstclient.settings.SliderSetting;
import net.wurstclient.settings.SliderSetting.ValueDisplay;

@SearchTags({"camera distance", "CamDistance", "cam distance"})
public final class CameraDistanceHack extends Hack
{
private final SliderSetting distance =
new SliderSetting("Distance", 12, -0.5, 150, 0.5, ValueDisplay.DECIMAL);

public CameraDistanceHack()
{
super("CameraDistance");
setCategory(Category.RENDER);
addSetting(distance);
}

public double getDistance()
{
return distance.getValueF();
}

// See CameraMixin.changeClipToSpaceDistance()
}
25 changes: 23 additions & 2 deletions src/main/java/net/wurstclient/hacks/KillauraHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.decoration.EndCrystalEntity;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.events.PostMotionListener;
Expand Down Expand Up @@ -74,6 +77,12 @@ public final class KillauraHack extends Hack
private final PauseAttackOnContainersSetting pauseOnContainers =
new PauseAttackOnContainersSetting(true);

private final CheckboxSetting checkLOS =
new CheckboxSetting("Check line of sight",
"Ensures that you don't reach through blocks when attacking.\n\n"
+ "Slower but can help with anti-cheat plugins.",
false);

private final EntityFilterList entityFilters =
EntityFilterList.genericCombat();

Expand All @@ -91,6 +100,7 @@ public KillauraHack()
addSetting(fov);
addSetting(damageIndicator);
addSetting(pauseOnContainers);
addSetting(checkLOS);

entityFilters.forEach(this::addSetting);
}
Expand Down Expand Up @@ -163,8 +173,19 @@ public void onUpdate()

WURST.getHax().autoSwordHack.setSlot();

WURST.getRotationFaker()
.faceVectorPacket(target.getBoundingBox().getCenter());
Vec3d eyesPos = RotationUtils.getEyesPos();
Vec3d hitVec = target.getBoundingBox().getCenter();
if(checkLOS.isChecked() && MC.world
.raycast(new RaycastContext(eyesPos, hitVec,
RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE, MC.player))
.getType() != HitResult.Type.MISS)
{
target = null;
return;
}

WURST.getRotationFaker().faceVectorPacket(hitVec);
}

@Override
Expand Down
24 changes: 18 additions & 6 deletions src/main/java/net/wurstclient/mixin/CameraMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,40 @@
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import net.minecraft.client.render.Camera;
import net.minecraft.client.render.CameraSubmersionType;
import net.wurstclient.WurstClient;
import net.wurstclient.hacks.CameraDistanceHack;

@Mixin(Camera.class)
public abstract class CameraMixin
{
@Inject(at = {@At("HEAD")},
method = {"clipToSpace(D)D"},
cancellable = true)
@ModifyVariable(at = @At("HEAD"),
method = "clipToSpace(D)D",
argsOnly = true)
private double changeClipToSpaceDistance(double desiredCameraDistance)
{
CameraDistanceHack cameraDistanceHack =
WurstClient.INSTANCE.getHax().cameraDistanceHack;
if(cameraDistanceHack.isEnabled())
return cameraDistanceHack.getDistance();

return desiredCameraDistance;
}

@Inject(at = @At("HEAD"), method = "clipToSpace(D)D", cancellable = true)
private void onClipToSpace(double desiredCameraDistance,
CallbackInfoReturnable<Double> cir)
{
if(WurstClient.INSTANCE.getHax().cameraNoClipHack.isEnabled())
cir.setReturnValue(desiredCameraDistance);
}

@Inject(at = {@At("HEAD")},
method = {
"getSubmersionType()Lnet/minecraft/client/render/CameraSubmersionType;"},
@Inject(at = @At("HEAD"),
method = "getSubmersionType()Lnet/minecraft/client/render/CameraSubmersionType;",
cancellable = true)
private void onGetSubmersionType(
CallbackInfoReturnable<CameraSubmersionType> cir)
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/wurst/lang/de_de.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"description.wurst.hack.airplace": "Ermöglicht dir, Blöcke in der Luft zu platzieren.",
"description.wurst.hack.anchoraura": "Platziert automatisch Seelenanker um dich herum, lädt diese mit Glowstone auf, und sprengt sie dann, um damit Mobs und Spieler um dich herum zu killen.",
"description.wurst.hack.antiafk": "Läuft zufällig durch die Gegend, um dich vor Anti-AFK Plugins zu verstecken.\nBenötigt mindestens 3x3 Blöcke freien Platz.",
"description.wurst.hack.antiblind": "Verhindert Blindheits- und Dunkelheitseffekte.\nNicht kompatibel mit OptiFine.",
"description.wurst.hack.anticactus": "Schützt dich vor Kakteen.",
"description.wurst.hack.antihunger": "Verlangsamt deinen Hunger während du läufst.",
"description.wurst.hack.antiknockback": "Verhindert dass du von Mobs und Spielern weggeschubst wirst.",
"description.wurst.hack.antispam": "Blockiert Chat-Spam, indem es wiederholte Nachrichten durch einen Zähler ersetzt.",
"description.wurst.hack.antiwaterpush": "Verhindert dass du von fließendem Wasser weggeschubst wirst.",
Expand Down Expand Up @@ -47,6 +49,7 @@
"description.wurst.hack.bowaimbot": "Zielt automatisch mit deinem Bogen oder deiner Armbrust.",
"description.wurst.hack.buildrandom": "Platziert zufällig Blöcke um dich herum.",
"description.wurst.hack.bunnyhop": "Lässt dich automatisch hüpfen.",
"description.wurst.hack.cameradistance": "Ermöglicht dir, den Kamera-Abstand in der 3rd-Person-Ansicht zu ändern.",
"description.wurst.hack.cameranoclip": "Ermöglicht der Kamera in der 3rd-Person-Ansicht, durch Wände zu gehen.",
"description.wurst.hack.cavefinder": "Markiert Höhlen in der ausgewählten Farbe, sodass du sie leichter finden kannst.",
"description.wurst.hack.chattranslator": "Übersetzt eingehende Chat-Nachrichten mit dem Google-Übersetzer.",
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/wurst/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"description.wurst.hack.airplace": "Allows you to place blocks in mid-air.",
"description.wurst.hack.anchoraura": "Automatically places (optional), charges, and detonates respawn anchors to kill entities around you.",
"description.wurst.hack.antiafk": "Walks around randomly to hide you from AFK detectors.\nNeeds at least 3x3 blocks of free space.",
"description.wurst.hack.antiblind": "Prevents blindness and darkness effects.\nIncompatible with OptiFine.",
"description.wurst.hack.anticactus": "Protects you from cactus damage.",
"description.wurst.hack.antihunger": "Slows down your hunger when you are walking.",
"description.wurst.hack.antiknockback": "Prevents you from getting pushed by players and mobs.",
"description.wurst.hack.antispam": "Blocks chat spam by adding a counter to repeated messages.",
"description.wurst.hack.antiwaterpush": "Prevents you from getting pushed by water.",
Expand Down Expand Up @@ -47,6 +49,7 @@
"description.wurst.hack.bowaimbot": "Automatically aims your bow or crossbow.",
"description.wurst.hack.buildrandom": "Randomly places blocks around you.",
"description.wurst.hack.bunnyhop": "Makes you jump automatically.",
"description.wurst.hack.cameradistance": "Allows you to change the camera distance in 3rd person.",
"description.wurst.hack.cameranoclip": "Allows the camera in 3rd person to go through walls.",
"description.wurst.hack.cavefinder": "Helps you to find caves by highlighting them in the selected color.",
"description.wurst.hack.chattranslator": "Translates incoming chat messages using Google Translate.",
Expand Down

0 comments on commit 5f5f577

Please sign in to comment.