Skip to content

Forge

The com.possible-triangle.forge plugin is an abstract layer around NeoForge's Legacy Forge Plugin.

Like the other loader plugins, it tries to align with a common API interface, to make migration & sharing between them easier.

There is one forge-only values, which fallback to a gradle property

Property Default Value
kotlinForgeVersion (1) gradle.properties: kotlin_forge_version
  1. read more about kotlin support

Access Transformers

The forge extension provides several ways to enable access transformers for the subproject.

It is also possible to use Access Wideners, which will be transformed by the plugin into a access transformer (1).

  1. for debugging purposes the generated access transformer can be found under build/generated/accesstransformer.cfg

Warning

This functionality is still a bit experimental. While it should always work, even in clean environments, sometimes the access transformer is not generated in time for the IDE sync. That means, that after running clean, or when cloning a fresh repository using this, you may need to sync gradle twice.

build.gradle.kts
forge {
   // default path at <project-path>/src/main/resources/META-INF/accesstransformer.cfg
   accessTransformer()
   accessTransformer(project(":other-sub-project"))
   // custom file path
   accessTransformer(file("..."))

   // uses `com.possible-triangle.access` to transform access widener files
   accessWidener(project(":fabric"))
}

Jar-In-Jar

Mods & Libraries included using the mod extension, will be bundled using neoforge's Jar-In-Jar system.

Datagen

Like other loaders, it can be configured using the dataGen method on the forge extension. Everything else follows the same standard API as the other loaders.