generated from Polyfrost/OneConfigExampleMod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port to Legacy Fabric, update OneConfig, etc.
- Loading branch information
Showing
10 changed files
with
98 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
src/main/java/org/polyfrost/colorsaturation/ColorSaturation.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/kotlin/org/polyfrost/colorsaturation/ColorSaturation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.polyfrost.colorsaturation | ||
|
||
//#if FORGE | ||
import net.minecraftforge.fml.common.Mod | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent | ||
//#else | ||
//$$ import net.fabricmc.api.ClientModInitializer | ||
//#endif | ||
|
||
import org.polyfrost.colorsaturation.command.SaturationCommand | ||
import org.polyfrost.colorsaturation.config.SaturationConfig | ||
import org.polyfrost.oneconfig.api.commands.v1.CommandManager | ||
import org.polyfrost.oneconfig.api.event.v1.EventManager | ||
|
||
//#if FORGE | ||
@Mod(modid = ColorSaturation.ID, version = ColorSaturation.VERSION, name = ColorSaturation.NAME, modLanguageAdapter = "org.polyfrost.oneconfig.utils.v1.forge.KotlinLanguageAdapter") | ||
//#endif | ||
object ColorSaturation | ||
//#if FABRIC | ||
//$$ : ClientModInitializer | ||
//#endif | ||
{ | ||
|
||
const val ID = "@MOD_ID@" | ||
const val NAME = "@MOD_NAME@" | ||
const val VERSION = "@MOD_VERSION@" | ||
|
||
@JvmStatic | ||
lateinit var config: SaturationConfig | ||
private set | ||
|
||
fun initialize() { | ||
config = SaturationConfig() | ||
CommandManager.registerCommand(SaturationCommand()) | ||
EventManager.INSTANCE.register(Saturation()) | ||
} | ||
|
||
//#if FORGE | ||
@Mod.EventHandler | ||
fun onInit(e: FMLInitializationEvent) { | ||
initialize() | ||
} | ||
//#else | ||
//$$ override fun onInitializeClient() { | ||
//$$ initialize() | ||
//$$ } | ||
//#endif | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "${mod_id}", | ||
"version": "${mod_version}", | ||
"name": "${mod_name}", | ||
"authors": [ | ||
"Polyfrost" | ||
], | ||
"contact": { | ||
"issues": "https://github.com/Polyfrost/${mod_name}/issues", | ||
"sources": "https://github.com/Polyfrost/${mod_name}" | ||
}, | ||
"license": "GPL-3.0-or-later", | ||
"environment": "*", | ||
"entrypoints": { | ||
"client": [ | ||
{ | ||
"adapter": "kotlin", | ||
"value": "org.polyfrost.colorsaturation.ColorSaturation" | ||
} | ||
] | ||
}, | ||
"mixins": [ | ||
"mixins.${mod_id}.json" | ||
], | ||
"depends": { | ||
"fabricloader": ">=0.15.11", | ||
"fabric-language-kotlin": "*" | ||
} | ||
} |