TLModLoader is a lightweight modding platform for TLauncher.
It adds a modern mod-loading environment to TLauncher while remaining lightweight and dependency-free from any specific mod ecosystem. It supports Sponge Mixin, Fabric Access Wideners, runtime bytecode transformers (coremods), nested JARs, and automatic dependency resolution.
The goal is to provide a simple but powerful API that allows developers to extend TLauncher without modifying TLauncher itself.
- Sponge Mixin support
- MixinExtras support
- Fabric Access Widener support
- Runtime coremods (ASM transformers)
- Nested JAR (Jar-in-Jar) loading
- Automatic dependency loading
- Wildcard dependency resolution
- Cross-platform installer
- No modifications required to mod JARs
- Public Domain (Unlicense)
Download the latest TLModLoader release.
Run:
java -jar tlmodloader.jarSelect your TLauncher installation.
The installer will automatically locate installations on:
%APPDATA%\tlauncher
~/.tlauncher
~/Library/Application Support/tlauncher
Click Install.
The installer will:
- Patch
dependencies.json - Patch
appConfig.json - Download required libraries
- Install TLModLoader
- Configure TLauncher to launch through the wrapper
No manual editing is required.
Create a folder named:
mods
in the same directory as the TLauncher executable.
Place mod JARs inside:
mods/
ExampleMod.jar
MyMod.jar
Restart TLauncher.
TLModLoader will automatically discover and load every valid mod.
A TLModLoader mod is simply a JAR file containing a tlmod.json.
Example:
ExampleMod.jar
│
├── tlmod.json
├── example.mixins.json
├── example.accesswidener
└── com/
└── example/
└── ExampleMod.class
Example:
{
"id": "examplemod",
"version": "1.0.0",
"entrypoints": [
"com.example.ExampleMod"
],
"mixins": [
"example.mixins.json"
],
"accessWideners": [
"example.accesswidener"
],
"coremods": [
"com.example.ExampleTransformer"
],
"dependencies": [
"${APP_DIR}/libs/*.jar"
]
}All fields are optional except:
idversion
Entrypoints are invoked after Mixin initialisation.
Example:
public class ExampleMod {
public static void init() {
System.out.println("Hello from TLModLoader!");
}
}The method must be:
public static void init()Mixin configuration files are registered automatically.
Simply include them in tlmod.json.
Example:
"mixins": [
"example.mixins.json"
]No additional bootstrap code is required.
MixinExtras is initialized automatically.
TLModLoader supports Fabric Access Wideners.
Example:
"accessWideners": [
"example.accesswidener"
]Access wideners are applied before Mixins are processed.
Coremods allow arbitrary bytecode transformation before Mixins.
Create a class implementing:
public interface ICoremodTransformer {
byte[] transform(String className, byte[] classBytes);
}Then register it:
"coremods": [
"com.example.ExampleTransformer"
]Transformers execute before Mixins.
Mods may specify additional classpath dependencies.
Example:
"dependencies": [
"${HOME_DIR}/libs/example.jar"
]or
"dependencies": [
"${APP_DIR}/libs/*.jar"
]or
"dependencies": [
"${APP_DIR}/plugins/**/*.jar"
]Supported macros:
${HOME_DIR}${APP_DIR}
Supported wildcards:
**.jar**
Nested JARs located inside:
META-INF/jars/
are also loaded automatically.
TLModLoader initializes in the following order:
- Discover mods
- Load nested JARs
- Resolve dependency JARs
- Extend the runtime classpath
- Apply Access Wideners
- Register coremods
- Initialize Sponge Mixin
- Initialize MixinExtras
- Register mixin configurations
- Invoke mod entrypoints
- Launch TLauncher
A TLModLoader mod is simply a normal Java library.
Recommended dependencies:
implementation("org.spongepowered:mixin:0.15.0")
implementation("com.github.llamalad7:mixinextras:0.4.1")
implementation("net.fabricmc:access-widener:2.1.1")Package your compiled classes together with:
tlmod.json- Mixins (optional)
- Access Widener (optional)
Build the JAR and place it in the mods folder.
Clone:
git clone git@github.com:TLauncherModding/tlmodloader.gitBuild:
./gradlew buildThe installer JAR will be produced in:
build/libs/
This project is released into the Public Domain under The Unlicense.
You may use, modify, distribute, sell, sublicense, or incorporate this software into any project without restriction or attribution, although attribution is appreciated.