Class RequiredSystemFiles
java.lang.Object
net.neoforged.fml.loading.moddiscovery.locators.RequiredSystemFiles
- All Implemented Interfaces:
AutoCloseable
Models the required files for opening a valid Minecraft and NeoForge jar from the classpath,
and supports various deployment models.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate JarContentsprivate JarContentsprivate static final Stringprivate static final Stringprivate JarContentsprivate JarContentsprivate static final org.slf4j.Loggerprivate static final Stringprivate static final Stringprivate JarContentsprivate JarContentsprivate JarContents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidcheckForMissingMinecraftFiles(boolean clientRequired) voidclose()private static voidcloseAll(Iterable<JarContents> locatedRoots) static RequiredSystemFilesfind(ILaunchContext context, ClassLoader loader) private static @Nullable JarContentsfindAndOpen(ILaunchContext context, ClassLoader loader, List<JarContents> alreadyOpened, String relativePath) private static JarContentsfindNeoForgeResources(List<JarContents> locatedRoots, ClassLoader loader) getAll()booleanisEmpty()private static booleanisNeoForgeManifest(Path path) private static booleanisNeoForgeManifest(Manifest manifest) private static JarContentsopenOrThrow(Path root) private static List<JarContents> uniqueAndNonNull(JarContents... contents)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
COMMON_CLASS
- See Also:
-
CLIENT_CLASS
- See Also:
-
COMMON_RESOURCE_ROOT
- See Also:
-
CLIENT_RESOURCE_ROOT
- See Also:
-
NEOFORGE_COMMON_CLASS
- See Also:
-
NEOFORGE_CLIENT_CLASS
- See Also:
-
commonClasses
-
commonResources
-
clientClasses
-
clientResources
-
neoForgeCommonClasses
-
neoForgeClientClasses
-
neoForgeResources
-
-
Constructor Details
-
RequiredSystemFiles
private RequiredSystemFiles()
-
-
Method Details
-
areNeoForgeAndMinecraftSeparate
public boolean areNeoForgeAndMinecraftSeparate() -
checkForMissingMinecraftFiles
public void checkForMissingMinecraftFiles(boolean clientRequired) -
find
-
findNeoForgeResources
private static JarContents findNeoForgeResources(List<JarContents> locatedRoots, ClassLoader loader) -
findAndOpen
@Nullable private static @Nullable JarContents findAndOpen(ILaunchContext context, ClassLoader loader, List<JarContents> alreadyOpened, String relativePath) -
openOrThrow
-
isNeoForgeManifest
-
isNeoForgeManifest
-
getAll
-
getClassesRoots
-
isEmpty
public boolean isEmpty() -
getCommonClasses
-
getCommonResources
-
getClientClasses
-
getClientResources
-
getNeoForgeCommonClasses
-
getNeoForgeClientClasses
-
getNeoForgeResources
-
closeAll
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getMinecraftJarComponents
-
getNeoForgeJarComponents
-
uniqueAndNonNull
-