A full Java inter-op library for Minecraft mod settings. Built using Elementa, this library provides a simple and clean configuration menu and an easy-to-use setting declaration system.
repository {
// All versions of Vigilance and UniversalCraft are published to Essential's public maven repository.
// (if you're still using Groovy build scripts, replace `()` with `{}`)
maven(url = "https://repo.essential.gg/repository/maven-public")
}
dependencies {
// Add Vigilance dependency. For the latest $vigilanceVersion, see the badge below this code snippet.
implementation("gg.essential:vigilance:$vigilanceVersion")
// Vigilance itself is independent of Minecraft versions and mod loaders, instead it depends on UniversalCraft which
// provides bindings to specific Minecraft versions.
// As such, you must include the UniversalCraft version for the Minecraft version + mod loader you're targeting.
// For a list of all available platforms, see https://github.com/EssentialGG/UniversalCraft
// For your convenience, the latest $ucVersion is also included in a badge below this code snippet.
// (Note: if you are not using Loom, replace `modImplementation` with `implementation` or your equivalent)
modImplementation("gg.essential:universalcraft-1.8.9-forge:$ucVersion")
// If you're using Fabric, you may use its jar-in-jar mechanism to bundle Vigilance and UniversalCraft with your
// mod by additionally adding them to the `include` configuration like this (in place of the above):
implementation(include("gg.essential:vigilance:$vigilanceVersion")!!)
modImplementation(include("gg.essential:universalcraft-1.8.9-forge:$ucVersion"))
// If you're using Forge, you must instead include them directly into your jar file and relocate them to your
// own package (this is important! otherwise you will be incompatible with other mods!)
// using e.g. https://gradleup.com/shadow/configuration/relocation/
// For an example, read the IMPORTANT section below.
}
If you are using Forge, you must also relocate Vigilance to avoid incompatibility with other mods. To do this, you may use the Shadow Gradle plugin.
For examples of how to use Vigilance, refer to the example
sub-project within Vigilance for
annotation style
and DSL style
You can run the examples via ./gradlew :example:run
.