File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
fg-plugin/src/main/groovy/net/minecraftforge/gradle Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import org.gradle.api.tasks.Input
2222import org.gradle.api.tasks.InputDirectory
2323import org.gradle.api.tasks.InputFile
2424import org.gradle.api.tasks.JavaExec
25+ import org.gradle.api.tasks.Optional
2526import org.gradle.api.tasks.SourceSet
2627import org.gradle.api.tasks.TaskProvider
2728import org.gradle.language.base.plugins.LifecycleBasePlugin
@@ -112,7 +113,7 @@ import java.nio.file.Files
112113 ' --metadata' , this . metadataZip. get(). asFile. absolutePath,
113114 ' --' )
114115
115- this . args(this . mcBootstrapArgs. get( ). toArray())
116+ this . args(this . mcBootstrapArgs. getOrElse( List . of() ). toArray())
116117 }
117118
118119 Files . createDirectories(this . workingDir. toPath())
@@ -125,6 +126,6 @@ import java.nio.file.Files
125126 /* * The location of the {@code metadata.zip} artifact produced by the Minecraft Mavenizer. */
126127 abstract @InputFile RegularFileProperty getMetadataZip ()
127128 abstract @Input Property<String > getBootstrapMainClass ()
128- abstract @Input ListProperty<String > getMcBootstrapArgs ()
129- abstract @Input Property<Boolean > getClient ()
129+ abstract @Input @ Optional ListProperty<String > getMcBootstrapArgs ()
130+ abstract @Input @ Optional Property<Boolean > getClient ()
130131}
Original file line number Diff line number Diff line change @@ -616,7 +616,7 @@ static NamedDomainObjectContainer<SlimeLauncherOptions> container(ObjectFactory
616616 /// @param task The task to apply the options to
617617 final void apply (SlimeLauncherExec task ) {
618618 if (this .mainClass .map (Util ::nullIfEmpty ).isPresent ())
619- task .getMainClass ().set (this .mainClass );
619+ task .getBootstrapMainClass ().set (this .mainClass );
620620
621621 if (this .args .map (Util ::nullIfEmpty ).isPresent ())
622622 task .getMcBootstrapArgs ().set (this .args );
You can’t perform that action at this time.
0 commit comments