Class NeoForgeCoreLoader
java.lang.Object
mods.thecomputerizer.theimpossiblelibrary.neoforge.core.NeoForgeCoreLoader
Figures out which version to load on and how to load stuff on it
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddLibraryToGameLayer(String pkg, String gameLayerName) Since the library interacts with GAME layer modules, we need to ensure it is available on the GAME layerstatic ClassLoaderShould be the ClassLoader for the BOOT layer or the system ClassLoader if Java 8static @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPIstatic Objectstatic @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPIReturns a CoreAPI instance on the BOOT layer ClassLoader.static @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPIinitCoreAPI(ClassLoader loader) Returns a CoreAPI instance on the input ClassLoader.static booleanisJava21()static ClassLoaderlayerClassLoader(cpw.mods.modlauncher.api.IModuleLayerManager.Layer layer) Tries to get the ClassLoader instance associated with the given layer namestatic voidverifyModule(String className, net.neoforged.neoforgespi.language.IModInfo info, Object moduleLayer)
-
Constructor Details
-
NeoForgeCoreLoader
public NeoForgeCoreLoader()
-
-
Method Details
-
addLibraryToGameLayer
Since the library interacts with GAME layer modules, we need to ensure it is available on the GAME layer -
bootLoader
Should be the ClassLoader for the BOOT layer or the system ClassLoader if Java 8 -
getBootLoadedCoreAPI
@Nullable public static @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPI getBootLoadedCoreAPI() -
getLogger
-
initCoreAPI
@Nullable public static @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPI initCoreAPI()Returns a CoreAPI instance on the BOOT layer ClassLoader. Initializes the source if necessary -
initCoreAPI
@Nullable public static @Nullable mods.thecomputerizer.theimpossiblelibrary.api.core.CoreAPI initCoreAPI(ClassLoader loader) Returns a CoreAPI instance on the input ClassLoader. Initializes the source if necessary -
isJava21
public static boolean isJava21() -
layerClassLoader
public static ClassLoader layerClassLoader(cpw.mods.modlauncher.api.IModuleLayerManager.Layer layer) Tries to get the ClassLoader instance associated with the given layer name -
verifyModule
-