pkl4mc
Brings the PKL language as a JSON replacement to Minecraft for mod and modpack creators.
介绍

[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. Btw I also used Gemini for bugfixing and planning, so kill me for that.
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)
- codecui (Only in the neoforge build already included)
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 = "nothingcore: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)
- MIT ( codecui )
Feel free to use this badges in your modpacks or mods.

常见问题
pkl4mc 支持哪些 Minecraft 版本?
pkl4mc 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
pkl4mc 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Akoto090 的其他作品
查看全部 →Better F1 Renewed
新增一种 F1 显示模式,隐藏 HUD,同时保留手持物品的显示。
Universal Circuits
适用于 GregTech 的独立通用电路,灵感来自 Nomifactory 和 Monifactory。
The LOTR Pack II
A new Lord Of The Rings like modpack with a high performance boost. All based on the lotr mod.
TIAB GTM Compat
Makes the Time in a Bottle tick-acceleration work correctly with GregTech (CEu) Modern machines.
评论
登录后评论和评分