diff --git a/README.md b/README.md index 3cf7a56..858b9c0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ I then remembered when one of my friends (BearCat865) suggested making a Dungeon --- # Roadmap _Currently in super beta so don't expect something working for a while._ -- Right shift menu to enable and disable mods (12%) +- Right shift menu to enable and disable mods (50%) - Health & Food bars replaced with dynamic bar similar to EXP bar (0%) - Custom GUIs (0%) - Built-in guide (CANCELED) **This feature is being worked on in a different mod called "Mythicfy", so it will not be added to this one. We recommend you download that mod.** diff --git a/build.gradle b/build.gradle index 7728fe3..b78da24 100644 --- a/build.gradle +++ b/build.gradle @@ -14,11 +14,12 @@ base { } repositories { - // Add repositories to retrieve artifacts from in here. - // You should only use this when depending on other mods because - // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. - // See https://docs.gradle.org/current/userguide/declaring_repositories.html - // for more information about repositories. + maven { url "https://maven.shedaniel.me/" } + maven { url "https://maven.terraformersmc.com/releases/" } + maven { + name = "Terraformers" + url = "https://maven.terraformersmc.com/" + } } loom { @@ -42,6 +43,15 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" + + // Cloth Config + modApi("me.shedaniel.cloth:cloth-config-fabric:13.0.121") { + exclude(group: "net.fabricmc.fabric-api") + } + + + // Mod Menu + modImplementation("com.terraformersmc:modmenu:9.0.0") } processResources { diff --git a/gradle.properties b/gradle.properties index 13942a6..c830d2a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,13 +13,12 @@ yarn_mappings=1.20.4+build.3 loader_version=0.15.11 fabric_kotlin_version=1.11.0+kotlin.2.0.0 -# yeah -modmenu_version=9.0.0 - # Mod Properties mod_version=1.0.0 maven_group=chickenmanfy.scify archives_base_name=scify # Dependencies -fabric_version=0.97.1+1.20.4 \ No newline at end of file +fabric_version=0.97.1+1.20.4 +cloth-config_version=13.0.121+fabric +modmenu_version=9.0.0 \ No newline at end of file diff --git a/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt b/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt new file mode 100644 index 0000000..22de8e5 --- /dev/null +++ b/src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt @@ -0,0 +1,38 @@ +package chickenmanfy.scify.Modules + +import net.fabricmc.api.EnvType +import net.fabricmc.api.Environment +import net.minecraft.client.gui.screen.Screen +import net.minecraft.client.gui.tooltip.Tooltip +import net.minecraft.client.gui.widget.ButtonWidget +import net.minecraft.text.Text + +@Environment(EnvType.CLIENT) +class Menu : Screen(Text.literal("My tutorial screen")) { + var button1: ButtonWidget? = null + var button2: ButtonWidget? = null + + init { + // The parameter is the title of the screen, + // which will be narrated when you enter the screen. + } + + + public override fun init() { + button1 = ButtonWidget.builder(Text.literal("Button 1")) { button: ButtonWidget? -> + println("You clicked button1!") + } + .dimensions(width / 2 - 205, 20, 200, 20) + .tooltip(Tooltip.of(Text.literal("Tooltip of button1"))) + .build() + button2 = ButtonWidget.builder(Text.literal("Button 2")) { button: ButtonWidget? -> + println("You clicked button2!") + } + .dimensions(width / 2 + 5, 20, 200, 20) + .tooltip(Tooltip.of(Text.literal("Tooltip of button2"))) + .build() + + addDrawableChild(button1) + addDrawableChild(button2) + } +} \ No newline at end of file diff --git a/src/client/kotlin/chickenmanfy/scify/SciFyClient.kt b/src/client/kotlin/chickenmanfy/scify/SciFyClient.kt index 0fabd88..0fc8b1c 100644 --- a/src/client/kotlin/chickenmanfy/scify/SciFyClient.kt +++ b/src/client/kotlin/chickenmanfy/scify/SciFyClient.kt @@ -1,5 +1,6 @@ package chickenmanfy.scify +import chickenmanfy.scify.Modules.Menu import net.fabricmc.api.ClientModInitializer import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper @@ -8,7 +9,7 @@ import net.minecraft.client.option.KeyBinding import net.minecraft.client.util.InputUtil import net.minecraft.text.Text import org.lwjgl.glfw.GLFW -import chickenmanfy.scify.Modules.autowelcome + object SciFyClient : ClientModInitializer { @@ -25,9 +26,8 @@ object SciFyClient : ClientModInitializer { while (menu.wasPressed()) { // Debug client.player!!.sendMessage(Text.literal("Button input received."), true) - + MinecraftClient.getInstance().setScreen(Menu()) } }) - autowelcome() } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 5468bce..6b69eec 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -58,8 +58,8 @@ "custom": { "modmenu": { "links": { - "Discord": "https://discord.gg/yhw4ajkCu8" + "Discord": "https://discord.gg/4vyxZgH9xu" } } } -} \ No newline at end of file +}