Skip to main content

Java API

note

While these docs will contain examples and explanations, the javadocs for DynAssetGen are also a good source for information on the java API; while they are not complete, I am continually working to expand how much of the API surface is well documented in this way. Additionally, javadocs are published for each major DynAssetGen version after 4. Javadocs are located at https://javadoc.lukebemish.dev/dev/lukebemish/dynamicassetgenerator/6/.

Getting Started

The first step to get started with the Java API is to add DynAssetGen to your development environment. All artifacts for DynAssetGen are available on maven central:

repositories {
mavenCentral()
}

For each version of DynAssetGen, three types of artifacts are published:

  • common jars, which are in official "Mojmaps" mappings and contain no loader-specific code
  • fabric jars which run on Quilt and Fabric
  • neoforge jars which run on NeoForge

The artifact coordinates take the format dev.lukebemish:dynamicassetgenerator:<version>, and loader-specific jars are requested by capability:

Adding artifact on NeoForge
dependencies {
implementation('dev.lukebemish:dynamicassetgenerator:<version>') {
capabilities {
requireCapability('dev.lukebemish:dynamicassetgenerator-neoforge')
}
}
}
Adding artifact on Quilt or Fabric
dependencies {
modImplementation('dev.lukebemish:dynamicassetgenerator:<version>') {
capabilities {
requireCapability('dev.lukebemish:dynamicassetgenerator-fabric')
}
}
}

Available Versions

Minecraft VersionLatest
1.21Latest 1.21 Version
1.20.6Latest 1.20.6 Version
1.20.4Latest 1.20.4 Version
1.20.2Latest 1.20.2 Version
1.20.1Latest 1.20.1 Version
1.19.4Latest 1.19.3 Version
1.19.3Latest 1.19.3 Version
note

For versions before 6.0.0 (for Minecraft versions before 1.20.5), the mod was not on maven central but at https://maven.lukebemish.dev/releases/:

repositories {
maven {
url "https://maven.lukebemish.dev/releases/"
}
}

Additionally, the artifact coordinates took the format dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-<type>-<minecraft version>:<version>

Adding artifact on NeoForge
dependencies {
implementation 'dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-neoforge-<minecraft version>:<version>'
}
Adding artifact on Quilt or Fabric
dependencies {
modImplementation 'dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-fabriquilt-<minecraft version>:<version>'
}