Change a few packages and fix the fabric.mod.json file

This commit is contained in:
Username404-59 2021-04-08 11:27:13 +02:00
parent f0fe913d7c
commit 6771734add
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
8 changed files with 72 additions and 4 deletions

View File

@ -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"
}

View File

@ -0,0 +1,7 @@
package fr.username404.snowygui
abstract class CommonSnow {
fun atInit() {
}
}

View File

@ -0,0 +1,10 @@
{
"required": true,
"package": "fr.username404.snowygui.mixins",
"compatibilityLevel": "JAVA_8",
"client": [],
"injectors": {
"defaultRequire": 1
},
"minVersion": "0.8"
}

View File

@ -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<Screen> {
return ConfigScreenFactory<Screen> { screen: Screen? ->
object : Screen(TranslatableComponent("snowygui.config")) { // TODO Actual config screen
override fun onClose() {
minecraft!!.setScreen(screen)
}
}
}
}
}

View File

@ -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()
}

View File

@ -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": [

View File

@ -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()
}
}

View File

@ -0,0 +1,6 @@
{
"pack":{
"pack_format":6,
"description":"SharpLapis Resources"
}
}