We have a basic menu this is half the battle
This commit is contained in:
@@ -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.**
|
||||
|
||||
20
build.gradle
20
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 {
|
||||
|
||||
@@ -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
|
||||
fabric_version=0.97.1+1.20.4
|
||||
cloth-config_version=13.0.121+fabric
|
||||
modmenu_version=9.0.0
|
||||
38
src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt
Normal file
38
src/client/kotlin/chickenmanfy/scify/Modules/Menu.kt
Normal file
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"links": {
|
||||
"Discord": "https://discord.gg/yhw4ajkCu8"
|
||||
"Discord": "https://discord.gg/4vyxZgH9xu"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user