diff --git a/common/build.gradle.kts b/common/build.gradle.kts index c22517d..c84dae9 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,12 +1,20 @@ architectury { common() } +repositories { + maven { + name = "SpongePowered" + url = uri("https://repo.spongepowered.org/repository/maven-public/") + } +} dependencies { + compileOnly("org.spongepowered:mixin:0.8-SNAPSHOT") mappings(loom.officialMojangMappings()) } + loom { silentMojangMappingsLicense() - mixinConfig("sharplapis-mixins.json") - refmapName = "sharplapis-common-refmap.json" + mixinConfig("snowygui-mixins.json") + refmapName = "snowygui-common-refmap.json" } diff --git a/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt b/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt new file mode 100644 index 0000000..a358e46 --- /dev/null +++ b/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt @@ -0,0 +1,7 @@ +package fr.username404.snowygui + +abstract class CommonSnow { + fun atInit() { + + } +} \ No newline at end of file diff --git a/common/src/main/resources/snowygui-mixins.json b/common/src/main/resources/snowygui-mixins.json new file mode 100644 index 0000000..6a4df93 --- /dev/null +++ b/common/src/main/resources/snowygui-mixins.json @@ -0,0 +1,10 @@ +{ + "required": true, + "package": "fr.username404.snowygui.mixins", + "compatibilityLevel": "JAVA_8", + "client": [], + "injectors": { + "defaultRequire": 1 + }, + "minVersion": "0.8" +} \ No newline at end of file diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt new file mode 100644 index 0000000..ca04a3d --- /dev/null +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/ModMenuConf.kt @@ -0,0 +1,18 @@ +package fr.username404.snowygui.fabric + +import com.terraformersmc.modmenu.api.ConfigScreenFactory +import com.terraformersmc.modmenu.api.ModMenuApi +import net.minecraft.client.gui.screens.Screen +import net.minecraft.network.chat.TranslatableComponent + +class ModMenuConf: ModMenuApi { + override fun getModConfigScreenFactory(): ConfigScreenFactory { + return ConfigScreenFactory { screen: Screen? -> + object : Screen(TranslatableComponent("snowygui.config")) { // TODO Actual config screen + override fun onClose() { + minecraft!!.setScreen(screen) + } + } + } + } +} \ No newline at end of file diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/fabricInit.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/fabricInit.kt new file mode 100644 index 0000000..cbf6a1b --- /dev/null +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/fabricInit.kt @@ -0,0 +1,8 @@ +package fr.username404.snowygui.fabric + +import fr.username404.snowygui.CommonSnow +import net.fabricmc.api.ClientModInitializer + +class fabricInit: CommonSnow(), ClientModInitializer { + override fun onInitializeClient() = atInit() +} \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index b3910b6..f4ddbfa 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -18,10 +18,10 @@ "environment": "client", "entrypoints": { "client": [ - "fr.username404.snowygui.main.SharpLapis" + "fr.username404.snowygui.fabric.FabricInitKt" ], "modmenu": [ - "fr.username404.snowygui.main.ModMenuSupport" + "fr.username404.snowygui.fabric.ModMenuConfKt" ] }, "mixins": [ diff --git a/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt b/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt new file mode 100644 index 0000000..20d4005 --- /dev/null +++ b/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt @@ -0,0 +1,11 @@ +package fr.username404.snowygui.forge + +import fr.username404.snowygui.CommonSnow +import net.minecraftforge.fml.common.Mod + +@Mod("snowygui") +class ForgeInit: CommonSnow() { + init { + atInit() + } +} \ No newline at end of file diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..fd8d2ea --- /dev/null +++ b/forge/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack":{ + "pack_format":6, + "description":"SharpLapis Resources" + } +} \ No newline at end of file