
[DISCLAIMER] This was originally a dumb idea I had and built for self use and to learn more about PKL runtime and JVM. If it's useful to you too, great.
Brings the PKL language as a JSON replacement to Minecraft for mod and modpack creators.
What the hell is PKL?
PKL is a configuration language by Apple, which has type-safetines, autocompletion, validation and schemas.
With pkl4mc you can create any vanilla datapack in PKL instead of JSON. Which brings a consistent sytax for mod support and error caughting in your ide instead of the game log (lol).
Unlike KubeJS, pkl4mc is NOT a scripting mod, it is a typed data format, where everything is reloadable at runtime with /pkl reload. This also shows up in reload times:
Both mods had the same 100 recipes, including adding, removing, replacing (input and output).
| recipe step per reload (median) | |
|---|---|
| pkl4mc | ~ 7–9 ms |
| KubeJS (2001.6.5 + Rhino) | ~ 30–65 ms |
And to be fair KubeJS is doing way more than recipes. If you need scripting logic, use KubeJS. If you need typed, fast, reloadable data, use pkl4mc.
Who is the Project for?
Probably for modpack and datapack devs, who wanna have autocmpletion and typecheking instead of guessing, or maybe hate JSON for some reason (a camp I'm in too).
For modpack devs with companion mods, who just want a better workflow for recipe adjustments and unifications (another camp I'm in too).
Also for mod devs who wanna depend on pkl4mc as a library and load typed configs via PklConfig.load<T>(), or register their own schemas (You can guess it).
Dependencies
- Currently only mc.20.1 and Forge
- Kotlin for Forge
- pkl-core (Already included inside the jar fyi)
For Dev
- pkl CLI
- pkl-vscode
- pkl-lsp insert my fork here
Installation
thats just a placeholder gif for now 
Example
Here is a smelting recipe in JSON:
{
"type": "minecraft:smelting",
"category": "misc",
"ingredient": { "item": "minecraft:sea_pickle" },
"result": "nothingcore:cooked_sea_pickle",
"experience": 0.7,
"cookingtime": 200
}
And here in PKL:
amends "@pkl4mc/recipes.pkl"
smelting {
new {
name = "example_smelting"
category = "misc"
input { item = "minecraft:sea_pickle" }
output { item = "othingcore:cooked_sea_pickle" }
experience = 0.7
cookingTime = 200
}
}
How to get help
There are docs in progress (like KubeJS LOL): docs.nothingseries.org and also examples for each mod integration.
If something is missing pls make a issue on the issue tracker.
If you need help join the Nothing Series Hub and make a ticket or ask in the support channel.
Contributing
Currently the most useful contribution is bug reporting and schema creation for a mods that doesn't have one yet.
License
- OSL-3.0 (pkl4mc)
- Apache 2.0 (pkl-core)
Feel free to use this badges in your modpacks or mods.


