Fix logged deprecation warning for internal forge.localMods usage, part 2

This commit is contained in:
Juuz
2022-08-22 01:11:49 +03:00
parent 506ae3358c
commit edeacbb19d
2 changed files with 3 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ import net.fabricmc.loom.api.ForgeLocalMod;
import net.fabricmc.loom.api.ModSettings;
import net.fabricmc.loom.configuration.ide.RunConfigSettings;
import net.fabricmc.loom.configuration.launch.LaunchProviderSettings;
import net.fabricmc.loom.extension.ForgeExtensionImpl;
import net.fabricmc.loom.util.Constants;
import net.fabricmc.loom.util.DependencyDownloader;
import net.fabricmc.loom.util.gradle.SourceSetHelper;
@@ -170,7 +171,7 @@ public class ForgeRunsProvider {
}
}
for (ForgeLocalMod localMod : extension.getForge().getLocalMods()) {
for (ForgeLocalMod localMod : ((ForgeExtensionImpl) extension.getForge()).localMods) {
String sourceSetName = localMod.getName();
localMod.getSourceSets().flatMap(sourceSet -> Stream.concat(

View File

@@ -51,7 +51,7 @@ public class ForgeExtensionImpl implements ForgeExtensionAPI {
private final SetProperty<String> mixinConfigs;
private final Property<Boolean> useCustomMixin;
private final List<String> dataGenMods = new ArrayList<>(); // not a property because it has custom adding logic
private final NamedDomainObjectContainer<ForgeLocalMod> localMods;
public final NamedDomainObjectContainer<ForgeLocalMod> localMods; // public to avoid deprecation warnings for internal calls
@Inject
public ForgeExtensionImpl(Project project, LoomGradleExtension extension) {