Skip to content

Commit f9e8160

Browse files
committed
Updated to match 1.21.10 branch
1 parent 3df45a9 commit f9e8160

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

src/main/java/net/wurstclient/clickgui/components/SettingGroupComponent.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
import org.lwjgl.glfw.GLFW;
1313

1414
import net.minecraft.client.gui.GuiGraphics;
15-
import net.minecraft.client.input.MouseButtonEvent;
16-
import net.wurstclient.clickgui.ClickGuiIcons;
1715
import net.wurstclient.clickgui.ClickGui;
16+
import net.wurstclient.clickgui.ClickGuiIcons;
1817
import net.wurstclient.clickgui.Component;
1918
import net.wurstclient.settings.Setting;
2019
import net.wurstclient.settings.SettingGroup;
@@ -109,15 +108,13 @@ private boolean togglePopoutWindow()
109108
}
110109

111110
@Override
112-
public void handleMouseClick(double mouseX, double mouseY, int mouseButton,
113-
MouseButtonEvent context)
111+
public void handleMouseClick(double mouseX, double mouseY, int mouseButton)
114112
{
115113
if(mouseButton != GLFW.GLFW_MOUSE_BUTTON_LEFT)
116114
{
117115
if(expanded)
118116
for(Component child : childComponents)
119-
child.handleMouseClick(mouseX, mouseY, mouseButton,
120-
context);
117+
child.handleMouseClick(mouseX, mouseY, mouseButton);
121118
return;
122119
}
123120

@@ -162,7 +159,7 @@ public void handleMouseClick(double mouseX, double mouseY, int mouseButton,
162159
if(mouseX < cx1 || mouseX > cx2 || mouseY < cy1 || mouseY > cy2)
163160
continue;
164161

165-
child.handleMouseClick(mouseX, mouseY, mouseButton, context);
162+
child.handleMouseClick(mouseX, mouseY, mouseButton);
166163
break;
167164
}
168165
}

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

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,12 @@ private void onInit(CallbackInfo ci)
5858
b -> LastServerRememberer.joinLastServer(mpScreen))
5959
.width(100).build();
6060
addRenderableWidget(lastServerButton);
61+
62+
refreshCustomButtons();
6163
}
6264

63-
@Inject(at = @At(value = "INVOKE",
64-
target = "Lnet/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen;repositionElements()V",
65-
ordinal = 0), method = "init()V")
66-
private void afterVanillaButtons(CallbackInfo ci,
67-
@Local(ordinal = 1) LinearLayout footerTopRow,
68-
@Local(ordinal = 2) LinearLayout footerBottomRow)
69-
{
70-
if(!WurstClient.INSTANCE.isEnabled())
71-
return;
72-
// Footer buttons are not added here to avoid duplicates; corner buttons
73-
// are created/positioned in `repositionElements()` instead.
74-
}
75-
76-
@Inject(at = @At("TAIL"), method = "repositionElements()V")
77-
private void onRefreshWidgetPositions(CallbackInfo ci)
65+
@Unique
66+
private void refreshCustomButtons()
7867
{
7968
updateLastServerButton();
8069

0 commit comments

Comments
 (0)