Skip to content

Commit b2ba51f

Browse files
author
Kenzo101 Studios
committed
RELEASE!
1 parent ac8c30c commit b2ba51f

32 files changed

Lines changed: 282 additions & 254 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.wurstclient_v7.feature;
2+
3+
public final class ElytraMace {
4+
private static boolean enabled = false;
5+
6+
public static boolean isEnabled() { return enabled; }
7+
8+
public static void toggle() {
9+
enabled = !enabled;
10+
System.out.println("ElytraMace: " + (enabled ? "ON" : "OFF"));
11+
}
12+
}

common/src/main/java/com/wurstclient_v7/feature/MobVision.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

common/src/main/java/com/wurstclient_v7/gui/ModuleScreen.java

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import com.wurstclient_v7.feature.FullBright;
99
import com.wurstclient_v7.feature.Jetpack;
1010
import com.wurstclient_v7.feature.KillAura;
11-
import com.wurstclient_v7.feature.MobVision;
1211
import com.wurstclient_v7.feature.NoFall;
1312
import com.wurstclient_v7.feature.Nuker;
1413
import com.wurstclient_v7.feature.SpeedHack;
@@ -61,8 +60,6 @@ public void render(GuiGraphics gfx, int mouseX, int mouseY, float partialTick) {
6160
String shBinding = (this.listeningAction != null && this.listeningAction.equals("speedhack_toggle")) ? "Press any key..." : KeybindManager.getLabel("speedhack_toggle");
6261
gfx.drawString(this.font, shBinding, x + 120 - 8 - this.font.width(shBinding), lineY, -86, false);
6362
lineY += 12;
64-
renderModule(gfx, x, lineY, "mobvision", MobVision.isEnabled(), "mobvision_toggle");
65-
lineY += 12;
6663
renderModule(gfx, x, lineY, "fullbright", FullBright.isEnabled(), "fullbright_toggle");
6764
lineY += 12;
6865
renderModule(gfx, x, lineY, "flight", Flight.isEnabled(), "flight_toggle");
@@ -83,10 +80,10 @@ public void render(GuiGraphics gfx, int mouseX, int mouseY, float partialTick) {
8380
lineY += 12;
8481
renderModule(gfx, x, lineY, "andromeda", AndromedaBridge.isEnabled(), "andromeda_toggle");
8582
lineY += 12;
86-
87-
8883
renderModule(gfx, x, lineY, "safewalk", com.wurstclient_v7.feature.SafeWalk.isEnabled(), "safewalk_toggle");
8984
lineY += 12;
85+
renderModule(gfx, x, lineY, "elytra-mace", com.wurstclient_v7.feature.ElytraMace.isEnabled(), "elytra_mace_toggle");
86+
9087

9188
super.render(gfx, mouseX, mouseY, partialTick);
9289
}
@@ -151,15 +148,6 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
151148
return true;
152149
}
153150
lineY += 12;
154-
if (checkClick(mouseX, mouseY, x, lineY)) {
155-
MobVision.toggle();
156-
return true;
157-
}
158-
if (checkBindClick(mouseX, mouseY, x, lineY, button)) {
159-
handleBindClick("mobvision_toggle", button);
160-
return true;
161-
}
162-
lineY += 12;
163151
if (checkClick(mouseX, mouseY, x, lineY)) {
164152
FullBright.toggle();
165153
return true;
@@ -249,12 +237,27 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
249237
handleBindClick("andromeda_toggle", button);
250238
return true;
251239
}
240+
lineY += 12; // THIS IS THE FIX: Move the hitbox down for the next module!
252241

253-
// 1. Add SafeWalk Click handling
242+
// SafeWalk Click
254243
if (checkClick(mouseX, mouseY, x, lineY)) {
255244
com.wurstclient_v7.feature.SafeWalk.toggle();
256245
return true;
257246
}
247+
if (checkBindClick(mouseX, mouseY, x, lineY, button)) {
248+
handleBindClick("safewalk_toggle", button);
249+
return true;
250+
}
251+
252+
lineY += 12;
253+
if (checkClick(mouseX, mouseY, x, lineY)) {
254+
com.wurstclient_v7.feature.ElytraMace.toggle();
255+
return true;
256+
}
257+
if (checkBindClick(mouseX, mouseY, x, lineY, button)) {
258+
handleBindClick("elytra_mace_toggle", button);
259+
return true;
260+
}
258261

259262
return super.mouseClicked(mouseX, mouseY, button);
260263
}

common/src/main/java/com/wurstclient_v7/mixin/ClientTickMixin.java

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class ClientTickMixin {
1717
private static boolean prevLeftPressed = false;
1818
private static boolean prevAutoPressed = false;
1919
private static boolean prevSpeedPressed = false;
20-
private static boolean prevMobPressed = false;
2120
private static boolean prevFBPressed = false;
2221
private static boolean prevFlightPressed = false;
2322
private static boolean prevNoFallPressed = false;
@@ -29,6 +28,8 @@ public class ClientTickMixin {
2928
private static boolean prevTracersPressed = false;
3029
private static boolean prevAndromedaPressed = false;
3130
private static boolean prevSafeWalkPressed = false;
31+
private static boolean prevGodModePressed = false;
32+
private static boolean prevElytraMacePressed = false;
3233

3334
@Inject(method = "tick", at = @At("TAIL"))
3435
private void onTick(CallbackInfo ci) {
@@ -79,14 +80,6 @@ private void onTick(CallbackInfo ci) {
7980
}
8081
prevSpeedPressed = shPressed;
8182

82-
// MobVision toggle key
83-
boolean mvPressed = KeybindManager.isPressed(window, "mobvision_toggle");
84-
if (mvPressed && !prevMobPressed) {
85-
com.wurstclient_v7.feature.MobVision.toggle();
86-
System.out.println("MobVision toggled: " + (com.wurstclient_v7.feature.MobVision.isEnabled() ? "ON" : "OFF"));
87-
}
88-
prevMobPressed = mvPressed;
89-
9083
// FullBright toggle key
9184
boolean fbPressed = KeybindManager.isPressed(window, "fullbright_toggle");
9285
if (fbPressed && !prevFBPressed) {
@@ -173,19 +166,33 @@ private void onTick(CallbackInfo ci) {
173166
}
174167
prevSafeWalkPressed = swPressed;
175168

169+
boolean emPressed = KeybindManager.isPressed(window, "elytra_mace_toggle");
170+
if (emPressed && !prevElytraMacePressed) {
171+
com.wurstclient_v7.feature.ElytraMace.toggle();
172+
}
173+
prevElytraMacePressed = emPressed;
174+
176175
// Mouse left click handling (for autoattack)
177176
boolean leftPressed = InputConstants.isKeyDown(window, org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_LEFT);
178177
if (leftPressed && !prevLeftPressed) {
179178
com.wurstclient_v7.feature.AutoAttack.onLeftClick();
180179
}
181180
prevLeftPressed = leftPressed;
182181

182+
// SafeWalk Execution Logic
183+
if (com.wurstclient_v7.feature.SafeWalk.isEnabled()) {
184+
// This checks if you are on the ground.
185+
// We usually only want to force-sneak if we are on the ground so we don't mess up flying/falling.
186+
if (mc.player != null && mc.player.onGround()) {
187+
// Option A: The standard way to force a keybind in Minecraft
188+
mc.options.keyShift.setDown(true);
189+
}
190+
}
191+
183192
// Call feature tick handler
184193
KillAura.onClientTick();
185194
// SpeedHack tick handler (applies boosts when movement begins)
186195
com.wurstclient_v7.feature.SpeedHack.onClientTick();
187-
// MobVision and FullBright tick handlers for effects
188-
com.wurstclient_v7.feature.MobVision.onClientTick();
189196
com.wurstclient_v7.feature.FullBright.onClientTick();
190197
com.wurstclient_v7.feature.Flight.onClientTick();
191198
com.wurstclient_v7.feature.NoFall.onClientTick();
@@ -194,4 +201,4 @@ private void onTick(CallbackInfo ci) {
194201
com.wurstclient_v7.feature.Spider.onClientTick();
195202
com.wurstclient_v7.feature.AndromedaBridge.onClientTick();
196203
}
197-
}
204+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.wurstclient_v7.mixin;
2+
3+
import net.minecraft.client.multiplayer.ClientPacketListener;
4+
import net.minecraft.client.multiplayer.MultiPlayerGameMode;
5+
import net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket;
6+
import net.minecraft.world.entity.Entity;
7+
import net.minecraft.world.entity.player.Player;
8+
import net.minecraft.world.item.Items;
9+
import org.spongepowered.asm.mixin.Final;
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.Shadow;
12+
import org.spongepowered.asm.mixin.Unique;
13+
import org.spongepowered.asm.mixin.injection.At;
14+
import org.spongepowered.asm.mixin.injection.Inject;
15+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
16+
17+
@Mixin(MultiPlayerGameMode.class)
18+
public class ElytraMaceMixin {
19+
@Shadow @Final private ClientPacketListener connection;
20+
21+
@Unique private boolean isSmashing = false;
22+
23+
@Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/MultiPlayerGameMode;ensureHasSentCarriedItem()V", shift = At.Shift.AFTER))
24+
public void beforeMaceAttack(Player player, Entity target, CallbackInfo ci) {
25+
// Check if the hack is actually turned ON first
26+
if (!com.wurstclient_v7.feature.ElytraMace.isEnabled()) return;
27+
28+
if (player.getMainHandItem().is(Items.MACE) && player.getItemBySlot(net.minecraft.world.entity.EquipmentSlot.CHEST).is(Items.ELYTRA)) {
29+
if (player.isFallFlying() && player.fallDistance > 1.5F) {
30+
this.isSmashing = true;
31+
this.connection.send(new ServerboundPlayerCommandPacket(player, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
32+
}
33+
}
34+
}
35+
36+
@Inject(method = "attack", at = @At("TAIL"))
37+
public void afterMaceAttack(Player player, Entity target, CallbackInfo ci) {
38+
if (this.isSmashing) {
39+
this.isSmashing = false;
40+
// Send it again to clean up the state
41+
this.connection.send(new ServerboundPlayerCommandPacket(player, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
42+
}
43+
}
44+
}

common/src/main/java/com/wurstclient_v7/mixin/InGameHudMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private void onRender(GuiGraphics guiGraphics, DeltaTracker tracker, CallbackInf
3030
String[] modules = {
3131
"AndromedaBridge", "AutoAttack", "ESP", "Flight",
3232
"FullBright", "Jetpack", "KillAura", "MobVision",
33-
"NoFall", "Nuker", "SpeedHack", "Spider", "Tracers", "XRay", "SafeWalk"
33+
"NoFall", "Nuker", "SpeedHack", "Spider", "Tracers", "XRay", "SafeWalk", "ElytraMace"
3434
};
3535

3636
for (String mod : modules) {
@@ -50,14 +50,14 @@ private boolean isModEnabled(String name) {
5050
case "FullBright" -> com.wurstclient_v7.feature.FullBright.isEnabled();
5151
case "Jetpack" -> com.wurstclient_v7.feature.Jetpack.isEnabled();
5252
case "KillAura" -> com.wurstclient_v7.feature.KillAura.isEnabled();
53-
case "MobVision" -> com.wurstclient_v7.feature.MobVision.isEnabled();
5453
case "NoFall" -> com.wurstclient_v7.feature.NoFall.isEnabled();
5554
case "Nuker" -> com.wurstclient_v7.feature.Nuker.isEnabled();
5655
case "SpeedHack" -> com.wurstclient_v7.feature.SpeedHack.isEnabled();
5756
case "Spider" -> com.wurstclient_v7.feature.Spider.isEnabled();
5857
case "Tracers" -> com.wurstclient_v7.feature.Tracers.isEnabled();
5958
case "XRay" -> com.wurstclient_v7.feature.XRay.isEnabled();
6059
case "SafeWalk" -> com.wurstclient_v7.feature.SafeWalk.isEnabled();
60+
case "ElytraMace" -> com.wurstclient_v7.feature.ElytraMace.isEnabled();
6161
default -> false;
6262
};
6363
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)