Overview
Preloading Tricks is a developer-only mod that enables advanced operations during the very early stage of the mod loader. It provides early hooks, Java Instrumentation-based class transformation, and SPI-driven callbacks for loader extension.
Supported environments:
- Fabric – 1.20.1, 1.21+
- Forge (LexForge) – 1.20.1
- NeoForge – 1.20.6, 1.21+
You can test on more versions since it depends on the loader version instead of the Minecraft version.
Features
-
Early loader entrypoint via
PreloadingEntrypoint(SPI-based)- Register callbacks using
PreloadingTricksCallbacksevents:SETUP_LANGUAGE_ADAPTER– early language adapter setup stageCOLLECT_MOD_CANDIDATES– dynamically add mod candidate paths before discoverySETUP_MODS– modify mod list (add/remove/query viaModManagerAPI)
- Register callbacks using
-
Instrumentation-powered
ClassTransformCan transform already-loaded classes, including Java core and classloader classes. Configure viaMANIFEST.MFon all platforms (see below). -
Forge variant detection (Forge-like only)
- Access
ForgeVariantsto detect specific Forge/NeoForge versions at runtime
- Access
Usage (Gradle)
Add the Maven repository and dependency to your build:
Kotlin DSL:
repositories {
maven("https://raw.githubusercontent.com/settingdust/maven/main/repository/")
}
dependencies {
// Recommended: use the base artifact (no classifier).
// Gradle variant matching / cloche will resolve the correct platform artifact automatically.
implementation("settingdust.preloading_tricks:PreloadingTricks:VERSION")
// Optional: pin to a specific classifier when you want to avoid accidentally using APIs
// from other platforms.
// implementation("settingdust.preloading_tricks:PreloadingTricks:VERSION:fabric")
// implementation("settingdust.preloading_tricks:PreloadingTricks:VERSION:forge-service")
// implementation("settingdust.preloading_tricks:PreloadingTricks:VERSION:neoforge-modlauncher")
// implementation("settingdust.preloading_tricks:PreloadingTricks:VERSION:neoforge-fancy-mod-loader")
}
Replace VERSION with the latest release (e.g. 3.5.9).
If you are using cloche, the corresponding variant is selected automatically based on loader/minecraft attributes.
ClassTransform Configuration
For all platforms, add the following attribute to your MANIFEST.MF:
ClassTransformConfig: xxxx.classtransform.json
Multiple configs can be specified as comma-separated values:
ClassTransformConfig: first.classtransform.json,second.classtransform.json
Example config (xxxx.classtransform.json):
{
"package": "settingdust.preloading_tricks.neoforge.transformer",
"transformers": [
"mod_setup_hook.FMLLoaderTransformer"
]
}
Forge Variant Detection (Forge-like only)
Allows a mod to load only on a specific Forge-like loader variant. This enables bundling both LexForge and NeoForge JARs together via jar-in-jar in a single mod file.
Configuration:
Specify your mod's target variant in MANIFEST.MF:
ForgeVariant: LexForge
or
ForgeVariant: NeoForge
Mods with a ForgeVariant specified will only load when running on the matching loader variant, allowing safe coexistence of variant-specific implementations.
For developers who need to reach into the earliest moments of Minecraft’s loading process.
How to Install Preloading Tricks (Mod)
Preloading Tricks by settingdust is verified for Fabric, Forge, Neoforge, Quilt across Minecraft versions 1.16.5, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3 (latest release: 3.7.3, file size: 1.7 MB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.16.5, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3) and platform (Fabric, Forge, Neoforge, Quilt).
- Make sure you have the compatible loader or environment installed for Fabric, Forge, Neoforge, Quilt.
- Move the downloaded Preloading Tricks file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
|
R
3.7.3
|
2mo ago | 4 | |||
|
R
3.7.2
|
2mo ago | 2 | |||
|
R
3.7.1
|
2mo ago | 1 | |||
|
R
3.7.0
|
2mo ago | 1 | |||
|
R
3.6.3
|
2mo ago | 1 | |||
|
R
3.6.2
|
2mo ago | 1 | |||
|
R
3.6.0
|
2mo ago | 1 | |||
|
R
3.5.15
|
2mo ago | 1 | |||
|
R
3.5.14
|
2mo ago | 1 | |||
|
R
3.5.13
|
2mo ago | 1 | |||
|
R
3.5.10
|
2mo ago | 1 | |||
|
R
3.5.9
|
2mo ago | 1 | |||
|
R
3.5.8
|
2mo ago | 1 | |||
|
R
3.5.7
|
2mo ago | 1 | |||
|
R
3.5.6
|
2mo ago | 1 | |||
|
R
3.5.5
|
2mo ago | 1 | |||
|
R
3.5.3
|
2mo ago | 1 | |||
|
R
3.5.2
|
2mo ago | 1 | |||
|
R
3.5.1
|
2mo ago | 1 | |||
|
R
3.5.0
|
2mo ago | 1 | |||
|
R
3.4.6
|
2mo ago | 1 | |||
|
R
3.4.5
|
2mo ago | 1 | |||
|
R
3.4.4
|
2mo ago | 1 | |||
|
R
3.4.3
|
2mo ago | 1 | |||
|
R
3.4.2
|
2mo ago | 1 | |||
|
R
3.4.1
|
2mo ago | 1 | |||
|
R
3.4.0
|
2mo ago | 1 | |||
|
R
3.3.5
|
2mo ago | 1 | |||
|
R
3.3.3
|
2mo ago | 1 | |||
|
R
3.3.2
|
2mo ago | 1 | |||
|
R
3.3.1
|
2mo ago | 1 | |||
|
R
3.3.0
|
2mo ago | 1 | |||
|
R
3.2.3
|
2mo ago | 1 | |||
|
R
3.2.2
|
2mo ago | 1 | |||
|
R
3.2.1
|
2mo ago | 1 | |||
|
R
3.2.0
|
2mo ago | 1 | |||
|
R
3.1.2
|
2mo ago | 1 | |||
|
R
3.1.1
|
2mo ago | 1 | |||
|
R
3.1.0
|
2mo ago | 1 | |||
|
R
3.0.0
|
2mo ago | 1 | |||
|
R
2.7.5
|
2mo ago | 1 | |||
|
R
2.7.4
|
2mo ago | 1 | |||
|
R
2.7.3
|
2mo ago | 1 | |||
|
R
2.7.2
|
2mo ago | 1 | |||
|
R
2.7.1
|
2mo ago | 1 | |||
|
R
2.7.0
|
2mo ago | 1 | |||
|
R
2.6.1
|
2mo ago | 1 | |||
|
R
2.6.0
|
2mo ago | 1 | |||
|
R
2.5.10
|
2mo ago | 1 | |||
|
R
2.5.9
|
2mo ago | 1 | |||
|
R
2.5.7
|
2mo ago | 1 | |||
|
R
2.5.6
|
2mo ago | 1 | |||
|
R
2.5.5
|
2mo ago | 1 | |||
|
R
2.5.4
|
2mo ago | 1 | |||
|
R
2.5.3
|
2mo ago | 1 | |||
|
R
2.5.2
|
2mo ago | 1 | |||
|
R
2.5.1
|
2mo ago | 1 | |||
|
R
2.5.0
|
2mo ago | 1 | |||
|
R
2.4.1
|
2mo ago | 1 | |||
|
R
2.4.0
|
2mo ago | 1 | |||
|
R
2.3.0
|
2mo ago | 1 | |||
|
R
2.2.2
|
2mo ago | 1 | |||
|
R
2.2.1
|
2mo ago | 1 | |||
|
R
2.2.0
|
2mo ago | 1 | |||
|
R
2.1.0
|
2mo ago | 1 | |||
|
R
2.0.1
|
2mo ago | 1 | |||
|
R
2.0.0
|
2mo ago | 1 | |||
|
R
1.2.3
|
2mo ago | 1 | |||
|
R
1.2.2
|
2mo ago | 1 | |||
|
R
1.2.1
|
2mo ago | 1 | |||
|
R
1.2.0
|
2mo ago | 1 | |||
|
R
1.1.0
|
2mo ago | 1 | |||
|
R
1.0.6
|
2mo ago | 1 | |||
|
R
1.0.5
|
2mo ago | 1 | |||
|
R
1.0.4
|
2mo ago | 1 | |||
|
R
1.0.3
|
2mo ago | 1 | |||
|
R
1.0.2
|
2mo ago | 1 | |||
|
R
1.0.1
|
2mo ago | 1 | |||
|
R
1.0.0
|
2mo ago | 1 | |||
|
R
0.0.14
|
2mo ago | 1 | |||
|
R
0.0.13
|
2mo ago | 1 | |||
|
R
0.0.12
|
2mo ago | 1 | |||
|
R
0.0.11
|
2mo ago | 1 | |||
|
R
0.0.10
|
2mo ago | 1 | |||
|
R
0.0.5
|
2mo ago | 1 | |||
|
R
0.0.4
|
2mo ago | 1 | |||
|
R
0.0.3
|
2mo ago | 1 | |||
|
R
0.0.1
|
2mo ago | 1 |
- [
9285f5d](https://github.com/SettingDust/preloading-tricks/commit/9285f5db5cff0f5e958e123a364eea77d32470f4) - transformer error *(commit by @SettingDust)*
- [
7c3f059](https://github.com/SettingDust/preloading-tricks/commit/7c3f05906a032cee83bff08c5c9978b3616b9b8b) - **build**: correct embed configuration attributes and resource inclusion for jar tasks *(commit by @SettingDust)*
### :recycle: Refactors
- [
3d8e46a](https://github.com/SettingDust/preloading-tricks/commit/3d8e46a3e11097341fb885cbc18835749b3fe116) - **build**: reconcile copier topology *(commit by @SettingDust)*
- [
6bc4e54](https://github.com/SettingDust/preloading-tricks/commit/6bc4e54d8bdf25b2b60ede84312439eeefc15879) - add NeoForgeAdapter to use right java version on older NF *(commit by @SettingDust)*
- [
155757b](https://github.com/SettingDust/preloading-tricks/commit/155757b45540625866043148cedda3e96ad5f90f) - wrong resolver transformer 2 *(commit by @SettingDust)*
- [
dd19a79](https://github.com/SettingDust/preloading-tricks/commit/dd19a79944a2110d8f39a26b6668b97fec2df997) - wrong resolver transformer *(commit by @SettingDust)*
- [
80ece07](https://github.com/SettingDust/preloading-tricks/commit/80ece0783e5514de4239baacb8c6b42311a113b4) - restore module injector api files *(commit by @SettingDust)*
### :recycle: Refactors
- [
089c55e](https://github.com/SettingDust/preloading-tricks/commit/089c55e6f54e9855d87bdda6be9fcd9d8c8dd4da) - restore build topology after copier update *(commit by @SettingDust)* - [
03196c6](https://github.com/SettingDust/preloading-tricks/commit/03196c6fe0b5dc3e29378e64acbf1f8fc9fde5f5) - obsolete NeoForge callback artifacts *(commit by @SettingDust)* - [
9f25b22](https://github.com/SettingDust/preloading-tricks/commit/9f25b2229375b4a35f75df1884ef84eb7ec74aef) - share list-backed mod manager logic *(commit by @SettingDust)* - [
4c719ff](https://github.com/SettingDust/preloading-tricks/commit/4c719ff9b17791fdc11014153f950f7ac9ebe7bd) - restructure sources into api core shared platform targets *(commit by @SettingDust)* - [
058d9ef](https://github.com/SettingDust/preloading-tricks/commit/058d9ef06864573f9cce46c35fb6ff9c07a6d642) - extract shared target/version constants in build script *(commit by @SettingDust)* - [
caaf03e](https://github.com/SettingDust/preloading-tricks/commit/caaf03ea82be09de76d084fac9f6230b7c9823cd) - deduplicate neoforge dependency excludes and rename run regions *(commit by @SettingDust)* - [
eec2d95](https://github.com/SettingDust/preloading-tricks/commit/eec2d9502958ef5ab2e09c686c91da0514532710) - extract run target MOD_CLASSES env setup *(commit by @SettingDust)* - [
5a8bc34](https://github.com/SettingDust/preloading-tricks/commit/5a8bc34f1b56a14e849417b5190a6a857710cf34) - align forge modlauncher package naming *(commit by @SettingDust)* - [
ae282c0](https://github.com/SettingDust/preloading-tricks/commit/ae282c0d536d32d608c14a782819f14b0043c457) - remove unused entrypoint and module injector leftovers *(commit by @SettingDust)*
### :wrench: Chores
- [
ee23367](https://github.com/SettingDust/preloading-tricks/commit/ee23367c06c817d390089b7c8ad674fe040c8f42) - copier update checkpoint B *(commit by @SettingDust)* - [
5a333b4](https://github.com/SettingDust/preloading-tricks/commit/5a333b401a4f904cd266b40048a39d884f128d89) - **plans**: add copier update execution artifacts and reconciliation gates *(commit by @SettingDust)* - [
83bd560](https://github.com/SettingDust/preloading-tricks/commit/83bd56075c5dee3252863fa4beca8aab4b145dbe) - remove obsolete copier gate and NeoForge 21.10 setup *(commit by @SettingDust)* - [
6757863](https://github.com/SettingDust/preloading-tricks/commit/675786300d4324b35128561b7b35aef071fef642) - remove plans *(commit by @SettingDust)* - [
0a66459](https://github.com/SettingDust/preloading-tricks/commit/0a66459345b486d10ea5dbbeefe4fbc288dc78b4) - remove unused files *(commit by @SettingDust)*
- [
af9ee68](https://github.com/SettingDust/preloading-tricks/commit/af9ee68c1ef83621abf771a92a1281e3f87426ba) - build output duplicated classes *(commit by @SettingDust)*
- [
60cc575](https://github.com/SettingDust/preloading-tricks/commit/60cc57538057e2f625702d022155a69a5900a8c9) - resolver transformer passing wrong arg *(commit by @SettingDust)*
- [
9bcfc60](https://github.com/SettingDust/preloading-tricks/commit/9bcfc60111fe943bf4cd461bf7eb57e1b4dbdc14) - **fabric**: dump duplicate jar info *(commit by @SettingDust)*
- [
2091c14](https://github.com/SettingDust/preloading-tricks/commit/2091c14f8716a1f5ebfb20cf138b88ba882cc94b) - avoid exit directly when failing to transform *(commit by @SettingDust)*
- [
94d0850](https://github.com/SettingDust/preloading-tricks/commit/94d0850e155820b2dfa107e4d6a6a8f1dd4c584b) - try to fix failing to transform resolver & bump class transform *(commit by @SettingDust)*
- [
b3e9059](https://github.com/SettingDust/preloading-tricks/commit/b3e9059f0e9a8c42e3de697edc6c5d726ce2a43f) - **neoforge/modlauncher**: additionalDependencySources isn't working *(commit by @SettingDust)*
- [
07d49a8](https://github.com/SettingDust/preloading-tricks/commit/07d49a8b5b9999f7a0209fc54bcc4dd5ff5887ea) - find the module from layer first *(commit by @SettingDust)*
- [
8fc2bea](https://github.com/SettingDust/preloading-tricks/commit/8fc2bea0902de1a5ba7b3c502af158dd70a6a087) - concurrent modification exception when modifying graph *(commit by @SettingDust)*