Skip to content

Commit 75102a0

Browse files
Merge branch 'v7.52' into 26.1
2 parents 6052083 + 115f73f commit 75102a0

File tree

106 files changed

+2490
-1572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2490
-1572
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ loom_version=1.15-SNAPSHOT
1414
fabric_api_version=0.143.2+26.1
1515

1616
# Mod Properties
17-
mod_version=v7.51.4-MC26.1-snapshot-6
17+
mod_version=v7.52-MC26.1-snapshot-6
1818
maven_group=net.wurstclient
1919
archives_base_name=Wurst-Client
2020
mod_loader=Fabric

src/gametest/java/net/wurstclient/gametest/WurstTest.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,19 @@ private void testInWorld(ClientGameTestContext context,
112112
"https://i.imgur.com/LyQ5FSD.png");
113113
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
114114

115-
LOGGER.info("Opening game menu");
116-
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
117-
assertScreenshotEquals(context, "game_menu",
118-
"https://i.imgur.com/3wB05mE.png");
119-
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
120-
121115
runWurstCommand(context,
122116
"setmode WurstLogo visibility only_when_outdated");
123117
runWurstCommand(context, "setcheckbox HackList animations off");
124118

119+
InGameMenuTest.testMenuScreens(context);
120+
125121
// TODO: Open ClickGUI and Navigator
126122

127123
// Test Wurst hacks
128124
AutoMineHackTest.testAutoMineHack(context, spContext);
129125
FreecamHackTest.testFreecamHack(context, spContext);
130126
NoFallHackTest.testNoFallHack(context, spContext);
127+
NoWeatherHackTest.testNoWeatherHack(context, spContext);
131128
XRayHackTest.testXRayHack(context, spContext);
132129

133130
// Test Wurst commands
@@ -139,8 +136,6 @@ private void testInWorld(ClientGameTestContext context,
139136

140137
// Test special cases
141138
PistonTest.testPistonDoesntCrash(context, spContext);
142-
143-
// TODO: Check Wurst Options
144139
}
145140

146141
// because the grass texture is randomized and smooth stone isn't

src/gametest/java/net/wurstclient/gametest/tests/FreecamHackTest.java

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import net.fabricmc.fabric.api.client.gametest.v1.TestInput;
1515
import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext;
1616
import net.fabricmc.fabric.api.client.gametest.v1.context.TestClientLevelContext;
17+
import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext;
1718
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
1819
import net.wurstclient.gametest.WurstTest;
1920

@@ -27,35 +28,113 @@ public static void testFreecamHack(ClientGameTestContext context,
2728
WurstTest.LOGGER.info("Testing Freecam hack");
2829
TestInput input = context.getInput();
2930
TestClientLevelContext world = spContext.getClientLevel();
31+
TestServerContext server = spContext.getServer();
3032

3133
// Enable Freecam with default settings
32-
runWurstCommand(context, "setcheckbox Freecam tracer off");
3334
input.pressKey(GLFW.GLFW_KEY_U);
3435
context.waitTick();
3536
world.waitForChunksRender();
36-
assertScreenshotEquals(context, "freecam_start",
37-
"https://i.imgur.com/RxkPywy.png");
38-
clearChat(context);
37+
assertScreenshotEquals(context, "freecam_start_inside",
38+
"https://i.imgur.com/jdSno3u.png");
39+
40+
// Scroll to change speed
41+
input.scroll(1);
42+
context.waitTick();
43+
assertScreenshotEquals(context, "freecam_speed_scrolled",
44+
"https://i.imgur.com/DysLqZw.png");
45+
runWurstCommand(context, "setslider Freecam horizontal_speed 1");
46+
if(context.computeOnClient(
47+
mc -> mc.player.getInventory().getSelectedSlot()) != 0)
48+
throw new RuntimeException(
49+
"Scrolling while using Freecam with \"Scroll to change speed\" enabled changed the selected slot.");
50+
51+
// Scroll to change selected slot
52+
runWurstCommand(context,
53+
"setcheckbox Freecam scroll_to_change_speed off");
54+
input.scroll(1);
55+
context.waitTick();
56+
assertScreenshotEquals(context, "freecam_hotbar_scrolled",
57+
"https://i.imgur.com/edjDUxr.png");
58+
if(context.computeOnClient(
59+
mc -> mc.player.getInventory().getSelectedSlot()) != 8)
60+
throw new RuntimeException(
61+
"Scrolling while using Freecam with \"Scroll to change speed\" disabled didn't change the selected slot.");
62+
context.runOnClient(mc -> mc.player.getInventory().setSelectedSlot(0));
63+
runWurstCommand(context,
64+
"setcheckbox Freecam scroll_to_change_speed on");
65+
input.pressKey(GLFW.GLFW_KEY_U);
66+
context.waitTick();
67+
world.waitForChunksRender();
68+
69+
// Enable Freecam with initial position in front
70+
runWurstCommand(context, "setmode Freecam initial_position in_front");
71+
input.pressKey(GLFW.GLFW_KEY_U);
72+
context.waitTick();
73+
world.waitForChunksRender();
74+
assertScreenshotEquals(context, "freecam_start_in_front",
75+
"https://i.imgur.com/nrMP191.png");
76+
input.pressKey(GLFW.GLFW_KEY_U);
77+
context.waitTick();
78+
world.waitForChunksRender();
79+
80+
// Enable Freecam with initial position above
81+
runWurstCommand(context, "setmode Freecam initial_position above");
82+
input.pressKey(GLFW.GLFW_KEY_U);
83+
context.waitTick();
84+
world.waitForChunksRender();
85+
assertScreenshotEquals(context, "freecam_start_above",
86+
"https://i.imgur.com/3LbAtRj.png");
87+
input.pressKey(GLFW.GLFW_KEY_U);
88+
context.waitTick();
89+
world.waitForChunksRender();
3990

40-
// Fly back and up a bit
91+
// Revert to inside, then fly back and up a bit
92+
runWurstCommand(context, "setmode Freecam initial_position inside");
93+
input.pressKey(GLFW.GLFW_KEY_U);
94+
context.waitTick();
95+
world.waitForChunksRender();
4196
input.holdKeyFor(GLFW.GLFW_KEY_S, 2);
4297
input.holdKeyFor(GLFW.GLFW_KEY_SPACE, 1);
4398
assertScreenshotEquals(context, "freecam_moved",
44-
"https://i.imgur.com/pZDlYfH.png");
45-
clearChat(context);
99+
"https://i.imgur.com/HxrcHbh.png");
46100

47101
// Enable tracer
48102
runWurstCommand(context, "setcheckbox Freecam tracer on");
49103
context.waitTick();
50104
assertScreenshotEquals(context, "freecam_tracer",
51-
"https://i.imgur.com/jYqDFzE.png");
52-
clearChat(context);
105+
"https://i.imgur.com/z3pQumc.png");
53106

54-
// Clean up
107+
// Disable tracer and un-hide hand
55108
runWurstCommand(context, "setcheckbox Freecam tracer off");
109+
runWurstCommand(context, "setcheckbox Freecam hide_hand off");
110+
context.waitTick();
111+
assertScreenshotEquals(context, "freecam_with_hand",
112+
"https://i.imgur.com/6tahHsE.png");
113+
runWurstCommand(context, "setcheckbox Freecam hide_hand on");
114+
115+
// Enable player movement, walk forward, and turn around
116+
runCommand(server, "fill 0 -58 1 0 -58 2 smooth_stone");
117+
runWurstCommand(context, "setmode Freecam apply_input_to player");
118+
input.holdKeyFor(GLFW.GLFW_KEY_W, 10);
119+
for(int i = 0; i < 10; i++)
120+
{
121+
input.moveCursor(120, 0);
122+
context.waitTick();
123+
}
124+
context.waitTick();
125+
assertScreenshotEquals(context, "freecam_player_moved",
126+
"https://i.imgur.com/mf6NgQl.png");
127+
runWurstCommand(context, "setmode Freecam apply_input_to camera");
56128
input.pressKey(GLFW.GLFW_KEY_U);
57129
context.waitTick();
58130
world.waitForChunksRender();
59-
clearChat(context);
131+
132+
// Clean up
133+
runCommand(server, "fill 0 -58 1 0 -58 2 air");
134+
runCommand(server, "tp @s 0 -57 0 0 0");
135+
context.waitTicks(2);
136+
world.waitForChunksRender();
137+
// Restore body rotation - /tp only rotates the head as of 1.21.11
138+
context.runOnClient(mc -> mc.player.setYBodyRot(0));
60139
}
61140
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright (c) 2014-2026 Wurst-Imperium and contributors.
3+
*
4+
* This source code is subject to the terms of the GNU General Public
5+
* License, version 3. If a copy of the GPL was not distributed with this
6+
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
7+
*/
8+
package net.wurstclient.gametest.tests;
9+
10+
import static net.wurstclient.gametest.WurstClientTestHelper.*;
11+
import static net.wurstclient.gametest.WurstTest.*;
12+
13+
import org.lwjgl.glfw.GLFW;
14+
15+
import net.fabricmc.fabric.api.client.gametest.v1.TestInput;
16+
import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext;
17+
import net.minecraft.client.gui.screens.achievement.StatsScreen;
18+
19+
public enum InGameMenuTest
20+
{
21+
;
22+
23+
public static void testMenuScreens(ClientGameTestContext context)
24+
{
25+
TestInput input = context.getInput();
26+
27+
LOGGER.info("Opening game menu");
28+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
29+
assertScreenshotEquals(context, "game_menu",
30+
"https://i.imgur.com/ruPsaNz.png");
31+
32+
LOGGER.info("Opening Wurst Options screen");
33+
for(int i = 0; i < 7; i++)
34+
input.pressKey(GLFW.GLFW_KEY_TAB);
35+
input.pressKey(GLFW.GLFW_KEY_ENTER);
36+
assertScreenshotEquals(context, "wurst_options_screen",
37+
"https://i.imgur.com/ZCt7eiE.png");
38+
// TODO: Test manager screens
39+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
40+
41+
LOGGER.info("Opening statistics screen");
42+
for(int i = 0; i < 2; i++)
43+
input.pressKey(GLFW.GLFW_KEY_TAB);
44+
input.pressKey(GLFW.GLFW_KEY_ENTER);
45+
context.waitFor(mc -> mc.screen instanceof StatsScreen statsScreen
46+
&& !statsScreen.isLoading);
47+
assertScreenshotEquals(context, "statistics_screen",
48+
"https://i.imgur.com/CPMAfzO.png");
49+
// TODO: Test Disable Wurst button
50+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
51+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
52+
53+
testAlternativeWurstOptionsLocation(context);
54+
}
55+
56+
private static void testAlternativeWurstOptionsLocation(
57+
ClientGameTestContext context)
58+
{
59+
TestInput input = context.getInput();
60+
runWurstCommand(context, "setmode WurstOptions location statistics");
61+
62+
LOGGER.info("Opening game menu without Wurst Options");
63+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
64+
assertScreenshotEquals(context, "game_menu_alt",
65+
"https://i.imgur.com/5Yrnje0.png");
66+
67+
LOGGER.info("Opening statistics screen with Wurst Options");
68+
for(int i = 0; i < 3; i++)
69+
input.pressKey(GLFW.GLFW_KEY_TAB);
70+
input.pressKey(GLFW.GLFW_KEY_ENTER);
71+
context.waitFor(mc -> mc.screen instanceof StatsScreen statsScreen
72+
&& !statsScreen.isLoading);
73+
assertScreenshotEquals(context, "statistics_screen_alt",
74+
"https://i.imgur.com/e8q4hJo.png");
75+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
76+
input.pressKey(GLFW.GLFW_KEY_ESCAPE);
77+
78+
runWurstCommand(context, "setmode WurstOptions location game_menu");
79+
}
80+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2014-2026 Wurst-Imperium and contributors.
3+
*
4+
* This source code is subject to the terms of the GNU General Public
5+
* License, version 3. If a copy of the GPL was not distributed with this
6+
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
7+
*/
8+
package net.wurstclient.gametest.tests;
9+
10+
import static net.wurstclient.gametest.WurstClientTestHelper.*;
11+
12+
import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext;
13+
import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext;
14+
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
15+
import net.wurstclient.gametest.WurstTest;
16+
17+
public enum NoWeatherHackTest
18+
{
19+
;
20+
21+
public static void testNoWeatherHack(ClientGameTestContext context,
22+
TestSingleplayerContext spContext)
23+
{
24+
WurstTest.LOGGER.info("Testing NoWeather hack");
25+
TestServerContext server = spContext.getServer();
26+
27+
// Setup (rainy morning, looking straight up)
28+
runCommand(server, "time set 0");
29+
runCommand(server, "tp @s ~ ~ ~ 0 -90");
30+
runCommand(server, "weather rain");
31+
server.runOnServer(s -> s.overworld().setRainLevel(1.0F));
32+
context.runOnClient(mc -> mc.level.setRainLevel(1.0F));
33+
context.waitTicks(10);
34+
assertScreenshotEquals(context, "noweather_raining_setup",
35+
"https://i.imgur.com/JQVtBh7.png");
36+
37+
// Enable NoWeather
38+
runWurstCommand(context, "t NoWeather on");
39+
assertScreenshotEquals(context, "noweather_rain_disabled",
40+
"https://i.imgur.com/YNFnIPj.png");
41+
42+
// Enable time changing
43+
runWurstCommand(context, "setcheckbox NoWeather change_world_time on");
44+
assertScreenshotEquals(context, "noweather_time_6000",
45+
"https://i.imgur.com/wxaAvAi.png");
46+
47+
// Change time to 18000 (midnight)
48+
runWurstCommand(context, "setslider NoWeather time 18000");
49+
assertScreenshotEquals(context, "noweather_time_18000",
50+
"https://i.imgur.com/6RaX1xL.png");
51+
52+
// Change moon phase to 4
53+
runWurstCommand(context, "setcheckbox NoWeather change_moon_phase on");
54+
runWurstCommand(context, "setslider NoWeather moon_phase 4");
55+
assertScreenshotEquals(context, "noweather_moon_phase_4",
56+
"https://i.imgur.com/EjalAH4.png");
57+
58+
// Clean up
59+
runWurstCommand(context, "t NoWeather off");
60+
runCommand(server, "time set 6000");
61+
runCommand(server, "weather clear");
62+
runCommand(server, "tp @s ~ ~ ~ 0 0");
63+
server.runOnServer(s -> s.overworld().setRainLevel(0.0F));
64+
context.runOnClient(mc -> mc.level.setRainLevel(0.0F));
65+
clearParticles(context);
66+
context.waitTicks(7); // for hand animation
67+
}
68+
}
588 Bytes
Loading

src/main/java/net/wurstclient/WurstClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public enum WurstClient
5050
public static Minecraft MC;
5151
public static IMinecraftClient IMC;
5252

53-
public static final String VERSION = "7.51.4";
53+
public static final String VERSION = "7.52";
5454
public static final String MC_VERSION = "26.1-snapshot-6";
5555

5656
private PlausibleAnalytics plausible;

src/main/java/net/wurstclient/WurstTranslator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ private void loadTranslations(ResourceManager manager,
194194
// be caught to prevent mod detection vulnerabilities using
195195
// intentionally corrupted resource packs.
196196
for(Resource resource : manager.getResourceStack(langId))
197-
{
198197
try(InputStream stream = resource.open())
199198
{
200199
if(isBuiltInWurstResourcePack(resource))
@@ -213,7 +212,6 @@ private void loadTranslations(ResourceManager manager,
213212
+ langCode);
214213
e.printStackTrace();
215214
}
216-
}
217215
}
218216
}
219217

src/main/java/net/wurstclient/ai/FlyPathProcessor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ public void process()
115115
if(horizontal)
116116
{
117117
if(!creativeFlying && MC.player.position().distanceTo(
118-
vecInPos) <= WURST.getHax().flightHack.horizontalSpeed
119-
.getValue())
118+
vecInPos) <= WURST.getHax().flightHack.getHorizontalSpeed())
120119
{
121120
MC.player.setPos(vecInPos.x, vecInPos.y, vecInPos.z);
122121
return;
@@ -134,7 +133,7 @@ else if(posVec.y < nextBox.minY)
134133
}else if(y)
135134
{
136135
if(!creativeFlying && MC.player.position().distanceTo(
137-
vecInPos) <= WURST.getHax().flightHack.verticalSpeed.getValue())
136+
vecInPos) <= WURST.getHax().flightHack.getActualVerticalSpeed())
138137
{
139138
MC.player.setPos(vecInPos.x, vecInPos.y, vecInPos.z);
140139
return;

src/main/java/net/wurstclient/ai/PathProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import net.minecraft.core.BlockPos;
1515
import net.minecraft.world.phys.Vec3;
1616
import net.wurstclient.WurstClient;
17-
import net.wurstclient.mixinterface.IKeyBinding;
17+
import net.wurstclient.mixinterface.IKeyMapping;
1818

1919
public abstract class PathProcessor
2020
{
@@ -77,6 +77,6 @@ public static final void releaseControls()
7777
{
7878
// reset keys
7979
for(KeyMapping key : CONTROLS)
80-
IKeyBinding.get(key).resetPressedState();
80+
IKeyMapping.get(key).resetPressedState();
8181
}
8282
}

0 commit comments

Comments
 (0)