idk
This commit is contained in:
@@ -15,6 +15,7 @@ repositories {
|
|||||||
maven { url 'https://maven.wispforest.io/releases/' }
|
maven { url 'https://maven.wispforest.io/releases/' }
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url = "https://cursemaven.com" }
|
maven { url = "https://cursemaven.com" }
|
||||||
|
maven { url 'https://maven.izzel.io/releases/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -24,6 +25,8 @@ dependencies {
|
|||||||
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
implementation "curse.maven:modern-ui-352491:8206272"
|
implementation "curse.maven:modern-ui-352491:8206272"
|
||||||
|
implementation "icyllis.modernui:ModernUI-Fabric:26.1.2-3.13.0.4"
|
||||||
|
implementation "icyllis.arc3d:arc3d-core:2026.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
minecraft_version=26.1.2
|
minecraft_version=26.1.2
|
||||||
# Official mappings are used for 26.1.2
|
# Official mappings are used for 26.1.2
|
||||||
loader_version=0.18.4
|
loader_version=0.19.3
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.0
|
mod_version=1.0
|
||||||
maven_group=de.winniepat
|
maven_group=de.winniepat
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package de.winniepat.parrotmod.mixin;
|
||||||
|
|
||||||
|
import de.winniepat.parrotmod.ui.SettingsScreen;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.components.Button; // Updated import
|
||||||
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
|
import net.minecraft.client.gui.screens.TitleScreen;
|
||||||
|
import net.minecraft.network.chat.Component; // Replaces Text
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(TitleScreen.class)
|
||||||
|
public class TitleScreenMixin extends Screen {
|
||||||
|
|
||||||
|
protected TitleScreenMixin(Component title) {
|
||||||
|
super(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(at = @At("RETURN"), method = "init")
|
||||||
|
private void addCustomButton(CallbackInfo ci) {
|
||||||
|
int x = this.width / 2 - 100;
|
||||||
|
int y = this.height / 4 + 120;
|
||||||
|
|
||||||
|
this.addRenderableWidget(Button.builder(Component.literal("Parrot Mod"), (button) -> {
|
||||||
|
Minecraft.getInstance().setScreen(new SettingsScreen(Component.literal("Settings")));
|
||||||
|
}).bounds(x, y, 200, 20).build());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package de.winniepat.parrotmod.ui;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.components.Button;
|
||||||
|
import net.minecraft.client.gui.components.Renderable;
|
||||||
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
||||||
|
public class SettingsScreen extends Screen {
|
||||||
|
private int tabWidth = 100;
|
||||||
|
private int currentTab = 0;
|
||||||
|
|
||||||
|
public SettingsScreen(Component title) {
|
||||||
|
super(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() {
|
||||||
|
this.addRenderableWidget(Button.builder(Component.literal("General"), (b) -> {
|
||||||
|
this.currentTab = 0;
|
||||||
|
this.rebuildWidgets();;
|
||||||
|
}).bounds(10, 65, tabWidth, 20).build());
|
||||||
|
|
||||||
|
this.addRenderableWidget(Button.builder(Component.literal("Graphics"), (b) -> {
|
||||||
|
this.currentTab = 1;
|
||||||
|
this.rebuildWidgets();
|
||||||
|
}).bounds(10, 65, tabWidth, 20).build());
|
||||||
|
|
||||||
|
if (currentTab == 0) {
|
||||||
|
this.addRenderableWidget(Button.builder(Component.literal("Enable Mod"), (b) -> {
|
||||||
|
System.out.println("Enable Mod clicked");
|
||||||
|
}).bounds(tabWidth + 30, 40, 150, 20).build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=${loader_version}",
|
"fabricloader": ">=${loader_version}",
|
||||||
"fabric-api": "*",
|
"fabric-api": "*",
|
||||||
"minecraft": "${minecraft_version}"
|
"minecraft": "${minecraft_version}",
|
||||||
|
"modernui": "3.13.0.4",
|
||||||
|
"forgeconfigapiport": ">=26.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"package": "de.winniepat.parrotmod.mixin",
|
"package": "de.winniepat.parrotmod.mixin",
|
||||||
"compatibilityLevel": "JAVA_25",
|
"compatibilityLevel": "JAVA_25",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"TitleScreenMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|||||||
Reference in New Issue
Block a user