Depending on pkl4mc
pkl4mc publishes to CurseForge. The easiest Gradle dependency is CurseMaven:
repositories {
maven("https://cursemaven.com")
}
dependencies {
// project id 1548885; pick the file id of the version you target
implementation(fg.deobf("curse.maven:pkl4mc-1548885:<file-id>"))
}And in mods.toml:
[[dependencies.yourmod]]
modId = "pkl4mc"
mandatory = true
ordering = "AFTER"
side = "BOTH"pkl-core is shaded and relocated inside pkl4mc. Your mod never touches ANTLR or pkl-core classpath issues, and you must not add pkl-core yourself.
Versioning
Two independent version lines exist. Don’t mix them up:
| Artifact | Example | What it versions |
|---|---|---|
Mod jar (v* tags, CurseForge) | 0.10.0 | the Forge mod your code depends on |
PKL schema package (pkl4mc@* tags, GitHub releases) | package://pkg.pkl-lang.org/github.com/Akoto090/pkl4mc/pkl4mc | the schemas, consumable from plain PKL projects outside Minecraft |
In-game, @pkl4mc/ always resolves to the schemas bundled in the installed mod jar. No package pinning involved. The published PKL package only matters when evaluating files with the standalone pkl CLI or in external tooling.