mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Peel IModLocator into the SPI package and extract a small IModFile
interface as well. This allows building external IModLocator implementations. Signed-off-by: cpw <[email protected]>
This commit is contained in:
11 files changed
+56
-81
No files matched your search
@@ -31,6 +31,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -44,7 +45,7 @@ public class ClasspathLocator extends AbstractJarFileLocator {
|
||||
private List<Path> modCoords;
|
||||
|
||||
@Override
|
||||
public List<ModFile> scanMods() {
|
||||
public List<IModFile> scanMods() {
|
||||
return modCoords.stream().
|
||||
map(mc -> new ModFile(mc, this)).
|
||||
peek(f->modJars.compute(f, (mf, fs)->createFileSystem(mf))).
|
||||
|
||||
Reference in new issue
Block a user