Skip to content

Commit 483cccd

Browse files
Merge branch '1.21.9' into v7.51-1.21.9
2 parents 5dc118a + 29dbaa3 commit 483cccd

File tree

89 files changed

+645
-607
lines changed

Some content is hidden

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

89 files changed

+645
-607
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ 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.9, 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.9, 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.9, 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.9, 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.9, is vulnerable to CVE-2025-58057
4141
force "io.netty:netty-codec:4.1.125.Final"
4242
}
4343
}

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Done to increase the memory available to gradle.
2-
org.gradle.jvmargs=-Xmx1G
2+
org.gradle.jvmargs=-Xmx2G
33
org.gradle.parallel=true
44

55
# Fabric Properties
66
# check these at https://fabricmc.net/develop/ and
77
# https://modrinth.com/mod/fabric-api/versions
8-
minecraft_version=1.21.8
9-
yarn_mappings=1.21.8+build.1
8+
minecraft_version=1.21.9-pre4
9+
yarn_mappings=1.21.9-pre4+build.1
1010
loader_version=0.17.2
1111
loom_version=1.11-SNAPSHOT
1212

1313
# Fabric API
14-
fabric_version=0.133.4+1.21.8
14+
fabric_version=0.133.11+1.21.9
1515

1616
# Mod Properties
17-
mod_version=v7.51pre1-MC1.21.8
17+
mod_version=v7.51pre1-MC1.21.9-pre4
1818
maven_group=net.wurstclient
1919
archives_base_name=Wurst-Client
2020
mod_loader=Fabric

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.51pre1";
54-
public static final String MC_VERSION = "1.21.8";
54+
public static final String MC_VERSION = "1.21.9-pre4";
5555

5656
private PlausibleAnalytics plausible;
5757
private EventManager eventManager;

src/main/java/net/wurstclient/altmanager/AltRenderer.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
import net.minecraft.client.gui.DrawContext;
2424
import net.minecraft.client.network.PlayerListEntry;
2525
import net.minecraft.client.util.DefaultSkinHelper;
26-
import net.minecraft.client.util.SkinTextures;
26+
import net.minecraft.entity.player.PlayerSkinType;
27+
import net.minecraft.entity.player.SkinTextures;
2728
import net.minecraft.util.Identifier;
2829
import net.minecraft.util.Uuids;
2930
import net.wurstclient.WurstClient;
@@ -60,7 +61,7 @@ private static Identifier loadOfflineSkin(String name)
6061
UUID uuid = Uuids.getOfflinePlayerUuid(name);
6162
GameProfile profile = new GameProfile(uuid, name);
6263
PlayerListEntry entry = new PlayerListEntry(profile, false);
63-
Identifier texture = entry.getSkinTextures().texture();
64+
Identifier texture = entry.getSkinTextures().body().texturePath();
6465
offlineSkins.put(name, texture);
6566
return texture;
6667
}
@@ -73,7 +74,7 @@ private static void queueOnlineSkinLoading(String name)
7374

7475
UUID uuid = SkinStealer.getUUIDOrNull(name);
7576
ProfileResult result =
76-
mc.getSessionService().fetchProfile(uuid, false);
77+
mc.getApiServices().sessionService().fetchProfile(uuid, false);
7778

7879
return result == null ? null : result.profile();
7980

@@ -90,7 +91,7 @@ private static void queueOnlineSkinLoading(String name)
9091
}, BACKGROUND_THREAD).thenAcceptAsync(skinTextures -> {
9192

9293
if(skinTextures != null)
93-
onlineSkins.put(name, skinTextures.texture());
94+
onlineSkins.put(name, skinTextures.body().texturePath());
9495

9596
}, BACKGROUND_THREAD);
9697
}
@@ -134,7 +135,7 @@ public static void drawAltBody(DrawContext context, String name, int x,
134135

135136
boolean slim = DefaultSkinHelper
136137
.getSkinTextures(Uuids.getOfflinePlayerUuid(name))
137-
.model() == SkinTextures.Model.SLIM;
138+
.model() == PlayerSkinType.SLIM;
138139

139140
// Face
140141
x = x + width / 4;
@@ -273,7 +274,7 @@ public static void drawAltBack(DrawContext context, String name, int x,
273274

274275
boolean slim = DefaultSkinHelper
275276
.getSkinTextures(Uuids.getOfflinePlayerUuid(name))
276-
.model() == SkinTextures.Model.SLIM;
277+
.model() == PlayerSkinType.SLIM;
277278

278279
// Face
279280
x = x + width / 4;

src/main/java/net/wurstclient/altmanager/LoginManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void changeCrackedName(String newName)
2121
{
2222
Session session =
2323
new Session(newName, Uuids.getOfflinePlayerUuid(newName), "",
24-
Optional.empty(), Optional.empty(), Session.AccountType.MOJANG);
24+
Optional.empty(), Optional.empty());
2525

2626
WurstClient.IMC.setWurstSession(session);
2727
}

src/main/java/net/wurstclient/altmanager/MicrosoftLoginManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ public static void login(String email, String password)
103103
MinecraftProfile mcProfile = getAccount(email, password);
104104

105105
Session session = new Session(mcProfile.getName(), mcProfile.getUUID(),
106-
mcProfile.getAccessToken(), Optional.empty(), Optional.empty(),
107-
Session.AccountType.MSA);
106+
mcProfile.getAccessToken(), Optional.empty(), Optional.empty());
108107

109108
WurstClient.IMC.setWurstSession(session);
110109
}

src/main/java/net/wurstclient/altmanager/screens/AltEditorScreen.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616

1717
import org.lwjgl.glfw.GLFW;
1818

19+
import net.minecraft.client.gui.Click;
1920
import net.minecraft.client.gui.DrawContext;
2021
import net.minecraft.client.gui.Drawable;
2122
import net.minecraft.client.gui.screen.Screen;
2223
import net.minecraft.client.gui.widget.ButtonWidget;
2324
import net.minecraft.client.gui.widget.TextFieldWidget;
25+
import net.minecraft.client.input.KeyInput;
2426
import net.minecraft.text.OrderedText;
2527
import net.minecraft.text.Style;
2628
import net.minecraft.text.Text;
@@ -66,12 +68,9 @@ public final void init()
6668
passwordBox = new TextFieldWidget(textRenderer, width / 2 - 100, 100,
6769
200, 20, Text.literal(""));
6870
passwordBox.setText(getDefaultPassword());
69-
passwordBox.setRenderTextProvider((text, int_1) -> {
70-
String stars = "";
71-
for(int i = 0; i < text.length(); i++)
72-
stars += "*";
73-
return OrderedText.styledForwardsVisitedString(stars, Style.EMPTY);
74-
});
71+
passwordBox.addFormatter(
72+
(text, startIndex) -> OrderedText.styledForwardsVisitedString(
73+
"*".repeat(text.length()), Style.EMPTY));
7574
passwordBox.setMaxLength(256);
7675
addSelectableChild(passwordBox);
7776

@@ -203,30 +202,30 @@ private final String stealSkin(String name)
203202
}
204203

205204
@Override
206-
public boolean keyPressed(int keyCode, int scanCode, int int_3)
205+
public boolean keyPressed(KeyInput context)
207206
{
208-
if(keyCode == GLFW.GLFW_KEY_ENTER)
209-
doneButton.onPress();
207+
if(context.key() == GLFW.GLFW_KEY_ENTER)
208+
doneButton.onPress(context);
210209

211-
return super.keyPressed(keyCode, scanCode, int_3);
210+
return super.keyPressed(context);
212211
}
213212

214213
@Override
215-
public boolean mouseClicked(double x, double y, int button)
214+
public boolean mouseClicked(Click context, boolean doubleClick)
216215
{
217-
nameOrEmailBox.mouseClicked(x, y, button);
218-
passwordBox.mouseClicked(x, y, button);
216+
nameOrEmailBox.mouseClicked(context, doubleClick);
217+
passwordBox.mouseClicked(context, doubleClick);
219218

220219
if(nameOrEmailBox.isFocused() || passwordBox.isFocused())
221220
message = "";
222221

223-
if(button == GLFW.GLFW_MOUSE_BUTTON_4)
222+
if(context.button() == GLFW.GLFW_MOUSE_BUTTON_4)
224223
{
225224
close();
226225
return true;
227226
}
228227

229-
return super.mouseClicked(x, y, button);
228+
return super.mouseClicked(context, doubleClick);
230229
}
231230

232231
@Override

src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import net.fabricmc.fabric.api.client.screen.v1.Screens;
3232
import net.minecraft.client.MinecraftClient;
3333
import net.minecraft.client.font.TextRenderer;
34+
import net.minecraft.client.gui.Click;
3435
import net.minecraft.client.gui.DrawContext;
3536
import net.minecraft.client.gui.Drawable;
3637
import net.minecraft.client.gui.Element;
@@ -40,6 +41,7 @@
4041
import net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget;
4142
import net.minecraft.client.gui.widget.ButtonWidget;
4243
import net.minecraft.client.gui.widget.ClickableWidget;
44+
import net.minecraft.client.input.KeyInput;
4345
import net.minecraft.text.StringVisitable;
4446
import net.minecraft.text.Style;
4547
import net.minecraft.text.Text;
@@ -179,24 +181,24 @@ private void updateAltButtons()
179181
}
180182

181183
@Override
182-
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
184+
public boolean keyPressed(KeyInput context)
183185
{
184-
if(keyCode == GLFW.GLFW_KEY_ENTER)
185-
useButton.onPress();
186+
if(context.key() == GLFW.GLFW_KEY_ENTER)
187+
useButton.onPress(context);
186188

187-
return super.keyPressed(keyCode, scanCode, modifiers);
189+
return super.keyPressed(context);
188190
}
189191

190192
@Override
191-
public boolean mouseClicked(double mouseX, double mouseY, int button)
193+
public boolean mouseClicked(Click context, boolean doubleClick)
192194
{
193-
if(button == GLFW.GLFW_MOUSE_BUTTON_4)
195+
if(context.button() == GLFW.GLFW_MOUSE_BUTTON_4)
194196
{
195197
close();
196198
return true;
197199
}
198200

199-
return super.mouseClicked(mouseX, mouseY, button);
201+
return super.mouseClicked(context, doubleClick);
200202
}
201203

202204
private void pressLogin()
@@ -556,10 +558,9 @@ public Text getNarration()
556558
}
557559

558560
@Override
559-
public boolean mouseClicked(double mouseX, double mouseY,
560-
int mouseButton)
561+
public boolean mouseClicked(Click context, boolean doubleClick)
561562
{
562-
if(mouseButton != GLFW.GLFW_MOUSE_BUTTON_LEFT)
563+
if(context.button() != GLFW.GLFW_MOUSE_BUTTON_LEFT)
563564
return false;
564565

565566
long timeSinceLastClick = Util.getMeasuringTimeMs() - lastClickTime;
@@ -572,10 +573,12 @@ public boolean mouseClicked(double mouseX, double mouseY,
572573
}
573574

574575
@Override
575-
public void render(DrawContext context, int index, int y, int x,
576-
int entryWidth, int entryHeight, int mouseX, int mouseY,
576+
public void render(DrawContext context, int mouseX, int mouseY,
577577
boolean hovered, float tickDelta)
578578
{
579+
int x = getContentX();
580+
int y = getContentY();
581+
579582
// green glow when logged in
580583
if(client.getSession().getUsername().equals(alt.getName()))
581584
{
@@ -624,7 +627,7 @@ private final class ListGui
624627
public ListGui(MinecraftClient minecraft, AltManagerScreen screen,
625628
List<Alt> list)
626629
{
627-
super(minecraft, screen.width, screen.height - 96, 36, 30, 0);
630+
super(minecraft, screen.width, screen.height - 96, 36, 30);
628631

629632
list.stream().map(AltManagerScreen.Entry::new)
630633
.forEach(this::addEntry);

0 commit comments

Comments
 (0)