commit 1dd802152c7eec70c03ed5f8750f304b8f0f0df2
parent c94258358ab040134cb6296cca14d1173d984203
Author: Ambos <51835548+Amb0s@users.noreply.github.com>
Date: Mon, 7 Nov 2022 04:59:47 +0100
Merged pull request #3
Fixed 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.