Class NeoForgeExtensionImpl
- All Implemented Interfaces:
NeoForgeExtensionAPI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccessTransformer(Object file) Adds a project access transformer.voidconvertAccessWideners(org.gradle.api.tasks.TaskProvider<? extends org.gradle.jvm.tasks.Jar> jarTask, org.gradle.api.Action<? super Aw2AtSettings> action) Sets up AW → AT conversion for the provided jar task.org.gradle.api.file.ConfigurableFileCollectionA collection of all project access transformers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.loom.api.NeoForgeExtensionAPI
convertAccessWideners
-
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:NeoForgeExtensionAPIA 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.cfgin themainsource set).- Specified by:
getAccessTransformersin interfaceNeoForgeExtensionAPI- Returns:
- the collection of AT files
-
accessTransformer
Description copied from interface:NeoForgeExtensionAPIAdds a project access transformer.- Specified by:
accessTransformerin interfaceNeoForgeExtensionAPI- Parameters:
file- the file, evaluated as perProject.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:NeoForgeExtensionAPISets up AW → AT conversion for the provided jar task.The file paths are relative to the mod jar root, corresponding to
resourcesdirectories in a development environment, not the project directory! For example,"my_mod.accesswidener"corresponds to the source filesrc/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
remapJaror anotherRemapJarTaskin 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 correspondingatAccessWidenersproperty.- Specified by:
convertAccessWidenersin interfaceNeoForgeExtensionAPI
-