Project Structure
Essential Mod is built as a multi-module Gradle project with a sophisticated architecture designed to support multiple Minecraft versions and mod loaders simultaneously.Directory Layout
Core Components
Essential is organized into several key layers that work together to provide a seamless cross-version experience.Main Module
Thesrc/main directory contains the core Essential Mod implementation:
The core module is shared across all Minecraft versions. Version-specific code is isolated in the
versions/ directory.Subprojects
Essential uses a modular architecture with specialized subprojects:Core subprojects
Core subprojects
| Subproject | Purpose |
|---|---|
classloaders | Custom class loading utilities |
clipboard | Cross-platform clipboard support |
cosmetics | Cosmetics rendering and management |
feature-flags | Feature flag system for gradual rollouts |
ice | ICE (Interactive Connectivity Establishment) for P2P |
immediatelyfast | Performance optimizations (1.18+) |
infra | Infrastructure and networking |
kdiscordipc | Discord Rich Presence integration |
libs | Bundled third-party libraries |
lwjgl3 | LWJGL3 support for older versions |
minecraft-auth | Authentication system |
plasmo | Voice chat integration |
pseudotcp | Pseudo-TCP over UDP |
quic-connector | QUIC protocol support |
slf4j-to-log4j | SLF4J adapter for MC < 1.19.3 |
utils | Utility classes and helpers |
vigilance2 | Settings UI framework |
API Layer
Theapi/ directory provides a stable public API for third-party mods:
Example: Using Essential API
The API is versioned per Minecraft version to ensure compatibility. See
versions/api/ for version-specific implementations.GUI Framework
Essential includes a sophisticated GUI system:Elementa
A declarative UI framework with layout DSL for building modern interfaces.
Vigilance
Settings and configuration UI framework with automatic serialization.
Build System
Thebuild-logic/ directory contains custom Gradle plugins:
embedded-loader.gradle.kts
embedded-loader.gradle.kts
Embeds Essential Loader into the mod JAR. This plugin handles bundling the appropriate loader stage files for each platform.
pinned-jar.gradle.kts
pinned-jar.gradle.kts
Creates “pinned” JAR files for Modrinth/CurseForge distribution. These JARs contain a specific version of Essential, unlike container mods which download the latest version.
gg.essential.multi-version
gg.essential.multi-version
Manages multi-version support and mappings transformation. Handles the complex process of maintaining a single codebase across multiple Minecraft versions.
Version-Specific Code
Theversions/ directory contains code specific to each Minecraft version and loader combination:
Version structure
Version Aliases
Some Essential versions are compatible with multiple Minecraft versions. Thealiases.txt file maps compatible versions:
versions/aliases.txt
Build Outputs
Essential produces different types of artifacts for different use cases:Main JAR
The standard Essential JAR found in
versions/<MC-Version>/build/libs/Essential (<Loader>_<MC-Version>).jar. This is downloaded by the Essential Loader and used for in-game updates.Pinned JAR
Prefixed with
pinned_, this JAR includes a specific version of Essential Loader and is distributed via Modrinth/CurseForge. Users install this directly in their mods folder.Architecture Benefits
This architecture provides several key advantages:Code Reuse
Shared core implementation across all versions minimizes duplication and maintenance burden.
Modularity
Subprojects can be developed, tested, and updated independently.
Flexibility
Version-specific directories allow targeted fixes without affecting other versions.
Scalability
Easy to add support for new Minecraft versions and mod loaders.
Next Steps
Multi-Version Support
Learn how Essential supports Minecraft 1.8.9 through 1.21.x
Loader Stages
Understand the three-stage loader architecture
Platform Support
Explore support for Forge, Fabric, and NeoForge
Building Essential
Get started building Essential from source