Package net.neoforged.moddevgradle.dsl
Class NeoForgeExtension
java.lang.Object
net.neoforged.moddevgradle.dsl.NeoForgeExtension
This is the top-level
neoForge extension, used to configure the moddev plugin.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNeoForgeExtension(org.gradle.api.Project project, DataFileCollection accessTransformers, DataFileCollection interfaceInjectionData) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccessTransformers(org.gradle.api.Action<DataFileCollection> action) The list of additional access transformers that should be applied to the Minecraft source code.voidaddModdingDependenciesTo(org.gradle.api.tasks.SourceSet sourceSet) Adds the necessary dependencies to develop a Minecraft mod to the given source set.abstract org.gradle.api.provider.ListProperty<org.gradle.api.tasks.TaskProvider<?>>The tasks to be run when the IDE reloads the Gradle project.org.gradle.api.NamedDomainObjectContainer<ModModel>getMods()abstract org.gradle.api.provider.Property<String>You can set this property to a version of NeoForm to either override the version used in the version of NeoForge you set, or to compile against Vanilla artifacts that have no NeoForge code added.org.gradle.api.NamedDomainObjectContainer<RunModel>getRuns()abstract org.gradle.api.provider.Property<Boolean>Enable access transformer validation, raising fatal errors if an AT targets a member that doesn't exist.abstract org.gradle.api.provider.Property<String>NeoForge version number.voidideSyncTask(org.gradle.api.Task task) Configures the given task to be run when the IDE reloads the Gradle project.voidideSyncTask(org.gradle.api.tasks.TaskProvider<?> task) Configures the given task to be run when the IDE reloads the Gradle project.voidinterfaceInjectionData(org.gradle.api.Action<DataFileCollection> action) The data-files describing additional interface implementation declarations to be added to Minecraft classes.voidvoidneoFormRuntime(org.gradle.api.Action<NeoFormRuntime> action) voidvoidvoidsetAccessTransformers(Object... paths) Replaces current access transformers.voidsetInterfaceInjectionData(Object... paths) Replaces current interface injection data files.void
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
NeoForgeExtension
@Inject public NeoForgeExtension(org.gradle.api.Project project, DataFileCollection accessTransformers, DataFileCollection interfaceInjectionData)
-
-
Method Details
-
addModdingDependenciesTo
public void addModdingDependenciesTo(org.gradle.api.tasks.SourceSet sourceSet) Adds the necessary dependencies to develop a Minecraft mod to the given source set. The plugin automatically adds these dependencies to the main source set. -
getVersion
NeoForge version number. You have to set either this orgetNeoFormVersion(). -
getNeoFormVersion
You can set this property to a version of NeoForm to either override the version used in the version of NeoForge you set, or to compile against Vanilla artifacts that have no NeoForge code added. -
accessTransformers
The list of additional access transformers that should be applied to the Minecraft source code.If you do not set this property, the plugin will look for an access transformer file at
META-INF/accesstransformer.cfgrelative to your main source sets resource directories.- See Also:
-
getAccessTransformers
-
setAccessTransformers
Replaces current access transformers. -
interfaceInjectionData
The data-files describing additional interface implementation declarations to be added to Minecraft classes.This is an advanced property: Injecting interfaces in your development environment using this property will not implement the interfaces in your published mod. You have to use Mixin or ASM to do that.
- See Also:
-
getInterfaceInjectionData
-
setInterfaceInjectionData
Replaces current interface injection data files. -
getValidateAccessTransformers
Enable access transformer validation, raising fatal errors if an AT targets a member that doesn't exist.Default
false -
getMods
-
mods
-
getRuns
-
runs
-
getParchment
-
parchment
-
getNeoFormRuntime
-
neoFormRuntime
-
getUnitTest
-
unitTest
-
getIdeSyncTasks
public abstract org.gradle.api.provider.ListProperty<org.gradle.api.tasks.TaskProvider<?>> getIdeSyncTasks()The tasks to be run when the IDE reloads the Gradle project. -
ideSyncTask
public void ideSyncTask(org.gradle.api.tasks.TaskProvider<?> task) Configures the given task to be run when the IDE reloads the Gradle project. -
ideSyncTask
public void ideSyncTask(org.gradle.api.Task task) Configures the given task to be run when the IDE reloads the Gradle project.
-