Skip to content

Commit 5a5c8ac

Browse files
Merge v7.50.3 into 1.21.8
1 parent 8c64d1a commit 5a5c8ac

File tree

8 files changed

+103
-19
lines changed

8 files changed

+103
-19
lines changed

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,18 @@ repositories {
2929
// Override vulnerable dependencies until Minecraft updates to newer versions
3030
configurations.all {
3131
resolutionStrategy {
32-
// v2.5.1, used by Minecraft 1.21.4 - 1.21.8, is vulnerable to CVE-2024-57699
32+
// v2.5.1, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2024-57699
3333
force "net.minidev:json-smart:2.5.2"
34-
// v2.13.4, used by Minecraft 1.21.4 - 1.21.8, is vulnerable to CVE-2025-52999
34+
// v2.13.4, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-52999
3535
force "com.fasterxml.jackson.core:jackson-core:2.15.0"
36-
// v3.17.0, used by Minecraft 1.21.4 - 1.21.8, is vulnerable to CVE-2025-48924
36+
// v3.17.0, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-48924
3737
force "org.apache.commons:commons-lang3:3.18.0"
38-
// v9.40, used by Minecraft 1.21.4 - 1.21.8, is vulnerable to CVE-2025-53864
38+
// v9.40, used by Minecraft 1.21.4 - 1.21.10, is vulnerable to CVE-2025-53864
3939
force "com.nimbusds:nimbus-jose-jwt:10.0.2"
40-
// v4.1.118.Final, used by Minecraft 1.21.5 - 1.21.8, is vulnerable to CVE-2025-58057
40+
// v4.1.118.Final, used by Minecraft 1.21.5 - 1.21.10, is vulnerable to CVE-2025-58057
4141
force "io.netty:netty-codec:4.1.125.Final"
42+
// v4.1.118.Final, used by Minecraft 1.21.5 - 1.21.10, is vulnerable to CVE-2025-58056
43+
force "io.netty:netty-codec-http:4.1.125.Final"
4244
}
4345
}
4446

@@ -139,7 +141,7 @@ jar {
139141
inputs.property("archivesName", archivesName)
140142

141143
from("LICENSE.txt") {
142-
rename { "LICENSE-${archivesName}.txt" }
144+
rename { "LICENSE-${archivesName.get()}.txt" }
143145
}
144146

145147
exclude("intentionally_untranslated.json")

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.8
1010
yarn_mappings=1.21.8+build.1
11-
loader_version=0.17.2
11+
loader_version=0.17.3
1212
loom_version=1.11-SNAPSHOT
1313

1414
# Fabric API
15-
fabric_version=0.133.4+1.21.8
15+
fabric_version=0.134.0+1.21.8
1616

1717
# Mod Properties
18-
mod_version=v7.50.2-MC1.21.8
18+
mod_version=v7.50.3-MC1.21.8
1919
maven_group=net.wurstclient
2020
archives_base_name=Wurst-Client
2121
mod_loader=Fabric

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 MinecraftClient MC;
5151
public static IMinecraftClient IMC;
5252

53-
public static final String VERSION = "7.50.2";
53+
public static final String VERSION = "7.50.3";
5454
public static final String MC_VERSION = "1.21.8";
5555

5656
private PlausibleAnalytics plausible;

src/main/java/net/wurstclient/hacks/NoLevitationHack.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ public NoLevitationHack()
2020
setCategory(Category.MOVEMENT);
2121
}
2222

23-
// See ClientPlayerEntityMixin.hasStatusEffect()
23+
// See ClientPlayerEntityMixin.hasStatusEffect() and
24+
// ClientPlayerEntityMixin.getStatusEffect()
2425
}

src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import net.minecraft.client.world.ClientWorld;
2929
import net.minecraft.entity.MovementType;
3030
import net.minecraft.entity.effect.StatusEffect;
31+
import net.minecraft.entity.effect.StatusEffectInstance;
3132
import net.minecraft.entity.effect.StatusEffects;
3233
import net.minecraft.registry.entry.RegistryEntry;
3334
import net.minecraft.util.math.Vec3d;
@@ -284,6 +285,19 @@ public boolean hasStatusEffect(RegistryEntry<StatusEffect> effect)
284285
return super.hasStatusEffect(effect);
285286
}
286287

288+
@Override
289+
public StatusEffectInstance getStatusEffect(
290+
RegistryEntry<StatusEffect> effect)
291+
{
292+
HackList hax = WurstClient.INSTANCE.getHax();
293+
294+
if(effect == StatusEffects.LEVITATION
295+
&& hax.noLevitationHack.isEnabled())
296+
return null;
297+
298+
return super.getStatusEffect(effect);
299+
}
300+
287301
@Override
288302
public float getStepHeight()
289303
{
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2014-2025 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.mixin;
9+
10+
import java.nio.file.Path;
11+
import java.util.UUID;
12+
13+
import org.spongepowered.asm.mixin.Final;
14+
import org.spongepowered.asm.mixin.Mixin;
15+
import org.spongepowered.asm.mixin.Shadow;
16+
import org.spongepowered.asm.mixin.injection.At;
17+
18+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
19+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
20+
21+
import net.minecraft.client.session.Session;
22+
import net.minecraft.util.Downloader;
23+
import net.minecraft.util.Uuids;
24+
import net.wurstclient.WurstClient;
25+
26+
@Mixin(Downloader.class)
27+
public abstract class DownloaderMixin implements AutoCloseable
28+
{
29+
@Shadow
30+
@Final
31+
private Path directory;
32+
33+
/**
34+
* Patches a fingerprinting vulnerability by creating a separate cache
35+
* folder for each Minecraft account.
36+
*
37+
* <p>
38+
* This mixin targets the <code>entries.forEach()</code> lambda in
39+
* <code>download(Config, Map)</code>.
40+
*
41+
* @see https://github.com/Wurst-Imperium/Wurst7/issues/1226
42+
*/
43+
@WrapOperation(at = @At(value = "INVOKE",
44+
target = "Ljava/nio/file/Path;resolve(Ljava/lang/String;)Ljava/nio/file/Path;",
45+
ordinal = 0,
46+
remap = false), method = "method_55485")
47+
private Path wrapResolve(Path instance, String filename,
48+
Operation<Path> original)
49+
{
50+
Path result = original.call(instance, filename);
51+
52+
// If the path has already been modified by another mod (likely trying
53+
// to patch the same exploit), don't modify it further.
54+
if(result == null || !result.getParent().equals(directory))
55+
return result;
56+
57+
// "getUuidOrNull" seems to be an outdated Yarn name, as Minecraft
58+
// 1.21.10 treats this like a non-null method. Just in case, we manually
59+
// fallback to the offline UUID if it ever does return null.
60+
Session session = WurstClient.MC.getSession();
61+
UUID uuid = session.getUuidOrNull();
62+
if(uuid == null)
63+
uuid = Uuids.getOfflinePlayerUuid(session.getUsername());
64+
65+
return result.getParent().resolve(uuid.toString())
66+
.resolve(result.getFileName());
67+
}
68+
}

src/main/java/net/wurstclient/mixin/GameRendererMixin.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1616
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1717

18+
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
1819
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
1920
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2021

21-
import net.minecraft.client.render.Camera;
2222
import net.minecraft.client.render.GameRenderer;
2323
import net.minecraft.client.render.RenderTickCounter;
2424
import net.minecraft.client.util.math.MatrixStack;
@@ -84,14 +84,12 @@ private void onRenderHand(float tickDelta, boolean bl, Matrix4f matrix4f,
8484
cancelNextBobView = false;
8585
}
8686

87-
@Inject(at = @At(value = "RETURN", ordinal = 1),
88-
method = "getFov(Lnet/minecraft/client/render/Camera;FZ)F",
89-
cancellable = true)
90-
private void onGetFov(Camera camera, float tickDelta, boolean changingFov,
91-
CallbackInfoReturnable<Float> cir)
87+
@ModifyReturnValue(at = @At("RETURN"),
88+
method = "getFov(Lnet/minecraft/client/render/Camera;FZ)F")
89+
private float onGetFov(float original)
9290
{
93-
cir.setReturnValue(WurstClient.INSTANCE.getOtfs().zoomOtf
94-
.changeFovBasedOnZoom(cir.getReturnValueF()));
91+
return WurstClient.INSTANCE.getOtfs().zoomOtf
92+
.changeFovBasedOnZoom(original);
9593
}
9694

9795
/**

src/main/resources/wurst.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"DimensionOrBossFogModifierMixin",
3232
"DirectConnectScreenMixin",
3333
"DisconnectedScreenMixin",
34+
"DownloaderMixin",
3435
"EntityMixin",
3536
"EntityRenderDispatcherMixin",
3637
"EntityRendererMixin",

0 commit comments

Comments
 (0)