English | 简体中文
Mojang's DataFixerUpper (DFU), repackaged to run on Java 8 with Minecraft 1.7.10 and 1.12.2.
- Java 8 bytecode (class version 52), downgraded with JvmDowngrader.
- Uses the Gson, Guava and log4j2 libraries provided by the game. Calls to newer Guava and fastutil APIs are redirected to compatibility classes.
- Rewrites slf4j references — which neither game provides — onto the log4j2 API both games ship.
- Tested with upstream's own
CodecTestsandRoundtripTeston Java 8, against the 1.7.10 and 1.12.2 dependency sets.
RetroDFU is tested only on Minecraft 1.7.10 and 1.12.2. Other versions are not verified.
Java 8 or later, and the following libraries on the classpath. The table lists the versions the game ships:
| Library | 1.7.10 | 1.12.2 |
|---|---|---|
| Gson | 2.2.4 | 2.8.0 |
| Guava | 17.0 | 21.0 |
| log4j2 | 2.0-beta9 | 2.8.1 |
| fastutil | Not provided | 7.1.0 |
Warning
Minecraft 1.7.10 does not provide fastutil. Supply version 7.1.0 or later yourself.
repositories { mavenLocal() }
dependencies { implementation("net.morphismmc:retrodfu:<version>") }Clone the repository together with its submodules, since the DFU sources are in upstream/:
git clone --recurse-submodules https://github.com/morphismx/RetroDFU.gitFor an existing clone, run git submodule update --init.
Run Gradle with JDK 25; the Java 8 toolchain the tests need is downloaded automatically.
./gradlew buildThe jar is written to build/libs/retrodfu-<version>.jar. The build also runs all checks and tests.
The build runs the following steps in order:
patchJar: applies ClassTransform transformers — renames slf4j's types onto log4j2's and redirects newer Guava / fastutil calls to compatibility classes.downgradeJar: converts the bytecode to Java 8 and replaces JDK 9+ API calls with stubs.shadeDowngradedApi: relocates the stubs undernet.morphismmc.retrodfu.shadow.jvmdg.scanJar: verifies that every reference in the jar resolves against the dependencies of both games.checkSignature: checks the jar against the Java 8 API using animal-sniffer.
RetroDFU is released under the MIT License. The jar also bundles:
- DataFixerUpper (MIT)
- JvmDowngrader
java-apistubs (LGPL 2.1)
The corresponding license texts are in META-INF/licenses/ inside the jar.
RetroDFU is not affiliated with Mojang or Microsoft. Minecraft is a trademark of Mojang and Microsoft.