Skip to content

Commit 85e4122

Browse files
Merge branch '1.21.11'
2 parents d770fdd + 4056aa7 commit 85e4122

File tree

91 files changed

+593
-622
lines changed

Some content is hidden

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

91 files changed

+593
-622
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"

gradle.properties

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# Done to increase the memory available to gradle.
2-
org.gradle.jvmargs=-Xmx2G
3-
org.gradle.parallel=true
4-
org.gradle.configuration-cache=true
5-
6-
# Fabric Properties
7-
# check these at https://fabricmc.net/develop/ and
8-
# 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
12-
loom_version=1.14-SNAPSHOT
13-
14-
# Fabric API
15-
fabric_version=0.138.3+1.21.10
16-
17-
# Mod Properties
18-
mod_version=v7.51.2-MC1.21.10
19-
maven_group=net.wurstclient
20-
archives_base_name=Wurst-Client
21-
mod_loader=Fabric
22-
23-
# GitHub
24-
gh_repo_id=Wurst-Imperium/Wurst7
25-
mcx_repo_id=Wurst-Imperium/Wurst-MCX2
26-
27-
# 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
30-
do_mod_compat_test=true
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx2G
3+
org.gradle.parallel=true
4+
org.gradle.configuration-cache=true
5+
6+
# Fabric Properties
7+
# check these at https://fabricmc.net/develop/ and
8+
# https://modrinth.com/mod/fabric-api/versions
9+
minecraft_version=1.21.11
10+
yarn_mappings=25w46a+build.2
11+
loader_version=0.18.1
12+
loom_version=1.14-SNAPSHOT
13+
14+
# Fabric API
15+
fabric_version=0.139.4+1.21.11
16+
17+
# Mod Properties
18+
mod_version=v7.51.2-MC1.21.11
19+
maven_group=net.wurstclient
20+
archives_base_name=Wurst-Client
21+
mod_loader=Fabric
22+
23+
# GitHub
24+
gh_repo_id=Wurst-Imperium/Wurst7
25+
mcx_repo_id=Wurst-Imperium/Wurst-MCX2
26+
27+
# Dependencies
28+
# check at https://modrinth.com/mod/sodium/versions?l=fabric&g=1.21.11
29+
sodium_version=mc1.21.10-0.7.3-fabric
30+
do_mod_compat_test=false

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: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import net.fabricmc.fabric.api.client.gametest.v1.world.TestWorldBuilder;
2626
import net.minecraft.SharedConstants;
2727
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState;
28-
import net.minecraft.world.level.GameRules;
2928
import net.minecraft.world.level.block.Blocks;
29+
import net.minecraft.world.level.gamerules.GameRules;
3030
import net.minecraft.world.level.levelgen.FlatLevelSource;
3131
import net.minecraft.world.level.levelgen.flat.FlatLayerInfo;
3232
import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings;
@@ -48,7 +48,7 @@ public void runTest(ClientGameTestContext context)
4848

4949
LOGGER.info("Reached title screen");
5050
assertScreenshotEquals(context, "title_screen",
51-
"https://i.imgur.com/4fSJRpd.png");
51+
"https://i.imgur.com/xSAHDXr.png");
5252

5353
AltManagerTest.testAltManagerButton(context);
5454

@@ -58,8 +58,8 @@ public void runTest(ClientGameTestContext context)
5858
String mcVersion = SharedConstants.getCurrentVersion().name();
5959
creator.setName("E2E Test " + mcVersion);
6060
creator.setGameMode(WorldCreationUiState.SelectedGameMode.CREATIVE);
61-
creator.getGameRules().getRule(GameRules.RULE_SENDCOMMANDFEEDBACK)
62-
.set(false, null);
61+
creator.getGameRules().set(GameRules.SEND_COMMAND_FEEDBACK, false,
62+
null);
6363
applyFlatPresetWithSmoothStone(creator);
6464
});
6565

@@ -79,6 +79,12 @@ private void testInWorld(ClientGameTestContext context,
7979
TestClientWorldContext world = spContext.getClientWorld();
8080
TestServerContext server = spContext.getServer();
8181

82+
// Disable anisotropic filtering
83+
context.runOnClient(mc -> mc.options.maxAnisotropyBit().set(0));
84+
85+
// Disable chunk fade
86+
context.runOnClient(mc -> mc.options.chunkSectionFadeInTime().set(0.0));
87+
8288
runCommand(server, "time set noon");
8389
runCommand(server, "tp 0 -57 0");
8490
runCommand(server, "fill ~ ~-3 ~ ~ ~-1 ~ smooth_stone");

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ 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+
"https://i.imgur.com/Ee9ZANB.png");
6060

6161
// Exposed only + opacity
6262
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
@@ -65,7 +65,7 @@ public static void testXRayHack(ClientGameTestContext context,
6565
input.pressKey(GLFW.GLFW_KEY_X);
6666
waitForChunkReloading(context, world);
6767
assertScreenshotEquals(context, "xray_exposed_only_opacity",
68-
"https://i.imgur.com/noPWDUl.png");
68+
"https://i.imgur.com/hQOQRVG.png");
6969

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

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

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

5353
public static final String VERSION = "7.51.2";
54-
public static final String MC_VERSION = "1.21.10";
54+
public static final String MC_VERSION = "1.21.11";
5555

5656
private PlausibleAnalytics plausible;
5757
private EventManager eventManager;

src/main/java/net/wurstclient/WurstRenderLayers.java

Lines changed: 32 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,96 +7,63 @@
77
*/
88
package net.wurstclient;
99

10-
import java.util.OptionalDouble;
11-
12-
import net.minecraft.client.renderer.RenderStateShard;
13-
import net.minecraft.client.renderer.RenderType;
10+
import net.minecraft.client.renderer.rendertype.LayeringTransform;
11+
import net.minecraft.client.renderer.rendertype.OutputTarget;
12+
import net.minecraft.client.renderer.rendertype.RenderSetup;
13+
import net.minecraft.client.renderer.rendertype.RenderType;
1414

1515
public enum WurstRenderLayers
1616
{
1717
;
1818

1919
/**
20-
* Similar to {@link RenderType#lines()}, but with line width 2.
20+
* Similar to {@link RenderType#getLines()}, but with line width 2.
2121
*/
22-
public static final RenderType.CompositeRenderType LINES = RenderType
23-
.create("wurst:lines", 1536, WurstShaderPipelines.DEPTH_TEST_LINES,
24-
RenderType.CompositeState.builder()
25-
.setLineState(
26-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
27-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
28-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
29-
.createCompositeState(false));
22+
public static final RenderType LINES = RenderType.create("wurst:lines",
23+
RenderSetup.builder(WurstShaderPipelines.DEPTH_TEST_LINES)
24+
.setLayeringTransform(LayeringTransform.VIEW_OFFSET_Z_LAYERING)
25+
.setOutputTarget(OutputTarget.ITEM_ENTITY_TARGET)
26+
.createRenderSetup());
3027

3128
/**
32-
* Similar to {@link RenderType#lines()}, but with line width 2 and no
29+
* Similar to {@link RenderType#getLines()}, but with line width 2 and no
3330
* depth test.
3431
*/
35-
public static final RenderType.CompositeRenderType ESP_LINES = RenderType
36-
.create("wurst:esp_lines", 1536, WurstShaderPipelines.ESP_LINES,
37-
RenderType.CompositeState.builder()
38-
.setLineState(
39-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
40-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
41-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
42-
.createCompositeState(false));
43-
44-
/**
45-
* Similar to {@link RenderType#lineStrip()}, but with line width 2.
46-
*/
47-
public static final RenderType.CompositeRenderType LINE_STRIP =
48-
RenderType.create("wurst:line_strip", 1536, false, true,
49-
WurstShaderPipelines.DEPTH_TEST_LINE_STRIP,
50-
RenderType.CompositeState.builder()
51-
.setLineState(
52-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
53-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
54-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
55-
.createCompositeState(false));
56-
57-
/**
58-
* Similar to {@link RenderType#lineStrip()}, but with line width 2 and
59-
* no depth test.
60-
*/
61-
public static final RenderType.CompositeRenderType ESP_LINE_STRIP =
62-
RenderType.create("wurst:esp_line_strip", 1536, false, true,
63-
WurstShaderPipelines.ESP_LINE_STRIP,
64-
RenderType.CompositeState.builder()
65-
.setLineState(
66-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
67-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
68-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
69-
.createCompositeState(false));
32+
public static final RenderType ESP_LINES =
33+
RenderType.create("wurst:esp_lines",
34+
RenderSetup.builder(WurstShaderPipelines.ESP_LINES)
35+
.setLayeringTransform(LayeringTransform.VIEW_OFFSET_Z_LAYERING)
36+
.setOutputTarget(OutputTarget.ITEM_ENTITY_TARGET)
37+
.createRenderSetup());
7038

7139
/**
72-
* Similar to {@link RenderType#debugQuads()}, but with culling enabled.
40+
* Similar to {@link RenderType#getDebugQuads()}, but with culling enabled.
7341
*/
74-
public static final RenderType.CompositeRenderType QUADS = RenderType
75-
.create("wurst:quads", 1536, false, true, WurstShaderPipelines.QUADS,
76-
RenderType.CompositeState.builder().createCompositeState(false));
42+
public static final RenderType QUADS = RenderType.create("wurst:quads",
43+
RenderSetup.builder(WurstShaderPipelines.QUADS).sortOnUpload()
44+
.createRenderSetup());
7745

7846
/**
79-
* Similar to {@link RenderType#debugQuads()}, but with culling enabled
47+
* Similar to {@link RenderType#getDebugQuads()}, but with culling enabled
8048
* and no depth test.
8149
*/
82-
public static final RenderType.CompositeRenderType ESP_QUADS =
83-
RenderType.create("wurst:esp_quads", 1536, false, true,
84-
WurstShaderPipelines.ESP_QUADS,
85-
RenderType.CompositeState.builder().createCompositeState(false));
50+
public static final RenderType ESP_QUADS = RenderType.create(
51+
"wurst:esp_quads", RenderSetup.builder(WurstShaderPipelines.ESP_QUADS)
52+
.sortOnUpload().createRenderSetup());
8653

8754
/**
88-
* Similar to {@link RenderType#debugQuads()}, but with no depth test.
55+
* Similar to {@link RenderType#getDebugQuads()}, but with no depth test.
8956
*/
90-
public static final RenderType.CompositeRenderType ESP_QUADS_NO_CULLING =
91-
RenderType.create("wurst:esp_quads_no_culling", 1536, false, true,
92-
WurstShaderPipelines.ESP_QUADS_NO_CULLING,
93-
RenderType.CompositeState.builder().createCompositeState(false));
57+
public static final RenderType ESP_QUADS_NO_CULLING =
58+
RenderType.create("wurst:esp_quads_no_culling",
59+
RenderSetup.builder(WurstShaderPipelines.ESP_QUADS_NO_CULLING)
60+
.sortOnUpload().useLightmap().createRenderSetup());
9461

9562
/**
9663
* Returns either {@link #QUADS} or {@link #ESP_QUADS} depending on the
9764
* value of {@code depthTest}.
9865
*/
99-
public static RenderType.CompositeRenderType getQuads(boolean depthTest)
66+
public static RenderType getQuads(boolean depthTest)
10067
{
10168
return depthTest ? QUADS : ESP_QUADS;
10269
}
@@ -105,17 +72,8 @@ public static RenderType.CompositeRenderType getQuads(boolean depthTest)
10572
* Returns either {@link #LINES} or {@link #ESP_LINES} depending on the
10673
* value of {@code depthTest}.
10774
*/
108-
public static RenderType.CompositeRenderType getLines(boolean depthTest)
75+
public static RenderType getLines(boolean depthTest)
10976
{
11077
return depthTest ? LINES : ESP_LINES;
11178
}
112-
113-
/**
114-
* Returns either {@link #LINE_STRIP} or {@link #ESP_LINE_STRIP} depending
115-
* on the value of {@code depthTest}.
116-
*/
117-
public static RenderType.CompositeRenderType getLineStrip(boolean depthTest)
118-
{
119-
return depthTest ? LINE_STRIP : ESP_LINE_STRIP;
120-
}
12179
}

0 commit comments

Comments
 (0)