From 2c33e496d4c51546e553ed9015fcfdd4adc0002c Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 25 May 2024 20:11:37 +0200 Subject: [PATCH] Add Action overloads for NDOC properties --- .../moddevgradle/dsl/NeoForgeExtension.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/neoforged/moddevgradle/dsl/NeoForgeExtension.java b/src/main/java/net/neoforged/moddevgradle/dsl/NeoForgeExtension.java index 0228791e..1632ab11 100644 --- a/src/main/java/net/neoforged/moddevgradle/dsl/NeoForgeExtension.java +++ b/src/main/java/net/neoforged/moddevgradle/dsl/NeoForgeExtension.java @@ -1,7 +1,7 @@ package net.neoforged.moddevgradle.dsl; +import org.gradle.api.Action; import org.gradle.api.NamedDomainObjectContainer; -import org.gradle.api.NamedDomainObjectSet; import org.gradle.api.Project; import org.gradle.api.provider.ListProperty; import org.gradle.api.provider.Property; @@ -51,11 +51,19 @@ public NeoForgeExtension(Project project) { public abstract ListProperty getAccessTransformers(); - public NamedDomainObjectSet getMods() { + public NamedDomainObjectContainer getMods() { return mods; } - public NamedDomainObjectSet getRuns() { + public void mods(Action> action) { + action.execute(mods); + } + + public NamedDomainObjectContainer getRuns() { return runs; } + + public void runs(Action> action) { + action.execute(runs); + } }