Skip to content

Commit

Permalink
Split up net.neoforged.fml.loading.moddiscovery package
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored and shartte committed Apr 12, 2024
1 parent c58948c commit 1b41c94
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 34 deletions.
2 changes: 1 addition & 1 deletion loader/src/main/java/net/neoforged/fml/ModLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.ImmediateWindowHandler;
import net.neoforged.fml.loading.LoadingModList;
import net.neoforged.fml.loading.moddiscovery.JarModsDotTomlModProvider;
import net.neoforged.fml.loading.moddiscovery.ModFileInfo;
import net.neoforged.fml.loading.moddiscovery.ModInfo;
import net.neoforged.fml.loading.moddiscovery.locators.JarModsDotTomlModProvider;
import net.neoforged.fml.loading.progress.ProgressMeter;
import net.neoforged.fml.loading.progress.StartupNotificationManager;
import net.neoforged.neoforgespi.language.IModInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLEnvironment;
import net.neoforged.fml.loading.moddiscovery.ModAnnotation;
import net.neoforged.fml.loading.modscan.ModAnnotation;
import net.neoforged.neoforgespi.language.ModFileScanData;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import net.neoforged.coremod.CoreModScriptingEngine;
import net.neoforged.fml.common.asm.RuntimeDistCleaner;
import net.neoforged.fml.loading.mixin.DeferredMixinConfigRegistration;
import net.neoforged.fml.loading.moddiscovery.BackgroundScanHandler;
import net.neoforged.fml.loading.moddiscovery.ModDiscoverer;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.ModValidator;
import net.neoforged.fml.loading.modscan.BackgroundScanHandler;
import net.neoforged.fml.loading.targets.CommonLaunchHandler;
import org.slf4j.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Stream;
import net.neoforged.fml.loading.moddiscovery.ExplodedDirectoryLocator;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.locators.ExplodedDirectoryLocator;
import net.neoforged.neoforgespi.language.IModLanguageProvider;
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
import net.neoforged.fml.loading.mixin.DeferredMixinConfigRegistration;
import net.neoforged.fml.loading.moddiscovery.BackgroundScanHandler;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.ModFileInfo;
import net.neoforged.fml.loading.moddiscovery.ModInfo;
import net.neoforged.fml.loading.modscan.BackgroundScanHandler;

/**
* Master list of all mods <em>in the loading context. This class cannot refer outside the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
import java.util.jar.Manifest;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import net.neoforged.fml.loading.moddiscovery.MinecraftLocator;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.ModFileInfo;
import net.neoforged.fml.loading.moddiscovery.ModInfo;
import net.neoforged.fml.loading.moddiscovery.locators.MinecraftLocator;
import net.neoforged.fml.loading.toposort.CyclePresentException;
import net.neoforged.fml.loading.toposort.TopologicalSort;
import net.neoforged.neoforgespi.language.IModInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.neoforged.fml.loading.ImmediateWindowHandler;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.UniqueModListBuilder;
import net.neoforged.fml.loading.moddiscovery.locators.ModsFolderLocator;
import net.neoforged.fml.loading.progress.StartupNotificationManager;
import net.neoforged.neoforgespi.Environment;
import net.neoforged.neoforgespi.locating.IDependencyLocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.stream.Stream;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.modscan.Scanner;
import net.neoforged.neoforgespi.language.IModFileInfo;
import net.neoforged.neoforgespi.language.IModInfo;
import net.neoforged.neoforgespi.language.IModLanguageProvider;
Expand Down Expand Up @@ -53,7 +54,7 @@ public class ModFile implements IModFile {
private List<String> mixinConfigs;
private List<Path> accessTransformers;

static final Attributes.Name TYPE = new Attributes.Name("FMLModType");
public static final Attributes.Name TYPE = new Attributes.Name("FMLModType");
private SecureJar.Status securityStatus;

public ModFile(final SecureJar jar, final IModProvider provider, final ModFileFactory.ModFileInfoParser parser) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Optional;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.moddiscovery.locators.JarModsDotTomlModProvider;
import net.neoforged.neoforgespi.language.IModFileInfo;
import net.neoforged.neoforgespi.locating.IModFile;
import net.neoforged.neoforgespi.locating.InvalidModFileException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.StringSubstitutor;
import net.neoforged.fml.loading.StringUtils;
import net.neoforged.fml.loading.moddiscovery.locators.MinecraftLocator;
import net.neoforged.neoforgespi.language.IConfigurable;
import net.neoforged.neoforgespi.language.IModInfo;
import net.neoforged.neoforgespi.language.MavenVersionAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public final class ModJarMetadata extends LazyJarMetadata implements JarMetadata
private final JarContents jarContents;
private IModFile modFile;

ModJarMetadata(JarContents jarContents) {
public ModJarMetadata(JarContents jarContents) {
this.jarContents = jarContents;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import net.neoforged.fml.loading.LoadingModList;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.ModSorter;
import net.neoforged.fml.loading.modscan.BackgroundScanHandler;
import net.neoforged.neoforgespi.locating.IModFile;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public NightConfigWrapper(final UnmodifiableConfig config) {
this.config = config;
}

NightConfigWrapper setFile(IModFileInfo file) {
public NightConfigWrapper setFile(IModFileInfo file) {
this.file = file;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import java.io.File;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import cpw.mods.jarhandling.JarContents;
import cpw.mods.jarhandling.JarContentsBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.mojang.logging.LogUtils;
import cpw.mods.jarhandling.JarContents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.mojang.logging.LogUtils;
import cpw.mods.jarhandling.JarContents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.mojang.logging.LogUtils;
import cpw.mods.jarhandling.JarContents;
Expand All @@ -14,6 +14,9 @@
import java.util.Optional;
import java.util.function.Function;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.ModFileParser;
import net.neoforged.fml.loading.moddiscovery.ModJarMetadata;
import net.neoforged.neoforgespi.language.IConfigurable;
import net.neoforged.neoforgespi.language.IModFileInfo;
import net.neoforged.neoforgespi.language.IModInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import cpw.mods.jarhandling.JarContents;
import cpw.mods.jarhandling.JarContentsBuilder;
Expand All @@ -15,6 +15,7 @@
import java.util.stream.Stream;
import net.neoforged.fml.loading.FMLPaths;
import net.neoforged.fml.loading.MavenCoordinateResolver;
import net.neoforged.fml.loading.moddiscovery.ModListHandler;
import net.neoforged.neoforgespi.locating.IModLocator;

public class MavenDirectoryLocator implements IModLocator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.electronwill.nightconfig.core.Config;
import com.mojang.logging.LogUtils;
Expand All @@ -16,6 +16,10 @@
import java.util.stream.Stream;
import net.neoforged.fml.loading.ClasspathTransformerDiscoverer;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.fml.loading.moddiscovery.ModFileInfo;
import net.neoforged.fml.loading.moddiscovery.ModJarMetadata;
import net.neoforged.fml.loading.moddiscovery.NightConfigWrapper;
import net.neoforged.neoforgespi.language.IModFileInfo;
import net.neoforged.neoforgespi.locating.IModFile;
import net.neoforged.neoforgespi.locating.IModLocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.moddiscovery.locators;

import com.mojang.logging.LogUtils;
import cpw.mods.jarhandling.JarContents;
Expand Down Expand Up @@ -37,7 +37,7 @@ public ModsFolderLocator() {
this(modFolder, "mods folder");
}

ModsFolderLocator(Path modFolder, String name) {
public ModsFolderLocator(Path modFolder, String name) {
this.modFolder = modFolder;
this.customName = name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import com.mojang.logging.LogUtils;
import java.time.Duration;
Expand All @@ -19,6 +19,7 @@
import net.neoforged.fml.loading.ImmediateWindowHandler;
import net.neoforged.fml.loading.LoadingModList;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.neoforgespi.language.ModFileScanData;
import org.slf4j.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import com.google.common.base.MoreObjects;
import com.google.common.collect.Lists;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import java.util.LinkedList;
import org.objectweb.asm.AnnotationVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import java.lang.annotation.ElementType;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import java.lang.annotation.ElementType;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import java.lang.annotation.ElementType;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/

package net.neoforged.fml.loading.moddiscovery;
package net.neoforged.fml.loading.modscan;

import com.mojang.logging.LogUtils;
import java.io.IOException;
Expand All @@ -12,6 +12,7 @@
import java.nio.file.Path;
import java.util.List;
import net.neoforged.fml.loading.LogMarkers;
import net.neoforged.fml.loading.moddiscovery.ModFile;
import net.neoforged.neoforgespi.language.IModLanguageProvider;
import net.neoforged.neoforgespi.language.ModFileScanData;
import org.objectweb.asm.ClassReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.regex.Pattern;
import java.util.stream.Stream;
import net.neoforged.fml.loading.FileUtils;
import net.neoforged.fml.loading.moddiscovery.JarModsDotTomlModProvider;
import net.neoforged.fml.loading.moddiscovery.locators.JarModsDotTomlModProvider;

public abstract class CommonDevLaunchHandler extends CommonLaunchHandler {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
net.neoforged.fml.loading.moddiscovery.JarInJarDependencyLocator
net.neoforged.fml.loading.moddiscovery.locators.JarInJarDependencyLocator
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
net.neoforged.fml.loading.moddiscovery.ModsFolderLocator
net.neoforged.fml.loading.moddiscovery.MavenDirectoryLocator
net.neoforged.fml.loading.moddiscovery.ExplodedDirectoryLocator
net.neoforged.fml.loading.moddiscovery.MinecraftLocator
net.neoforged.fml.loading.moddiscovery.ClasspathLocator
net.neoforged.fml.loading.moddiscovery.BuiltinGameLibraryLocator
net.neoforged.fml.loading.moddiscovery.locators.ModsFolderLocator
net.neoforged.fml.loading.moddiscovery.locators.MavenDirectoryLocator
net.neoforged.fml.loading.moddiscovery.locators.ExplodedDirectoryLocator
net.neoforged.fml.loading.moddiscovery.locators.MinecraftLocator
net.neoforged.fml.loading.moddiscovery.locators.ClasspathLocator
net.neoforged.fml.loading.moddiscovery.locators.BuiltinGameLibraryLocator

0 comments on commit 1b41c94

Please sign in to comment.