Skip to content

Commit 3335eae

Browse files
Merge branch 'master' into 1.21.10
2 parents e56a6de + 9624894 commit 3335eae

File tree

15 files changed

+139
-110
lines changed

15 files changed

+139
-110
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: echo ${{ inputs.distinct_id }}
3535

3636
- name: Checkout repository
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@v6
3838

3939
- name: Set up Python 3.12
4040
uses: actions/setup-python@v6

.github/workflows/check_translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222

2323
- name: Checkout repository
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525

2626
- name: Check translations
2727
uses: Wurst-Imperium/check-translations@v1

.github/workflows/dependency_graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323

2424
- name: Checkout repository
25-
uses: actions/checkout@v5
25+
uses: actions/checkout@v6
2626

2727
- name: Set up Java 21
2828
uses: actions/setup-java@v5

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: echo ${{ inputs.distinct_id }}
3636

3737
- name: Checkout repository
38-
uses: actions/checkout@v5
38+
uses: actions/checkout@v6
3939

4040
- name: Set up Java 21
4141
uses: actions/setup-java@v5

.github/workflows/publish.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: echo ${{ inputs.distinct_id }}
4343

4444
- name: Checkout repository
45-
uses: actions/checkout@v5
45+
uses: actions/checkout@v6
4646
with:
4747
# Include all tags in case the new tag already exists.
4848
fetch-tags: true
@@ -82,26 +82,29 @@ jobs:
8282
GITHUB_TOKEN: ${{ github.token }}
8383
run: ./gradlew closeMilestone --stacktrace --no-configuration-cache
8484

85+
- name: Build website update inputs
86+
id: website_inputs
87+
if: ${{ inputs.update_website }}
88+
run: |
89+
echo "wurst_version=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/^v//' | sed 's/-MC.*$//')" >> "$GITHUB_OUTPUT"
90+
echo "mc_version=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
91+
echo "fapi_version=$(grep '^fabric_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
92+
8593
- name: Upload backups
8694
if: ${{ inputs.upload_backups }}
87-
env:
88-
WI_BACKUPS_API_KEY: ${{ secrets.WI_BACKUPS_API_KEY }}
89-
run: ./gradlew uploadBackups --stacktrace --no-configuration-cache
95+
uses: Wurst-Imperium/upload-backups@v1
96+
with:
97+
api_key: ${{ secrets.WI_BACKUPS_API_KEY }}
98+
project: Wurst
99+
version: ${{ steps.website_inputs.outputs.wurst_version }}
100+
path: build/libs/*.jar
90101

91102
- name: Publish to GitHub
92103
if: ${{ inputs.publish_github }}
93104
env:
94105
GITHUB_TOKEN: ${{ secrets.OLD_MCX_PUBLISH_TOKEN }}
95106
run: ./gradlew github --stacktrace --no-configuration-cache
96107

97-
- name: Build website update inputs
98-
id: website_inputs
99-
if: ${{ inputs.update_website }}
100-
run: |
101-
echo "wurst_version=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/^v//' | sed 's/-MC.*$//')" >> "$GITHUB_OUTPUT"
102-
echo "mc_version=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
103-
echo "fapi_version=$(grep '^fabric_version=' gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
104-
105108
- name: Trigger website update
106109
if: ${{ inputs.update_website }}
107110
uses: Wurst-Imperium/dispatch-and-wait@v1

build.gradle

Lines changed: 19 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66

77
plugins {
88
id "fabric-loom" version "${loom_version}"
9-
id "com.diffplug.spotless" version "8.0.0"
9+
id "com.diffplug.spotless" version "8.1.0"
1010
}
1111

1212
def ENV = System.getenv()
@@ -68,6 +68,10 @@ loom {
6868
accessWidenerPath = file("src/main/resources/wurst.accesswidener")
6969

7070
runs {
71+
clientWithMods {
72+
inherit client
73+
}
74+
7175
clientGameTestWithMods {
7276
inherit client
7377
source = sourceSets.gametest
@@ -89,6 +93,20 @@ dependencies {
8993
testMods "maven.modrinth:sodium:${project.sodium_version}"
9094
}
9195

96+
def cleanClientWithMods = tasks.register("cleanClientWithMods", Delete) {
97+
delete "run/mods"
98+
}
99+
100+
def prepareClientWithMods = tasks.register("prepareClientWithMods", Sync) {
101+
from configurations.testMods
102+
into "run/mods"
103+
}
104+
105+
tasks.named("runClientWithMods") {
106+
dependsOn prepareClientWithMods
107+
finalizedBy cleanClientWithMods
108+
}
109+
92110
def cleanClientGameTestWithMods = tasks.register("cleanClientGameTestWithMods", Delete) {
93111
delete layout.buildDirectory.dir("run/clientGameTestWithMods")
94112
}
@@ -247,60 +265,3 @@ task closeMilestone {
247265
}
248266
}
249267
}
250-
251-
task uploadBackups {
252-
dependsOn build
253-
254-
onlyIf {
255-
ENV.WI_BACKUPS_API_KEY
256-
}
257-
258-
doLast {
259-
def shortVersion = getGhVersion().substring(1)
260-
def backupUrl = "https://api.wurstclient.net/artifact-backups/Wurst/${shortVersion}"
261-
262-
def maxRetries = 3
263-
def retryCount = 0
264-
def success = false
265-
266-
while (!success && retryCount < maxRetries) {
267-
try {
268-
def connection = new URL(backupUrl).openConnection() as HttpURLConnection
269-
def boundary = UUID.randomUUID().toString()
270-
connection.setRequestMethod("POST")
271-
connection.setRequestProperty("X-API-Key", ENV.WI_BACKUPS_API_KEY)
272-
connection.setRequestProperty("Accept", "application/json")
273-
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=$boundary")
274-
connection.doOutput = true
275-
276-
def output = connection.outputStream
277-
[remapJar, remapSourcesJar].each { jarTask ->
278-
def file = jarTask.archiveFile.get().asFile
279-
output << "--${boundary}\r\n"
280-
output << "Content-Disposition: form-data; name=\"files\"; filename=\"${file.name}\"\r\n"
281-
output << "Content-Type: application/java-archive\r\n\r\n"
282-
file.withInputStream { input ->
283-
output << input
284-
}
285-
output << "\r\n"
286-
}
287-
output << "--${boundary}--\r\n"
288-
output.flush()
289-
290-
if(connection.responseCode != 200) {
291-
throw new IOException("HTTP ${connection.responseCode}: ${connection.responseMessage}")
292-
}
293-
294-
success = true
295-
296-
} catch (Exception e) {
297-
retryCount++
298-
if (retryCount >= maxRetries) {
299-
throw new GradleException("Failed to upload backups after ${maxRetries} attempts: ${e.message}")
300-
}
301-
println "Upload attempt ${retryCount} failed: ${e.message}. Retrying in 5 seconds..."
302-
Thread.sleep(5000)
303-
}
304-
}
305-
}
306-
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ org.gradle.configuration-cache=true
88
# https://modrinth.com/mod/fabric-api/versions
99
minecraft_version=1.21.10
1010
yarn_mappings=1.21.10+build.2
11-
loader_version=0.17.3
11+
loader_version=0.18.1
1212
loom_version=1.13-SNAPSHOT
1313

1414
# Fabric API
1515
fabric_version=0.138.3+1.21.10
1616

1717
# Mod Properties
18-
mod_version=v7.51.1-MC1.21.10
18+
mod_version=v7.51.2-MC1.21.10
1919
maven_group=net.wurstclient
2020
archives_base_name=Wurst-Client
2121
mod_loader=Fabric
@@ -26,5 +26,5 @@ mcx_repo_id=Wurst-Imperium/Wurst-MCX2
2626

2727
# Dependencies
2828
# check at https://modrinth.com/mod/sodium/versions?l=fabric&g=1.21.10
29-
sodium_version=mc1.21.10-0.7.2-fabric
29+
sodium_version=mc1.21.10-0.7.3-fabric
3030
do_mod_compat_test=true

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ private void testInWorld(ClientGameTestContext context,
8989
world.waitForChunksRender();
9090

9191
assertScreenshotEquals(context, "in_game",
92-
IS_MOD_COMPAT_TEST ? "https://i.imgur.com/VxbGFrb.png"
93-
: "https://i.imgur.com/EfzN9Cd.png");
92+
"https://i.imgur.com/EfzN9Cd.png");
9493

9594
LOGGER.info("Recording debug menu");
9695
input.pressKey(GLFW.GLFW_KEY_F3);

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ public static void testFreecamHack(ClientGameTestContext context,
4141
input.holdKeyFor(GLFW.GLFW_KEY_S, 2);
4242
input.holdKeyFor(GLFW.GLFW_KEY_SPACE, 1);
4343
assertScreenshotEquals(context, "freecam_moved",
44-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/oZUpI8c.png"
45-
: "https://i.imgur.com/pZDlYfH.png");
44+
"https://i.imgur.com/pZDlYfH.png");
4645
clearChat(context);
4746

4847
// Enable tracer
4948
runWurstCommand(context, "setcheckbox Freecam tracer on");
5049
context.waitTick();
5150
assertScreenshotEquals(context, "freecam_tracer",
52-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/teKaxAK.png"
53-
: "https://i.imgur.com/jYqDFzE.png");
51+
"https://i.imgur.com/jYqDFzE.png");
5452
clearChat(context);
5553

5654
// Clean up

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public static void testXRayHack(ClientGameTestContext context,
3838
input.pressKey(GLFW.GLFW_KEY_X);
3939
waitForChunkReloading(context, world);
4040
assertScreenshotEquals(context, "xray_default",
41-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/02KZHLm.png"
42-
: "https://i.imgur.com/Dftamqv.png");
41+
"https://i.imgur.com/Dftamqv.png");
4342

4443
// Exposed only
4544
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
@@ -48,8 +47,7 @@ public static void testXRayHack(ClientGameTestContext context,
4847
input.pressKey(GLFW.GLFW_KEY_X);
4948
waitForChunkReloading(context, world);
5049
assertScreenshotEquals(context, "xray_exposed_only",
51-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/xplrJwM.png"
52-
: "https://i.imgur.com/QlEpQTu.png");
50+
"https://i.imgur.com/QlEpQTu.png");
5351

5452
// Opacity mode
5553
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed off");
@@ -58,8 +56,7 @@ public static void testXRayHack(ClientGameTestContext context,
5856
input.pressKey(GLFW.GLFW_KEY_X);
5957
waitForChunkReloading(context, world);
6058
assertScreenshotEquals(context, "xray_opacity",
61-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/MFc821z.png"
62-
: "https://i.imgur.com/0nLulJn.png");
59+
"https://i.imgur.com/0nLulJn.png");
6360

6461
// Exposed only + opacity
6562
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
@@ -68,8 +65,7 @@ public static void testXRayHack(ClientGameTestContext context,
6865
input.pressKey(GLFW.GLFW_KEY_X);
6966
waitForChunkReloading(context, world);
7067
assertScreenshotEquals(context, "xray_exposed_only_opacity",
71-
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/GRHgW6P.png"
72-
: "https://i.imgur.com/noPWDUl.png");
68+
"https://i.imgur.com/noPWDUl.png");
7369

7470
// Clean up
7571
runCommand(server, "fill ~-5 ~-2 ~5 ~5 ~5 ~7 air");

0 commit comments

Comments
 (0)