DragonLib is a multiloader Minecraft library created by MrJulsen and built on top of Architectury API. It offers many useful tools, abstraction layers, and its own systems to simplify modding in Minecraft between different modloaders and versions.
If you are developer and find the features useful, you can use it if you want. However, I cannot guarantee that everything will work as expected and will be supported in newer versions! Below there is a small tutorial on how to add this library as a dependency to your Forge Mod.
| Minecraft Version | Latest DragonLib Version |
|---|---|
| 1.20.1 | 2.2.19 |
You can find all available major versions of DragonLib on CurseForge or Modrinth.
repositories {
maven { // DragonLib
name = "MrJulsen's Mod Resources"
url = "https://raw.githubusercontent.com/MisterJulsen/modsrepo/main/maven"
}
maven {
name = "Architectury API"
url "https://maven.architectury.dev/"
}
}
dependencies {
implementation("de.mrjulsen.mcdragonlib:dragonlib-forge:<MINECRAFT_VERSION>-<DRAGONLIB_VERSION>")
}As the project is based on Architectury API, you also need its repository.
[[dependencies.<YOUR_MODID>]]
modId="dragonlib"
mandatory=true
versionRange="[<MINECRAFT_VERSION>,<NAXT_MAJOR_MINECRAFT_VERSION>)"
ordering="NONE"
side="BOTH"1. First download an Architecury Template and import it as gradle project.
allprojects {
repositories {
maven { // DragonLib
name = "MrJulsen's Mod Resources"
url = "https://raw.githubusercontent.com/MisterJulsen/modsrepo/main/maven"
}
maven { // Forge Config Api (required for fabric version of DragonLib)
name = "Fuzs Mod Resources"
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
}
}
}3. Add the following line to all build.gradle files of all your sub-projects (forge, fabric, common).
Replace <LOADER> with the specific loader (e.g. forge) and use fabric in your common project.
dependencies {
modApi("de.mrjulsen.mcdragonlib:dragonlib-<LOADER>:<MINECRAFT_VERSION>-<DRAGONLIB_VERSION>")
}[[dependencies.<YOUR_MODID>]]
modId="dragonlib"
mandatory=true
versionRange="[<MINECRAFT_VERSION>,<NAXT_MAJOR_MINECRAFT_VERSION>)"
ordering="NONE"
side="BOTH"If you encounter errors when trying to start Minecraft from your development environment, it is necessary to remap the mixin refmap. Add the following code to each run configuration block.
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"For example: Your client run configuration should look something like this:
minecraft {
runs {
client {
// ...
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
// ...
}
}
}


