From 7c7e5586ecdc76c0d382a97f8658e3fcc727cfa3 Mon Sep 17 00:00:00 2001 From: Alexander01998 Date: Wed, 5 May 2021 21:16:10 +0200 Subject: [PATCH] Update to 21w18a --- gradle.properties | 8 +++--- .../java/net/wurstclient/RotationFaker.java | 25 +++++++++---------- .../java/net/wurstclient/WurstClient.java | 2 +- .../clickgui/components/RadarComponent.java | 5 ++-- .../net/wurstclient/hacks/AutoPotionHack.java | 13 +++++----- .../net/wurstclient/hacks/BowAimbotHack.java | 5 ++-- .../java/net/wurstclient/hacks/DerpHack.java | 2 +- .../wurstclient/hacks/ExtraElytraHack.java | 2 +- .../net/wurstclient/hacks/HeadRollHack.java | 4 +-- .../wurstclient/hacks/KillauraLegitHack.java | 4 +-- .../java/net/wurstclient/hacks/TiredHack.java | 2 +- .../wurstclient/hacks/TrajectoriesHack.java | 8 +++--- .../wurstclient/util/FakePlayerEntity.java | 4 +-- .../net/wurstclient/util/RotationUtils.java | 14 +++++------ 14 files changed, 47 insertions(+), 51 deletions(-) diff --git a/gradle.properties b/gradle.properties index ea8fa6e3..e52c5e41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,15 +4,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html and # https://www.curseforge.com/minecraft/mc-mods/fabric-api -minecraft_version=21w17a -yarn_mappings=21w17a+build.2 +minecraft_version=21w18a +yarn_mappings=21w18a+build.3 loader_version=0.11.3 #Fabric api -fabric_version=0.33.4+1.17 +fabric_version=0.34.2+1.17 # Mod Properties -mod_version = v7.15-MC21w17a +mod_version = v7.15-MC21w18a maven_group = net.wurstclient archives_base_name = Wurst-Client diff --git a/src/main/java/net/wurstclient/RotationFaker.java b/src/main/java/net/wurstclient/RotationFaker.java index e89aefe1..081760aa 100644 --- a/src/main/java/net/wurstclient/RotationFaker.java +++ b/src/main/java/net/wurstclient/RotationFaker.java @@ -29,10 +29,10 @@ public final class RotationFaker return; ClientPlayerEntity player = WurstClient.MC.player; - realYaw = player.method_36454(); - realPitch = player.method_36455(); - player.method_36456(serverYaw); - player.method_36457(serverPitch); + realYaw = player.getYaw(); + realPitch = player.getPitch(); + player.setYaw(serverYaw); + player.setPitch(serverPitch); } @Override @@ -42,8 +42,8 @@ public final class RotationFaker return; ClientPlayerEntity player = WurstClient.MC.player; - player.method_36456(realYaw); - player.method_36457(realPitch); + player.setYaw(realYaw); + player.setPitch(realPitch); fakeRotation = false; } @@ -62,8 +62,8 @@ public final class RotationFaker RotationUtils.Rotation rotations = RotationUtils.getNeededRotations(vec); - WurstClient.MC.player.method_36456(rotations.getYaw()); - WurstClient.MC.player.method_36457(rotations.getPitch()); + WurstClient.MC.player.setYaw(rotations.getYaw()); + WurstClient.MC.player.setPitch(rotations.getPitch()); } public void faceVectorClientIgnorePitch(Vec3d vec) @@ -71,18 +71,17 @@ public final class RotationFaker RotationUtils.Rotation rotations = RotationUtils.getNeededRotations(vec); - WurstClient.MC.player.method_36456(rotations.getYaw()); - WurstClient.MC.player.method_36457(0); + WurstClient.MC.player.setYaw(rotations.getYaw()); + WurstClient.MC.player.setPitch(0); } public float getServerYaw() { - return fakeRotation ? serverYaw : WurstClient.MC.player.method_36454(); + return fakeRotation ? serverYaw : WurstClient.MC.player.getYaw(); } public float getServerPitch() { - return fakeRotation ? serverPitch - : WurstClient.MC.player.method_36455(); + return fakeRotation ? serverPitch : WurstClient.MC.player.getPitch(); } } diff --git a/src/main/java/net/wurstclient/WurstClient.java b/src/main/java/net/wurstclient/WurstClient.java index 13bed25a..b6db5fcf 100644 --- a/src/main/java/net/wurstclient/WurstClient.java +++ b/src/main/java/net/wurstclient/WurstClient.java @@ -57,7 +57,7 @@ public enum WurstClient public static final IMinecraftClient IMC = (IMinecraftClient)MC; public static final String VERSION = "7.15"; - public static final String MC_VERSION = "21w17a"; + public static final String MC_VERSION = "21w18a"; private WurstAnalytics analytics; private EventManager eventManager; diff --git a/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java b/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java index f0d2600d..6806a076 100644 --- a/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java +++ b/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java @@ -91,7 +91,7 @@ public final class RadarComponent extends Component ClientPlayerEntity player = WurstClient.MC.player; if(!hack.isRotateEnabled()) - GL11.glRotated(180 + player.method_36454(), 0, 0, 1); + GL11.glRotated(180 + player.getYaw(), 0, 0, 1); float xa1 = 0; float xa2 = 2; @@ -147,8 +147,7 @@ public final class RadarComponent extends Component double neededRotation = Math.toDegrees(Math.atan2(diffZ, diffX)); double angle; if(hack.isRotateEnabled()) - angle = - Math.toRadians(player.method_36454() - neededRotation - 90); + angle = Math.toRadians(player.getYaw() - neededRotation - 90); else angle = Math.toRadians(180 - neededRotation - 90); double renderX = Math.sin(angle) * distance; diff --git a/src/main/java/net/wurstclient/hacks/AutoPotionHack.java b/src/main/java/net/wurstclient/hacks/AutoPotionHack.java index 929d94b8..3e63573c 100644 --- a/src/main/java/net/wurstclient/hacks/AutoPotionHack.java +++ b/src/main/java/net/wurstclient/hacks/AutoPotionHack.java @@ -80,17 +80,16 @@ public final class AutoPotionHack extends Hack implements UpdateListener // throw potion in hotbar MC.player.getInventory().selectedSlot = potionInHotbar; - MC.player.networkHandler - .sendPacket(new PlayerMoveC2SPacket.LookAndOnGround( - MC.player.method_36454(), 90, MC.player.isOnGround())); + MC.player.networkHandler.sendPacket( + new PlayerMoveC2SPacket.LookAndOnGround(MC.player.getYaw(), 90, + MC.player.isOnGround())); IMC.getInteractionManager().rightClickItem(); // reset slot and rotation MC.player.getInventory().selectedSlot = oldSlot; - MC.player.networkHandler - .sendPacket(new PlayerMoveC2SPacket.LookAndOnGround( - MC.player.method_36454(), MC.player.method_36455(), - MC.player.isOnGround())); + MC.player.networkHandler.sendPacket( + new PlayerMoveC2SPacket.LookAndOnGround(MC.player.getYaw(), + MC.player.getPitch(), MC.player.isOnGround())); // reset timer timer = 10; diff --git a/src/main/java/net/wurstclient/hacks/BowAimbotHack.java b/src/main/java/net/wurstclient/hacks/BowAimbotHack.java index 9f257417..42c50dcc 100644 --- a/src/main/java/net/wurstclient/hacks/BowAimbotHack.java +++ b/src/main/java/net/wurstclient/hacks/BowAimbotHack.java @@ -226,8 +226,7 @@ public final class BowAimbotHack extends Hack - player.getZ(); // set yaw - MC.player - .method_36456((float)Math.toDegrees(Math.atan2(posZ, posX)) - 90); + MC.player.setYaw((float)Math.toDegrees(Math.atan2(posZ, posX)) - 90); // calculate needed pitch double hDistance = Math.sqrt(posX * posX + posZ * posZ); @@ -244,7 +243,7 @@ public final class BowAimbotHack extends Hack WURST.getRotationFaker() .faceVectorClient(target.getBoundingBox().getCenter()); else - MC.player.method_36457(neededPitch); + MC.player.setPitch(neededPitch); } private Entity filterEntities(Stream s) diff --git a/src/main/java/net/wurstclient/hacks/DerpHack.java b/src/main/java/net/wurstclient/hacks/DerpHack.java index f8648f5f..7cfad33a 100644 --- a/src/main/java/net/wurstclient/hacks/DerpHack.java +++ b/src/main/java/net/wurstclient/hacks/DerpHack.java @@ -46,7 +46,7 @@ public final class DerpHack extends Hack implements UpdateListener @Override public void onUpdate() { - float yaw = MC.player.method_36454() + random.nextFloat() * 360F - 180F; + float yaw = MC.player.getYaw() + random.nextFloat() * 360F - 180F; float pitch = random.nextFloat() * 180F - 90F; MC.player.networkHandler diff --git a/src/main/java/net/wurstclient/hacks/ExtraElytraHack.java b/src/main/java/net/wurstclient/hacks/ExtraElytraHack.java index 5b4bcd9b..bcf3bbac 100644 --- a/src/main/java/net/wurstclient/hacks/ExtraElytraHack.java +++ b/src/main/java/net/wurstclient/hacks/ExtraElytraHack.java @@ -117,7 +117,7 @@ public final class ExtraElytraHack extends Hack implements UpdateListener if(!speedCtrl.isChecked()) return; - float yaw = (float)Math.toRadians(MC.player.method_36454()); + float yaw = (float)Math.toRadians(MC.player.getYaw()); Vec3d forward = new Vec3d(-MathHelper.sin(yaw) * 0.05, 0, MathHelper.cos(yaw) * 0.05); diff --git a/src/main/java/net/wurstclient/hacks/HeadRollHack.java b/src/main/java/net/wurstclient/hacks/HeadRollHack.java index 57244ffa..119156a1 100644 --- a/src/main/java/net/wurstclient/hacks/HeadRollHack.java +++ b/src/main/java/net/wurstclient/hacks/HeadRollHack.java @@ -47,7 +47,7 @@ public final class HeadRollHack extends Hack implements UpdateListener float pitch = MathHelper.sin(timer * (float)Math.PI) * 90F; MC.player.networkHandler.sendPacket( - new PlayerMoveC2SPacket.LookAndOnGround(MC.player.method_36454(), - pitch, MC.player.isOnGround())); + new PlayerMoveC2SPacket.LookAndOnGround(MC.player.getYaw(), pitch, + MC.player.isOnGround())); } } diff --git a/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java b/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java index 1e3e8fc8..55ce1012 100644 --- a/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java +++ b/src/main/java/net/wurstclient/hacks/KillauraLegitHack.java @@ -285,8 +285,8 @@ public final class KillauraLegitHack extends Hack float oldYaw = MC.player.prevYaw; float oldPitch = MC.player.prevPitch; - MC.player.method_36456(limitAngleChange(oldYaw, rotation.getYaw(), 30)); - MC.player.method_36457(rotation.getPitch()); + MC.player.setYaw(limitAngleChange(oldYaw, rotation.getYaw(), 30)); + MC.player.setPitch(rotation.getPitch()); return Math.abs(oldYaw - rotation.getYaw()) + Math.abs(oldPitch - rotation.getPitch()) < 1F; diff --git a/src/main/java/net/wurstclient/hacks/TiredHack.java b/src/main/java/net/wurstclient/hacks/TiredHack.java index b3603699..4b42f6db 100644 --- a/src/main/java/net/wurstclient/hacks/TiredHack.java +++ b/src/main/java/net/wurstclient/hacks/TiredHack.java @@ -41,7 +41,7 @@ public final class TiredHack extends Hack implements UpdateListener public void onUpdate() { MC.player.networkHandler.sendPacket( - new PlayerMoveC2SPacket.LookAndOnGround(MC.player.method_36454(), + new PlayerMoveC2SPacket.LookAndOnGround(MC.player.getYaw(), MC.player.age % 100, MC.player.isOnGround())); } } diff --git a/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java b/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java index 1e738736..deeeade2 100644 --- a/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java +++ b/src/main/java/net/wurstclient/hacks/TrajectoriesHack.java @@ -145,7 +145,7 @@ public final class TrajectoriesHack extends Hack implements RenderListener // calculate starting position double arrowPosX = player.lastRenderX + (player.getX() - player.lastRenderX) * partialTicks - - Math.cos(Math.toRadians(player.method_36454())) * 0.16; + - Math.cos(Math.toRadians(player.getYaw())) * 0.16; double arrowPosY = player.lastRenderY + (player.getY() - player.lastRenderY) * partialTicks @@ -153,13 +153,13 @@ public final class TrajectoriesHack extends Hack implements RenderListener double arrowPosZ = player.lastRenderZ + (player.getZ() - player.lastRenderZ) * partialTicks - - Math.sin(Math.toRadians(player.method_36454())) * 0.16; + - Math.sin(Math.toRadians(player.getYaw())) * 0.16; // Motion factor. Arrows go faster than snowballs and all that... double arrowMotionFactor = item instanceof RangedWeaponItem ? 1.0 : 0.4; - double yaw = Math.toRadians(player.method_36454()); - double pitch = Math.toRadians(player.method_36455()); + double yaw = Math.toRadians(player.getYaw()); + double pitch = Math.toRadians(player.getPitch()); // calculate starting motion double arrowMotionX = diff --git a/src/main/java/net/wurstclient/util/FakePlayerEntity.java b/src/main/java/net/wurstclient/util/FakePlayerEntity.java index 0e592580..d5e115ef 100644 --- a/src/main/java/net/wurstclient/util/FakePlayerEntity.java +++ b/src/main/java/net/wurstclient/util/FakePlayerEntity.java @@ -71,7 +71,7 @@ public class FakePlayerEntity extends OtherClientPlayerEntity public void resetPlayerPosition() { - player.refreshPositionAndAngles(getX(), getY(), getZ(), method_36454(), - method_36455()); + player.refreshPositionAndAngles(getX(), getY(), getZ(), getYaw(), + getPitch()); } } diff --git a/src/main/java/net/wurstclient/util/RotationUtils.java b/src/main/java/net/wurstclient/util/RotationUtils.java index bb841016..954ccc9c 100644 --- a/src/main/java/net/wurstclient/util/RotationUtils.java +++ b/src/main/java/net/wurstclient/util/RotationUtils.java @@ -33,10 +33,10 @@ public enum RotationUtils float f = 0.017453292F; float pi = (float)Math.PI; - float f1 = MathHelper.cos(-player.method_36454() * f - pi); - float f2 = MathHelper.sin(-player.method_36454() * f - pi); - float f3 = -MathHelper.cos(-player.method_36455() * f); - float f4 = MathHelper.sin(-player.method_36455() * f); + float f1 = MathHelper.cos(-player.getYaw() * f - pi); + float f2 = MathHelper.sin(-player.getYaw() * f - pi); + float f3 = -MathHelper.cos(-player.getPitch() * f); + float f4 = MathHelper.sin(-player.getPitch() * f); return new Vec3d(f2 * f3, f4, f1 * f3); } @@ -75,8 +75,8 @@ public enum RotationUtils Rotation needed = getNeededRotations(vec); ClientPlayerEntity player = WurstClient.MC.player; - float currentYaw = MathHelper.wrapDegrees(player.method_36454()); - float currentPitch = MathHelper.wrapDegrees(player.method_36455()); + float currentYaw = MathHelper.wrapDegrees(player.getYaw()); + float currentPitch = MathHelper.wrapDegrees(player.getPitch()); float diffYaw = currentYaw - needed.yaw; float diffPitch = currentPitch - needed.pitch; @@ -101,7 +101,7 @@ public enum RotationUtils public static float getHorizontalAngleToLookVec(Vec3d vec) { Rotation needed = getNeededRotations(vec); - return MathHelper.wrapDegrees(WurstClient.MC.player.method_36454()) + return MathHelper.wrapDegrees(WurstClient.MC.player.getYaw()) - needed.yaw; }