|
All checks were successful
Build / build (push) Successful in 2m55s
|
||
|---|---|---|
| .forgejo/workflows | ||
| build_logic | ||
| fabric | ||
| gradle | ||
| neoforge | ||
| templates | ||
| xplat | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| build.gradle.kts | ||
| CHANGELOG.md | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
Greenhouse Config
The most overengineered config library out there!
Greenhouse Config is a config library pretty much made for myself (ChrysanthCow), and anyone within Greenhouse.
Featuring a rich config builder system, it utilizes Codecs/DFU to write and read config files, as well as being able to data-fix when out of date.
Greenhouse Config supports the following configuration languages through Polyamory...
* - Should typically not be used in configs, use JSONC instead if possible.
Depending on the Library
When depending on Greenhouse Config, please make sure to include the mod inside your JAR. This is simply to avoid making users have to download a separate dependency just to play with your mod.
The below is for Kotlin DSL, you will need to adjust this for Groovy DSL.
repositories {
maven {
name = "Greenhouse Maven"
url = "https://maven.greenhouse.lgbt/releases"
}
}
val mappingsAttribute = Attribute.of("net.minecraft.mappings", String::class.java)
dependencies {
// Depend on the Cross-Platform API...
// For ModDevGradle, NeoGradle and any other Gradle toolchains that use Mojang Mappings at runtime.
compileOnly("lgbt.greenhouse.config:greenhouse-config-api:${greenhouse_config_version}") {
attributes {
attribute(mappingsAttribute, "mojmap")
}
}
// For Loom and any other Gradle toolchains that use Intermediary at runtime.
modCompileOnly("lgbt.greenhouse.config:greenhouse-config-api:${greenhouse_config_version}") {
attributes {
attribute(mappingsAttribute, "intermediary")
}
}
// Depend on the Fabric project, for Loom.
modRuntimeOnly("lgbt.greenhouse.config:greenhouse-config-fabric:${greenhouse_config_version}")
include("lgbt.greenhouse.config:greenhouse-config-fabric:${greenhouse_config_version}")
// Depend on the NeoForge project, for ModDevGradle.
runtimeOnly("lgbt.greenhouse.config:greenhouse-config-neoforge:${greenhouse_config_version}")
jarJar("lgbt.greenhouse.config:greenhouse-config-neoforge:${greenhouse_config_version}")
}
greenhouse_config_version = 3.0.0+1.21.11
Have you seen that one XKCD comic about standards?
Quoted from kdl.dev.
Yes. I have. Please stop linking me to it.
Greenhouse Config is not meant to be a standard, it's simply my own methodology for doing configuration which I separated from my own mods to avoid having duplicate code across them.
At the end of the day, you should mod with tools you enjoy using, whether it be Greenhouse Config or something else.