Skip to content

Commit f9427aa

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0d7a7f5 + aeed716 commit f9427aa

File tree

96 files changed

+685
-768
lines changed

Some content is hidden

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

96 files changed

+685
-768
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
description: "Minecraft version to update to"
99
required: true
1010
yarn_mappings:
11-
description: "Yarn mappings version"
12-
required: true
11+
description: "Yarn mappings version (no longer used)"
12+
required: false
1313
fabric_loader:
1414
description: "Fabric Loader version"
1515
required: true
@@ -41,41 +41,13 @@ jobs:
4141
with:
4242
python-version: "3.12"
4343

44-
- name: Set up Java 21
45-
uses: actions/setup-java@v5
46-
with:
47-
java-version: "21"
48-
distribution: "microsoft"
49-
50-
- name: Grant execute permission for gradlew
51-
run: chmod +x gradlew
52-
53-
- name: Setup Gradle
54-
uses: gradle/actions/setup-gradle@v5
55-
with:
56-
build-scan-publish: true
57-
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
58-
build-scan-terms-of-use-agree: "yes"
59-
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
60-
cache-read-only: ${{ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/1.') }}
61-
62-
- name: Migrate mappings
63-
run: |
64-
./gradlew migrateMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
65-
./gradlew migrateGametestMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
66-
./gradlew migrateClassTweakerMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
67-
6844
- name: Update version constants
6945
run: |
7046
python scripts/update_version_constants.py \
7147
"${{ inputs.mc_version }}" \
7248
"${{ inputs.fabric_loader }}" \
7349
"${{ inputs.fapi_version }}"
7450
75-
# To fix any style issues that the migration scripts might cause
76-
- name: Run spotlessApply task
77-
run: ./gradlew spotlessApply
78-
7951
- name: Commit and push changes
8052
run: |
8153
git config --global user.name "Wurst-Bot"

.github/workflows/multi_publish.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@ on:
66
inputs:
77
wurst_version:
88
description: "Wurst version (without v or -MC)"
9-
required: true
109
type: string
10+
required: true
1111
branches:
1212
description: "Space-separated list of branches to publish from"
13-
required: true
1413
type: string
14+
required: true
1515
announce_update:
1616
description: "Announce as an update on WurstForum"
17-
required: true
1817
type: boolean
1918
default: false
2019
announce_ports:
2120
description: "Announce as ports on WurstForum"
22-
required: true
2321
type: boolean
2422
default: false
2523
dry_run:
2624
description: "Dry-run mode (don't actually publish anything)"
27-
required: false
2825
type: boolean
2926
default: false
3027

@@ -47,6 +44,15 @@ jobs:
4744
JSON_ARRAY="[${quoted_branches%,}]"
4845
echo "branches=$JSON_ARRAY" >> "$GITHUB_OUTPUT"
4946
echo "Branches: $JSON_ARRAY" >> "$GITHUB_STEP_SUMMARY"
47+
- name: Verify mod_version is as expected
48+
run: |
49+
expected_prefix="v${{ inputs.wurst_version }}-MC"
50+
for branch in ${{ inputs.branches }}; do
51+
url="https://raw.githubusercontent.com/${{ github.repository }}/${branch}/gradle.properties"
52+
actual=$(curl -sf "$url" | grep "^mod_version=" | cut -d'=' -f2)
53+
echo "$branch: $actual"
54+
[[ "$actual" == "$expected_prefix"* ]] || { echo "::error::Expected $expected_prefix*, got $actual"; exit 1; }
55+
done
5056
5157
publish_each:
5258
runs-on: ubuntu-latest
@@ -62,14 +68,13 @@ jobs:
6268
fail-fast: true
6369
matrix:
6470
branch: ${{ fromJson(needs.prepare.outputs.branches) }}
65-
# TODO: Maybe also verify that the wurst_version in each branch is as expected before publishing?
6671
steps:
6772
- name: Trigger publish workflow
6873
uses: Wurst-Imperium/dispatch-and-wait@v1
6974
with:
7075
token: ${{ github.token }}
71-
owner: Wurst-Imperium
72-
repo: Wurst7
76+
owner: ${{ github.repository_owner }}
77+
repo: ${{ github.event.repository.name }}
7378
ref: ${{ matrix.branch }}
7479
workflow: publish.yml
7580
workflow_inputs: |

.github/workflows/publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@ on:
66
inputs:
77
close_milestone:
88
description: "Close milestone"
9-
required: true
109
type: boolean
1110
default: true
1211
upload_backups:
1312
description: "Upload to backups server"
14-
required: true
1513
type: boolean
1614
default: true
1715
publish_github:
1816
description: "Publish to GitHub"
19-
required: true
2017
type: boolean
2118
default: true
2219
update_website:
2320
description: "Update WurstClient.net post (only works if there already is one)"
24-
required: true
2521
type: boolean
2622
default: false
2723
distinct_id:
24+
type: string
2825
required: false
2926

3027
permissions:
@@ -69,6 +66,7 @@ jobs:
6966
run: ./gradlew build --stacktrace --warning-mode=fail
7067

7168
- name: Create and push tag
69+
if: ${{ github.ref_type != 'tag' }}
7270
run: |
7371
MOD_VERSION=$(grep "^mod_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
7472
git config --global user.name "Wurst-Bot"

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,20 @@ loom {
9090
accessWidenerPath = file("src/main/resources/wurst.accesswidener")
9191

9292
runs {
93+
clientGameTest {
94+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
95+
}
96+
9397
clientWithMods {
9498
inherit client
9599
}
96-
100+
97101
clientGameTestWithMods {
98102
inherit client
99103
source = sourceSets.gametest
100104
runDir = "build/run/clientGameTestWithMods"
101105
vmArgs.add("-Dfabric.client.gametest")
106+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
102107
vmArgs.add("-Dwurst.test.withMods=true")
103108
programArgs.add("--username=Wurst-Bot")
104109
}

gradle.properties

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@ org.gradle.configuration-cache=true
66
# Fabric Properties
77
# check these at https://fabricmc.net/develop/ and
88
# https://modrinth.com/mod/fabric-api/versions
9-
minecraft_version=1.21.10
10-
yarn_mappings=1.21.10+build.2
11-
loader_version=0.18.1
9+
minecraft_version=1.21.11
10+
yarn_mappings=1.21.11+build.2
11+
loader_version=0.18.2
1212
loom_version=1.14-SNAPSHOT
1313

1414
# Fabric API
15-
fabric_version=0.138.3+1.21.10
15+
fabric_version=0.139.4+1.21.11
1616

1717
# Mod Properties
18-
mod_version=v7.51.2-CevAPI-MC1.21.10
18+
mod_version=v7.51.3-CevAPI-MC1.21.11
1919
maven_group=net.wurstclient
2020
archives_base_name=Wurst-Client
2121
mod_loader=Fabric
2222

2323
# GitHub
2424
gh_repo_id=cev-api/Wurst7-CevAPI
25-
mcx_repo_id=Wurst-Imperium/Wurst-MCX2
2625

2726
# Dependencies
28-
# check at https://modrinth.com/mod/sodium/versions?l=fabric&g=1.21.10
29-
sodium_version=mc1.21.10-0.7.3-fabric
27+
# check at https://modrinth.com/mod/sodium/versions?l=fabric&g=1.21.11
28+
sodium_version=mc1.21.11-0.8.0-fabric
3029
do_mod_compat_test=true

scripts/update_version_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def update_mc_version_constant(mc_version):
5656
break
5757

5858
# Save modified WurstClient.java
59-
with open("src/main/java/net/wurstclient/WurstClient.java", "w") as f:
59+
with open("src/main/java/net/wurstclient/WurstClient.java", "w", newline='\r\n') as f:
6060
f.writelines(lines)
6161

6262
if found:

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext;
2424
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
2525
import net.fabricmc.fabric.api.client.gametest.v1.world.TestWorldBuilder;
26+
import net.fabricmc.fabric.impl.client.gametest.TestSystemProperties;
2627
import net.minecraft.SharedConstants;
2728
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState;
28-
import net.minecraft.world.level.GameRules;
2929
import net.minecraft.world.level.block.Blocks;
30+
import net.minecraft.world.level.gamerules.GameRules;
3031
import net.minecraft.world.level.levelgen.FlatLevelSource;
3132
import net.minecraft.world.level.levelgen.flat.FlatLayerInfo;
3233
import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings;
@@ -42,13 +43,16 @@ public class WurstTest implements FabricClientGameTest
4243
@Override
4344
public void runTest(ClientGameTestContext context)
4445
{
46+
if(!TestSystemProperties.DISABLE_NETWORK_SYNCHRONIZER)
47+
throw new RuntimeException("Network synchronizer is not disabled");
48+
4549
LOGGER.info("Starting Wurst Client GameTest");
4650
hideSplashTexts(context);
4751
waitForTitleScreenFade(context);
4852

4953
LOGGER.info("Reached title screen");
5054
assertScreenshotEquals(context, "title_screen",
51-
"https://i.imgur.com/4fSJRpd.png");
55+
"https://i.imgur.com/xSAHDXr.png");
5256

5357
AltManagerTest.testAltManagerButton(context);
5458

@@ -58,8 +62,8 @@ public void runTest(ClientGameTestContext context)
5862
String mcVersion = SharedConstants.getCurrentVersion().name();
5963
creator.setName("E2E Test " + mcVersion);
6064
creator.setGameMode(WorldCreationUiState.SelectedGameMode.CREATIVE);
61-
creator.getGameRules().getRule(GameRules.RULE_SENDCOMMANDFEEDBACK)
62-
.set(false, null);
65+
creator.getGameRules().set(GameRules.SEND_COMMAND_FEEDBACK, false,
66+
null);
6367
applyFlatPresetWithSmoothStone(creator);
6468
});
6569

@@ -79,6 +83,9 @@ private void testInWorld(ClientGameTestContext context,
7983
TestClientWorldContext world = spContext.getClientWorld();
8084
TestServerContext server = spContext.getServer();
8185

86+
// Disable chunk fade
87+
context.runOnClient(mc -> mc.options.chunkSectionFadeInTime().set(0.0));
88+
8289
runCommand(server, "time set noon");
8390
runCommand(server, "tp 0 -57 0");
8491
runCommand(server, "fill ~ ~-3 ~ ~ ~-1 ~ smooth_stone");

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public static void testXRayHack(ClientGameTestContext context,
5656
input.pressKey(GLFW.GLFW_KEY_X);
5757
waitForChunkReloading(context, world);
5858
assertScreenshotEquals(context, "xray_opacity",
59-
"https://i.imgur.com/0nLulJn.png");
59+
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/hXdzoDB.png"
60+
: "https://i.imgur.com/ERrL7ko.png");
6061

6162
// Exposed only + opacity
6263
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
@@ -65,10 +66,11 @@ public static void testXRayHack(ClientGameTestContext context,
6566
input.pressKey(GLFW.GLFW_KEY_X);
6667
waitForChunkReloading(context, world);
6768
assertScreenshotEquals(context, "xray_exposed_only_opacity",
68-
"https://i.imgur.com/noPWDUl.png");
69+
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/ZwIARSr.png"
70+
: "https://i.imgur.com/mCnP6LG.png");
6971

7072
// Clean up
71-
runCommand(server, "fill ~-5 ~-2 ~5 ~5 ~5 ~7 air");
73+
runCommand(server, "fill ~-5 ~-2 ~4 ~5 ~5 ~7 air");
7274
waitForBlock(context, 5, 5, 7, Blocks.AIR);
7375
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed off");
7476
runWurstCommand(context, "setslider X-Ray opacity 0");
@@ -103,6 +105,10 @@ private static void buildTestRig(ClientGameTestContext context,
103105
runCommand(server, "setblock ~1 ~0 ~6 minecraft:water");
104106
runCommand(server, "setblock ~-1 ~0 ~6 minecraft:lava");
105107

108+
// Snow
109+
runCommand(server, "fill ~-5 ~-1 ~4 ~5 ~-1 ~4 minecraft:stone");
110+
runCommand(server, "fill ~-5 ~0 ~4 ~5 ~0 ~4 minecraft:snow");
111+
106112
// Wait for blocks to appear
107113
waitForBlock(context, -1, 0, 6, Blocks.LAVA);
108114
waitForChunkReloading(context, world);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public enum WurstClient
5252
public static Minecraft MC;
5353
public static IMinecraftClient IMC;
5454

55-
public static final String VERSION = "7.51.2";
56-
public static final String MC_VERSION = "1.21.10";
55+
public static final String VERSION = "7.51.3";
56+
public static final String MC_VERSION = "1.21.11";
5757

5858
private PlausibleAnalytics plausible;
5959
private EventManager eventManager;

0 commit comments

Comments
 (0)