commit 4bac46464313c15d1e92aa1a344cd9e4229debf4
parent f9394b6862c9a075504f80462b0c6531e4fe32d8
Author: Amb0s <ambos@disroot.org>
Date: Fri, 11 Aug 2023 07:23:46 +0200
Added button descriptions and removed unused code
Diffstat:
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/main/java/turniplabs/vanillafixes/mixin/GuiMainMenuMixin.java b/src/main/java/turniplabs/vanillafixes/mixin/GuiMainMenuMixin.java
@@ -9,28 +9,24 @@ import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
@Mixin(value = GuiMainMenu.class, remap = false)
final class GuiMainMenuMixin extends GuiScreen {
-
@Inject(method = "initGui", at = @At("RETURN"), require = 0)
private void removeLinks(CallbackInfo ci) {
- controlList.removeIf(button -> button.id == 5 || button.id == 6 || button.id == 7);
+ controlList.removeIf(button ->
+ button.id == 5 /* Discord */ || button.id == 6 /* Minecraft Forums */ ||
+ button.id == 7 /* Youtube */);
}
@Inject(method = "initGui", at = @At("RETURN"), require = 0)
private void removeButtons(CallbackInfo ci) {
- controlList.removeIf(button -> button.id == 3 || button.id == 8 || button.id == 100);
+ controlList.removeIf(button ->
+ button.id == 3 /* Texture packs */ || button.id == 8 /* Languages */ ||
+ button.id == 100 /* Mod menu */);
}
@ModifyArgs(method = "drawScreen", at = @At(value = "INVOKE",
- target = "Lnet/minecraft/client/render/FontRenderer;drawCenteredString(Ljava/lang/String;III)V"),
+ target = "Lnet/minecraft/client/render/FontRenderer;drawCenteredString(Ljava/lang/String;III)V", ordinal = 0),
require = 0)
private void removeDownloadingResourcesString(Args args) {
args.set(0, "");
}
-
- /*
- @ModifyConstant(method = "drawScreen", constant = @Constant(stringValue = ""))
- private String removeConstantString(String value) {
- return "";
- }
- */
-}
-\ No newline at end of file
+}