commit 1f29118ddbeb026e9f6af0c8589240c5a169520f
parent c94258358ab040134cb6296cca14d1173d984203
Author: pkstDev <William27060827@hotmail.com>
Date: Mon, 7 Nov 2022 11:55:28 +0800
Actual Mod Menu compatibility, new icon
Diffstat:
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/ambos/vanillafixes/mixin/GuiMainMenuMixin.java b/src/main/java/ambos/vanillafixes/mixin/GuiMainMenuMixin.java
@@ -9,10 +9,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = GuiMainMenu.class, remap = false)
final class GuiMainMenuMixin extends GuiScreen {
- @Inject(method = "initGui", at = @At("RETURN"), cancellable = true, require = 0)
+ @Inject(method = "initGui", at = @At("RETURN"), require = 0)
private void removeLinks(CallbackInfo ci) {
- for (int i = 1; i <= 3; i++) { // Removes the last 3 buttons (links) from the main menu.
- this.controlList.remove(this.controlList.size() - 2); // Skip the Mod Menu button.
- }
+ controlList.removeIf(button -> button.id == 5 || button.id == 6 || button.id == 7); // Remove the links
}
}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
@@ -15,6 +15,7 @@
},
"license": "MIT",
+ "icon": "icon.png",
"environment": "*",
"entrypoints": {
diff --git a/src/main/resources/icon.png b/src/main/resources/icon.png
Binary files differ.