public class ModList
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ModList.UncaughtModLoadingException |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,ModFileInfo> |
fileById |
private java.util.Map<java.lang.String,ModContainer> |
indexedMods |
(package private) static LifecycleEventProvider.EventHandler<LifecycleEventProvider.LifecycleEvent,java.util.function.Consumer<java.util.List<ModLoadingException>>,java.util.concurrent.Executor,java.lang.Runnable> |
inlineDispatcher |
private static ModList |
INSTANCE |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.util.List<ModFileInfo> |
modFiles |
private java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> |
modFileScanData |
private java.util.concurrent.ForkJoinPool |
modLoadingThreadPool |
private java.util.List<ModContainer> |
mods |
(package private) static LifecycleEventProvider.EventHandler<LifecycleEventProvider.LifecycleEvent,java.util.function.Consumer<java.util.List<ModLoadingException>>,java.util.concurrent.Executor,java.lang.Runnable> |
parallelDispatcher |
private java.util.List<ModInfo> |
sortedList |
Modifier | Constructor and Description |
---|---|
private |
ModList(java.util.List<ModFile> modFiles,
java.util.List<ModInfo> sortedList) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.stream.Stream<T> |
applyForEachModContainer(java.util.function.Function<ModContainer,T> function) |
<T> java.util.stream.Stream<T> |
applyForEachModFile(java.util.function.Function<ModFile,T> function) |
private java.lang.String |
crashReport() |
private void |
dispatchParallelEvent(LifecycleEventProvider.LifecycleEvent lifecycleEvent,
java.util.function.Consumer<java.util.List<ModLoadingException>> errorHandler,
java.util.concurrent.Executor executor,
java.lang.Runnable ticker) |
private void |
dispatchSynchronousEvent(LifecycleEventProvider.LifecycleEvent lifecycleEvent,
java.util.function.Consumer<java.util.List<ModLoadingException>> errorHandler,
java.util.concurrent.Executor executor,
java.lang.Runnable ticker) |
private java.lang.String |
fileToLine(ModFile mf) |
void |
forEachModContainer(java.util.function.BiConsumer<java.lang.String,ModContainer> modContainerConsumer) |
void |
forEachModFile(java.util.function.Consumer<ModFile> fileConsumer) |
static ModList |
get() |
java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> |
getAllScanData() |
java.util.Optional<? extends ModContainer> |
getModContainerById(java.lang.String modId) |
java.util.Optional<? extends ModContainer> |
getModContainerByObject(java.lang.Object obj) |
private java.lang.String |
getModContainerState(java.lang.String modId) |
ModFileInfo |
getModFileById(java.lang.String modid) |
java.util.List<ModFileInfo> |
getModFiles() |
<T> java.util.Optional<T> |
getModObjectById(java.lang.String modId) |
java.util.List<ModInfo> |
getMods() |
boolean |
isLoaded(java.lang.String modTarget) |
private static java.util.concurrent.ForkJoinWorkerThread |
newForkJoinWorkerThread(java.util.concurrent.ForkJoinPool pool) |
static ModList |
of(java.util.List<ModFile> modFiles,
java.util.List<ModInfo> sortedList) |
(package private) void |
setLoadedMods(java.util.List<ModContainer> modContainers) |
int |
size() |
private static org.apache.logging.log4j.Logger LOGGER
private static ModList INSTANCE
private final java.util.List<ModFileInfo> modFiles
private final java.util.List<ModInfo> sortedList
private final java.util.Map<java.lang.String,ModFileInfo> fileById
private java.util.List<ModContainer> mods
private java.util.Map<java.lang.String,ModContainer> indexedMods
private java.util.concurrent.ForkJoinPool modLoadingThreadPool
private java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> modFileScanData
static LifecycleEventProvider.EventHandler<LifecycleEventProvider.LifecycleEvent,java.util.function.Consumer<java.util.List<ModLoadingException>>,java.util.concurrent.Executor,java.lang.Runnable> inlineDispatcher
static LifecycleEventProvider.EventHandler<LifecycleEventProvider.LifecycleEvent,java.util.function.Consumer<java.util.List<ModLoadingException>>,java.util.concurrent.Executor,java.lang.Runnable> parallelDispatcher
private java.lang.String getModContainerState(java.lang.String modId)
private java.lang.String fileToLine(ModFile mf)
private java.lang.String crashReport()
public static ModList get()
private static java.util.concurrent.ForkJoinWorkerThread newForkJoinWorkerThread(java.util.concurrent.ForkJoinPool pool)
public java.util.List<ModFileInfo> getModFiles()
public ModFileInfo getModFileById(java.lang.String modid)
private void dispatchSynchronousEvent(LifecycleEventProvider.LifecycleEvent lifecycleEvent, java.util.function.Consumer<java.util.List<ModLoadingException>> errorHandler, java.util.concurrent.Executor executor, java.lang.Runnable ticker)
private void dispatchParallelEvent(LifecycleEventProvider.LifecycleEvent lifecycleEvent, java.util.function.Consumer<java.util.List<ModLoadingException>> errorHandler, java.util.concurrent.Executor executor, java.lang.Runnable ticker)
void setLoadedMods(java.util.List<ModContainer> modContainers)
public <T> java.util.Optional<T> getModObjectById(java.lang.String modId)
public java.util.Optional<? extends ModContainer> getModContainerById(java.lang.String modId)
public java.util.Optional<? extends ModContainer> getModContainerByObject(java.lang.Object obj)
public java.util.List<ModInfo> getMods()
public boolean isLoaded(java.lang.String modTarget)
public int size()
public java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> getAllScanData()
public void forEachModFile(java.util.function.Consumer<ModFile> fileConsumer)
public <T> java.util.stream.Stream<T> applyForEachModFile(java.util.function.Function<ModFile,T> function)
public void forEachModContainer(java.util.function.BiConsumer<java.lang.String,ModContainer> modContainerConsumer)
public <T> java.util.stream.Stream<T> applyForEachModContainer(java.util.function.Function<ModContainer,T> function)