Mineuniverse
Log in Register
Mods

Preloading Tricks

A developer tool for early loader access, class transformation, and preloading hacks.
by settingdust
Download Claim this project
1,133,106 downloads
0 likes
Updated Jun 30, 2026
0 hypes

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 PreloadingTricksCallbacks events:
      • SETUP_LANGUAGE_ADAPTER – early language adapter setup stage
      • COLLECT_MOD_CANDIDATES – dynamically add mod candidate paths before discovery
      • SETUP_MODS – modify mod list (add/remove/query via ModManager API)
  • Instrumentation-powered ClassTransform Can transform already-loaded classes, including Java core and classloader classes. Configure via MANIFEST.MF on all platforms (see below).

  • Forge variant detection (Forge-like only)

    • Access ForgeVariants to detect specific Forge/NeoForge versions at runtime

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.

3.7.3
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-06-29 Get
3.7.1
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-26 Get
3.7.2
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-26 Get
3.7.0
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-24 Get
3.6.2
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-21 Get
3.6.3
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-21 Get
3.6.1
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-20 Get
3.6.0
MC Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-11 Get
3.5.15
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-09 Get
3.5.14
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-08 Get
3.5.13
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-05-01 Get
3.5.10
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2
Release 2026-04-10 Get
3.5.9
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11, 26.1
Release 2026-04-01 Get
3.5.7
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-03-18 Get
3.5.8
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-03-18 Get
3.5.3
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-02-04 Get
3.5.5
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-02-04 Get
3.5.6
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-02-04 Get
3.5.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-28 Get
3.5.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-26 Get
3.5.1
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-26 Get
3.4.6
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-19 Get
3.4.3
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-05 Get
3.4.4
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-05 Get
3.4.5
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-05 Get
3.4.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-04 Get
3.4.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-03 Get
3.4.1
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-03 Get
3.3.5
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-02 Get
3.3.4
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2026-01-01 Get
3.3.3
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2025-12-27 Get
3.3.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10, 1.21.11
Release 2025-12-23 Get
3.3.1
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-04 Get
3.1.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
3.2.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
3.2.1
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
3.2.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
3.2.3
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
3.3.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-12-03 Get
2.6.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-27 Get
2.5.10
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-26 Get
2.5.9
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-20 Get
2.5.7
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-18 Get
2.5.5
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-16 Get
2.5.5
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-16 Get
2.5.6
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-16 Get
2.5.4
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-15 Get
2.5.0
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-11 Get
2.5.1
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-11 Get
2.5.2
MC 1.21, Fabric, 1.21.8, 1.21.5, 1.21.4, 1.20.1, Forge, 1.21.1, 1.21.6, 1.21.3, 1.21.7, NeoForge, 1.21.2, 1.21.9, 1.21.10
Release 2025-11-11 Get

More from settingdust

Fix Race Condition
87,021
Noisium Legacy
65,210
Surveyor Atlases
5,971
Mod Sets
5,550
Mod Compat Fixes
5,515,110
Dusty Data Sync
548

You Might Also Like

Vivecraft
A Minecraft VR mod on a loader of your choice!
9,988,339
Athena
A crossplatform (Forge/Fabric) solution to connected block textures for 1.19.4+
99,799,527
Lodestone
A collection of code used throughout projects under the Lodestar team.
9,914,417
TheDragonLib
A library for most of sokratis12GR's Mods
9,910,232
Multi Mob Library
A library mod containing essential files for Daveyx0's mob mods
9,892,767
FTB Library (Forge) (Legacy)
FTB Library is a library mod that is used for some of our mods.
98,265,314