mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-16 17:25:09 +01:00
Compare commits
2 Commits
d954b32461
...
84fc1d0d24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84fc1d0d24 | ||
|
|
0d2c952a54 |
@@ -1,14 +0,0 @@
|
|||||||
package eu.midnightdust.lib.util;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
|
|
||||||
public class MidnightColorUtil {
|
|
||||||
/**
|
|
||||||
* @param colorStr e.g. "FFFFFF" or "#FFFFFF"
|
|
||||||
* @return Color as RGB
|
|
||||||
*/
|
|
||||||
public static Color hex2Rgb(String colorStr) {
|
|
||||||
try { return Color.decode("#" + colorStr.replace("#", ""));
|
|
||||||
} catch (Exception ignored) { return Color.BLACK; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "testmod",
|
"id": "modid",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
|
|
||||||
"name": "MidnightLib Example",
|
"name": "MidnightLib Test Mod",
|
||||||
"description": "Wow, you can do so much.",
|
"description": "Example Mod for Team MidnightDust's mods.",
|
||||||
"authors": [ "MidnightDust" ],
|
"authors": [ "MidnightDust" ],
|
||||||
|
|
||||||
"license": "CC0",
|
"license": "CC0",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ loom {
|
|||||||
create('midnightlib') {
|
create('midnightlib') {
|
||||||
sourceSet sourceSets.main
|
sourceSet sourceSets.main
|
||||||
}
|
}
|
||||||
create('testmod') {
|
create('modid') { // test mod
|
||||||
sourceSet sourceSets.test
|
sourceSet sourceSets.test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ package eu.midnightdust.test.neoforge;
|
|||||||
import eu.midnightdust.test.config.MidnightConfigExample;
|
import eu.midnightdust.test.config.MidnightConfigExample;
|
||||||
import net.neoforged.fml.common.Mod;
|
import net.neoforged.fml.common.Mod;
|
||||||
|
|
||||||
@Mod("testmod")
|
@Mod(MLExampleNeoForge.MODID)
|
||||||
public class MLExampleNeoForge {
|
public class MLExampleNeoForge {
|
||||||
|
public static final String MODID = "modid";
|
||||||
public MLExampleNeoForge() {
|
public MLExampleNeoForge() {
|
||||||
MidnightConfigExample.init("modid", MidnightConfigExample.class);
|
MidnightConfigExample.init(MODID, MidnightConfigExample.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,29 +4,29 @@ loaderVersion = "[2,)"
|
|||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "testmod"
|
modId = "modid"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
displayName = "Example Mod"
|
displayName = "MidnightLib Test Mod"
|
||||||
authors = "TeamMidnightDust, Motschen"
|
authors = "TeamMidnightDust, Motschen"
|
||||||
description = '''
|
description = '''
|
||||||
Example Mod for Team MidnightDust's mods.
|
Example Mod for Team MidnightDust's mods.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
[[dependencies.modid]]
|
||||||
modId = "neoforge"
|
modId = "neoforge"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "[20.5,)"
|
versionRange = "[20.5,)"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
[[dependencies.modid]]
|
||||||
modId = "minecraft"
|
modId = "minecraft"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "[1.20.5,)"
|
versionRange = "[1.20.5,)"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
[[dependencies.modid]]
|
||||||
modId = "midnightlib"
|
modId = "midnightlib"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "[1.0,)"
|
versionRange = "[1.0,)"
|
||||||
|
|||||||
Reference in New Issue
Block a user