Java API Setup

EmbersTextAPI publishes a jar for each loader and Minecraft version to a self-hosted Maven repository. Add the repository and the matching dependency to your mod’s build.gradle, and you can call the Java API directly from your own code.

Latest release 3.0.0-beta.1
repositories {
    maven { url 'https://maven.tysontheember.dev' }
}

dependencies {
    // pick the artifact matching your loader + Minecraft version:
    // emberstextapi-fabric-1.20.1, emberstextapi-fabric-1.21.1, emberstextapi-fabric-26.1, emberstextapi-forge-1.20.1, emberstextapi-neoforge-1.21.1, emberstextapi-neoforge-26.1
    implementation 'net.tysontheember.emberstextapi:emberstextapi-neoforge-1.21.1:3.0.0-beta.1'
}
Browse every artifact and version in the Maven index →

Your Gradle toolchain must match the Java version used to compile ETA for the target you’re building against.

MC versionLoaderJava
1.20.1Forge17
1.20.1Fabric17
1.21.1NeoForge21
1.21.1Fabric21
26.1.xNeoForge25
26.1.xFabric25
build.gradle
repositories {
maven { url = 'https://maven.tysontheember.dev' }
}

Set eta_version in your gradle.properties to the version you want to pin to, then reference it in build.gradle.

gradle.properties

eta_version=3.0.0-beta.1
build.gradle
dependencies {
modImplementation "net.tysontheember.emberstextapi:emberstextapi-fabric-1.20.1:${eta_version}"
}

If you want ETA bundled inside your jar (so players don’t need to install it separately), add include alongside modImplementation:

include "net.tysontheember.emberstextapi:emberstextapi-fabric-1.20.1:${eta_version}"

In a typical multi-loader project, ETA belongs in your loader-specific subprojects, not in your common module (which can’t resolve Minecraft-specific types at compile time).

  • build.gradle (root)
  • gradle.properties (eta_version goes here)
  • Directorycommon-1.21.1/
    • Directorysrc/main/java/ (your shared logic, calls ETA via the API interface)
  • Directoryfabric-1.21.1/
    • build.gradle (modImplementation for ETA here)
    • Directorysrc/main/java/
  • Directoryneoforge-1.21.1/
    • build.gradle (implementation for ETA here)
    • Directorysrc/main/java/

After syncing your Gradle project, run the dependencies task for the subproject you added ETA to and grep for the artifact:

Terminal window
./gradlew :fabric-1.21.1:dependencies | grep emberstextapi

Expected output (version will differ):

\--- net.tysontheember.emberstextapi:emberstextapi-fabric-1.21.1:3.0.0-beta.1