Package net.neoforged.fml.startup
Class Entrypoint
java.lang.Object
net.neoforged.fml.startup.Entrypoint
- Direct Known Subclasses:
Client,DataClient,DataServer,GameTestServer,Server
Provides a convenient base-class for our entry point classes.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static MethodHandlecreateMainMethodCallable(Entrypoint.StartupResult startupResult, String mainClassName) The only point of this is to get a neater stacktrace in all crash reports, since this will replace three levels of Java reflection with one generated lambda method.protected static @Nullable ThreadfindThread(String threadName) private static Stringprivate static PathgetGameDir(String[] args) private static booleanIf a user (or launcher) supplies an explicit Log4j2 configuration file, it should be used over the one we ship with FML.(package private) static voidForces the log4j2 logging context to use the configuration shipped with fml_loader.protected static Entrypoint.StartupResult
-
Constructor Details
-
Entrypoint
protected Entrypoint()
-
-
Method Details
-
startup
protected static Entrypoint.StartupResult startup(String[] args, boolean headless, net.neoforged.api.distmarker.Dist dist, boolean cleanDist) -
listClasspathEntries
-
getGameDir
-
getArg
-
hasCustomLoggingConfiguration
private static boolean hasCustomLoggingConfiguration()If a user (or launcher) supplies an explicit Log4j2 configuration file, it should be used over the one we ship with FML. We try to detect whether one is given using the usual Log4j2 configuration properties.See Log4j2 documentation.
-
overwriteLoggingConfiguration
static void overwriteLoggingConfiguration()Forces the log4j2 logging context to use the configuration shipped with fml_loader. -
createMainMethodCallable
protected static MethodHandle createMainMethodCallable(Entrypoint.StartupResult startupResult, String mainClassName) The only point of this is to get a neater stacktrace in all crash reports, since this will replace three levels of Java reflection with one generated lambda method. -
findThread
-