Class NeoForgeExtensionImpl

java.lang.Object
net.fabricmc.loom.extension.NeoForgeExtensionImpl
All Implemented Interfaces:
NeoForgeExtensionAPI

public abstract class NeoForgeExtensionImpl extends Object implements NeoForgeExtensionAPI
  • Constructor Details

    • NeoForgeExtensionImpl

      @Inject public NeoForgeExtensionImpl(org.gradle.api.Project project)
  • Method Details

    • getAccessTransformers

      public org.gradle.api.file.ConfigurableFileCollection getAccessTransformers()
      Description copied from interface: NeoForgeExtensionAPI
      A collection of all project access transformers. The collection should only contain AT files, and not directories or other files.

      If this collection is empty, Loom tries to resolve the AT from the default path (META-INF/accesstransformer.cfg in the main source set).

      Specified by:
      getAccessTransformers in interface NeoForgeExtensionAPI
      Returns:
      the collection of AT files
    • accessTransformer

      public void accessTransformer(Object file)
      Description copied from interface: NeoForgeExtensionAPI
      Specified by:
      accessTransformer in interface NeoForgeExtensionAPI
      Parameters:
      file - the file, evaluated as per Project.file(Object)
    • convertAccessWideners

      public void convertAccessWideners(org.gradle.api.tasks.TaskProvider<? extends org.gradle.jvm.tasks.Jar> jarTask, org.gradle.api.Action<? super Aw2AtSettings> action)
      Description copied from interface: NeoForgeExtensionAPI
      Sets up AW → AT conversion for the provided jar task.

      The file paths are relative to the mod jar root, corresponding to resources directories in a development environment, not the project directory! For example, "my_mod.accesswidener" corresponds to the source file src/main/resources/my_mod.accesswidener.

      The specified files will be converted and removed from the final jar.

      In projects with an obfuscated version of Minecraft, this method must target remapJar or another RemapJarTask in order for the access transformer to be remapped properly.

      When the provided task is a RemapJarTask, the AW paths will simply be added to the corresponding atAccessWideners property.

      Specified by:
      convertAccessWideners in interface NeoForgeExtensionAPI