Skip to content

Commit 34fe571

Browse files
committed
Merge upstream/master into master (2025-10-18)
2 parents d263e0c + cb7921b commit 34fe571

File tree

6 files changed

+96
-30
lines changed

6 files changed

+96
-30
lines changed

gradle.properties

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
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.9
10-
yarn_mappings=1.21.9+build.1
11-
loader_version=0.17.2
12-
loom_version=1.11-SNAPSHOT
13-
14-
# Fabric API
15-
fabric_version=0.133.14+1.21.9
16-
17-
# Mod Properties
18-
mod_version=v7.50.2-MC1.21.9
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
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.17.3
12+
loom_version=1.11-SNAPSHOT
13+
14+
# Fabric API
15+
fabric_version=0.135.0+1.21.10
16+
17+
# Mod Properties
18+
mod_version=v7.50.3-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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public enum WurstClient
5050
public static MinecraftClient MC;
5151
public static IMinecraftClient IMC;
5252

53-
public static final String VERSION = "7.50.2";
54-
public static final String MC_VERSION = "1.21.9";
53+
public static final String VERSION = "7.50.3";
54+
public static final String MC_VERSION = "1.21.10";
5555

5656
private PlausibleAnalytics plausible;
5757
private EventManager eventManager;

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;
@@ -285,6 +286,19 @@ public boolean hasStatusEffect(RegistryEntry<StatusEffect> effect)
285286
return super.hasStatusEffect(effect);
286287
}
287288

289+
@Override
290+
public StatusEffectInstance getStatusEffect(
291+
RegistryEntry<StatusEffect> effect)
292+
{
293+
HackList hax = WurstClient.INSTANCE.getHax();
294+
295+
if(effect == StatusEffects.LEVITATION
296+
&& hax.noLevitationHack.isEnabled())
297+
return null;
298+
299+
return super.getStatusEffect(effect);
300+
}
301+
288302
@Override
289303
public float getStepHeight()
290304
{

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.spongepowered.asm.mixin.Shadow;
1616
import org.spongepowered.asm.mixin.injection.At;
1717

18+
<<<<<<< HEAD
1819
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
1920
import com.llamalad7.mixinextras.sugar.Local;
2021

@@ -23,11 +24,24 @@
2324

2425
@Mixin(Downloader.class)
2526
public abstract class DownloaderMixin
27+
=======
28+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
29+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
30+
31+
import net.minecraft.client.session.Session;
32+
import net.minecraft.util.Downloader;
33+
import net.minecraft.util.Uuids;
34+
import net.wurstclient.WurstClient;
35+
36+
@Mixin(Downloader.class)
37+
public abstract class DownloaderMixin implements AutoCloseable
38+
>>>>>>> upstream/master
2639
{
2740
@Shadow
2841
@Final
2942
private Path directory;
3043

44+
<<<<<<< HEAD
3145
@ModifyExpressionValue(method = "method_55485",
3246
at = @At(value = "INVOKE",
3347
target = "Ljava/nio/file/Path;resolve(Ljava/lang/String;)Ljava/nio/file/Path;"))
@@ -36,5 +50,41 @@ public abstract class DownloaderMixin
3650
{
3751
return ResourcePackProtector.remapDownloadPath(directory, original,
3852
packId);
53+
=======
54+
/**
55+
* Patches a fingerprinting vulnerability by creating a separate cache
56+
* folder for each Minecraft account.
57+
*
58+
* <p>
59+
* This mixin targets the <code>entries.forEach()</code> lambda in
60+
* <code>download(Config, Map)</code>.
61+
*
62+
* @see https://github.com/Wurst-Imperium/Wurst7/issues/1226
63+
*/
64+
@WrapOperation(at = @At(value = "INVOKE",
65+
target = "Ljava/nio/file/Path;resolve(Ljava/lang/String;)Ljava/nio/file/Path;",
66+
ordinal = 0,
67+
remap = false), method = "method_55485")
68+
private Path wrapResolve(Path instance, String filename,
69+
Operation<Path> original)
70+
{
71+
Path result = original.call(instance, filename);
72+
73+
// If the path has already been modified by another mod (likely trying
74+
// to patch the same exploit), don't modify it further.
75+
if(result == null || !result.getParent().equals(directory))
76+
return result;
77+
78+
// "getUuidOrNull" seems to be an outdated Yarn name, as Minecraft
79+
// 1.21.10 treats this like a non-null method. Just in case, we manually
80+
// fallback to the offline UUID if it ever does return null.
81+
Session session = WurstClient.MC.getSession();
82+
UUID uuid = session.getUuidOrNull();
83+
if(uuid == null)
84+
uuid = Uuids.getOfflinePlayerUuid(session.getUsername());
85+
86+
return result.getParent().resolve(uuid.toString())
87+
.resolve(result.getFileName());
88+
>>>>>>> upstream/master
3989
}
4090
}

src/main/resources/wurst.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"DirectConnectScreenMixin",
3333
"DownloaderMixin",
3434
"DisconnectedScreenMixin",
35+
"DownloaderMixin",
3536
"EntityMixin",
3637
"EntityRendererMixin",
3738
"FluidRendererMixin",

0 commit comments

Comments
 (0)