Skip to content

Commit 090413b

Browse files
committed
Fixed Duplicate Buttons Bug
1 parent d119c45 commit 090413b

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ I did not, nor could I copy their code directly as most are Meteor based mods. S
345345
- Adds mixin buttons to disconnect/kick/ban screens for all cracked/offline servers that have the above functions
346346

347347
### CoordLogger
348-
- Detect world and local events and attempt to position it with ESP and chat messages
348+
- Detect world and local events and attempt to position them with ESP and chat messages
349349
- Events that are too far away the direction will be given
350350
- Toggles for various types of events
351351
- Toggles for debugging and ESP

src/main/java/net/wurstclient/WurstTranslator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ private boolean isBuiltInWurstResourcePack(Resource resource)
240240

241241
String id = knownPack.id();
242242
return "wurst".equals(id) || "wurst_testmod".equals(id)
243-
|| "vanilla".equals(id)
244-
|| "nicewurst".equals(id);
243+
|| "vanilla".equals(id) || "nicewurst".equals(id);
245244
}
246245

247246
}

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,8 @@ private void afterVanillaButtons(CallbackInfo ci,
7272
{
7373
if(!WurstClient.INSTANCE.isEnabled())
7474
return;
75-
76-
JoinMultiplayerScreen mpScreen = (JoinMultiplayerScreen)(Object)this;
77-
78-
Button serverFinderButton = Button
79-
.builder(Component.nullToEmpty("Server Finder"),
80-
b -> minecraft.setScreen(new ServerFinderScreen(mpScreen)))
81-
.width(100).build();
82-
addRenderableWidget(serverFinderButton);
83-
footerTopRow.addChild(serverFinderButton);
84-
85-
Button cleanUpButton = Button
86-
.builder(Component.nullToEmpty("Clean Up"),
87-
b -> minecraft.setScreen(new CleanUpScreen(mpScreen)))
88-
.width(100).build();
89-
addRenderableWidget(cleanUpButton);
90-
footerBottomRow.addChild(cleanUpButton);
75+
// Footer buttons are not added here to avoid duplicates; corner buttons
76+
// are created/positioned in `repositionElements()` instead.
9177
}
9278

9379
@Inject(at = @At("TAIL"), method = "repositionElements()V")

0 commit comments

Comments
 (0)