Overview
Essential supports an unprecedented range of Minecraft versions from 1.8.9 to 1.21.x using a single unified codebase. This is achieved through a sophisticated build system that transforms code to match each version’s API.Supported Versions
Essential currently supports the following Minecraft versions:Legacy versions (1.8.9 - 1.12.2)
Legacy versions (1.8.9 - 1.12.2)
- 1.8.9-forge
- 1.12.2-forge
Transition versions (1.16.2 - 1.17.1)
Transition versions (1.16.2 - 1.17.1)
- 1.16.2-forge, 1.16.2-fabric
- 1.17.1-forge, 1.17.1-fabric
Modern versions (1.18.x - 1.19.x)
Modern versions (1.18.x - 1.19.x)
- 1.18.1-fabric, 1.18.2-fabric, 1.18.2-forge
- 1.19-fabric, 1.19.2-fabric/forge, 1.19.3-fabric/forge, 1.19.4-fabric/forge
Latest versions (1.20.x - 1.21.x)
Latest versions (1.20.x - 1.21.x)
- 1.20-fabric through 1.20.6 (fabric/forge/neoforge)
- 1.21.1 through 1.21.11 (fabric/forge/neoforge)
Some Minecraft versions share the same Essential codebase. See the Version Aliases section for details.
How It Works
Preprocessor System
Essential uses a preprocessor-based approach to handle API differences between Minecraft versions:Mapping Transformations
Minecraft’s obfuscation and API changes between versions are handled through mapping files:- 1.12.2 → 1.8.9
- 1.16.2 → 1.12.2
versions/1.12.2-1.8.9.txt
These mapping files are generated and maintained by Essential’s multi-version tooling. They transform the modern API calls to work with older Minecraft versions.
Main Version Strategy
Essential uses 1.12.2 as the main development version:Write code for 1.12.2
Developers write code targeting the 1.12.2 API. This is the “source of truth” for the codebase.
Transform upward
The build system transforms 1.12.2 code to work with newer versions (1.16.2+) by applying mappings and preprocessor directives.
Version Aliases
Not every Minecraft version requires a unique Essential build. Theversions/aliases.txt file defines compatible versions:
versions/aliases.txt
How aliases work
How aliases work
When building or running Essential:
- The loader checks which Essential version is compatible with the current Minecraft version
- If an alias exists, it uses the aliased version’s JAR
- This reduces build time and storage requirements
Version-Specific Code
While most code is shared, some features require version-specific implementations:Directory Structure
Version-specific implementations
Version directories typically only contain mixins and compatibility patches. The vast majority of code lives in the shared
src/main directory.Common Version-Specific Cases
Compatibility fixes
Compatibility fixes
Patches for specific Minecraft bugs or compatibility issues with other mods:
versions/1.8.9-forge/.../Mixin_FixResourcePackCrash.java
Feature variations
Feature variations
Features that work differently across versions:
versions/1.8.9-forge/.../Mixin_NameplateIcon_Render.java
Mod compatibility
Mod compatibility
Patches for compatibility with version-specific mods:
.../modcompat/oldanimationsmod/MixinCustomLayerBipedArmor.java
Dependencies and Libraries
Different Minecraft versions require different supporting libraries:SLF4J Support
build.gradle.kts
Performance Optimizations
build.gradle.kts
LWJGL3 Backport
Older Minecraft versions (1.8.9-1.12.2) use LWJGL2. Essential includes an LWJGL3 backport for modern features:build.gradle.kts
Build Process
Building All Versions
Building all versions
Building Specific Versions
Building a specific version
Build Output
Built JARs are located inversions/<MC-Version>/build/libs/:
Testing Across Versions
Essential’s CI system verifies builds across all supported versions:Internal CI
Builds all versions, runs integration tests, and uploads artifacts to Essential’s infrastructure.
Public GitHub CI
Rebuilds from public source on GitHub runners and verifies bit-for-bit identical output.
Challenges and Solutions
API Changes
Minecraft’s API changes dramatically between versions. Solution: Mapping files and preprocessor directives.
Performance
Older versions lack modern optimizations. Solution: Backport features like ImmediatelyFast and LWJGL3.
Mod Compatibility
Popular mods differ per version. Solution: Version-specific compatibility mixins.
Build Time
Building all versions takes significant time. Solution: Version aliases and incremental builds.
Next Steps
Loader Stages
Learn how Essential’s loader handles multi-version environments
Platform Support
Understand the four loader platforms Essential supports
Build Setup
Set up your environment to build Essential
Architecture
Return to the architecture overview