Package net.minecraftforge.fml
Class ModList
- java.lang.Object
-
- net.minecraftforge.fml.ModList
-
public class ModList extends java.lang.Object
Master list of all mods - game-side version. This is classloaded in the game scope and can dispatch game level events as a result.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ModList.UncaughtModLoadingException
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,ModFileInfo>
fileById
private java.util.Map<java.lang.String,ModContainer>
indexedMods
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.List<ModContainer>
mods
private java.util.List<ModInfo>
sortedList
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
(package private) static java.util.concurrent.CompletionStage<java.util.List<java.lang.Throwable>>
completableFutureFromExceptionList(java.util.List<? extends java.util.Map.Entry<?,java.lang.Throwable>> t)
private java.lang.String
crashReport()
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)
(package private) <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>>futureVisitor(ModLoadingStage.EventGenerator<T> eventGenerator, java.util.function.BiFunction<ModLoadingStage,java.lang.Throwable,ModLoadingStage> stateChange)
(package private) static <V> java.util.concurrent.CompletableFuture<java.util.List<java.util.Map.Entry<V,java.lang.Throwable>>>
gather(java.util.List<? extends java.util.concurrent.CompletableFuture<? extends V>> futures)
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()
-
-
-
Field Detail
-
LOGGER
private static org.apache.logging.log4j.Logger LOGGER
-
INSTANCE
private static ModList INSTANCE
-
modFiles
private final java.util.List<ModFileInfo> modFiles
-
sortedList
private final java.util.List<ModInfo> sortedList
-
fileById
private final java.util.Map<java.lang.String,ModFileInfo> fileById
-
mods
private java.util.List<ModContainer> mods
-
indexedMods
private java.util.Map<java.lang.String,ModContainer> indexedMods
-
modFileScanData
private java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> modFileScanData
-
-
Method Detail
-
getModContainerState
private java.lang.String getModContainerState(java.lang.String modId)
-
fileToLine
private java.lang.String fileToLine(ModFile mf)
-
crashReport
private java.lang.String crashReport()
-
get
public static ModList get()
-
newForkJoinWorkerThread
private static java.util.concurrent.ForkJoinWorkerThread newForkJoinWorkerThread(java.util.concurrent.ForkJoinPool pool)
-
getModFiles
public java.util.List<ModFileInfo> getModFiles()
-
getModFileById
public ModFileInfo getModFileById(java.lang.String modid)
-
futureVisitor
<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> futureVisitor(ModLoadingStage.EventGenerator<T> eventGenerator, java.util.function.BiFunction<ModLoadingStage,java.lang.Throwable,ModLoadingStage> stateChange)
-
completableFutureFromExceptionList
static java.util.concurrent.CompletionStage<java.util.List<java.lang.Throwable>> completableFutureFromExceptionList(java.util.List<? extends java.util.Map.Entry<?,java.lang.Throwable>> t)
-
gather
static <V> java.util.concurrent.CompletableFuture<java.util.List<java.util.Map.Entry<V,java.lang.Throwable>>> gather(java.util.List<? extends java.util.concurrent.CompletableFuture<? extends V>> futures)
-
setLoadedMods
void setLoadedMods(java.util.List<ModContainer> modContainers)
-
getModObjectById
public <T> java.util.Optional<T> getModObjectById(java.lang.String modId)
-
getModContainerById
public java.util.Optional<? extends ModContainer> getModContainerById(java.lang.String modId)
-
getModContainerByObject
public java.util.Optional<? extends ModContainer> getModContainerByObject(java.lang.Object obj)
-
getMods
public java.util.List<ModInfo> getMods()
-
isLoaded
public boolean isLoaded(java.lang.String modTarget)
-
size
public int size()
-
getAllScanData
public java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> getAllScanData()
-
forEachModFile
public void forEachModFile(java.util.function.Consumer<ModFile> fileConsumer)
-
applyForEachModFile
public <T> java.util.stream.Stream<T> applyForEachModFile(java.util.function.Function<ModFile,T> function)
-
forEachModContainer
public void forEachModContainer(java.util.function.BiConsumer<java.lang.String,ModContainer> modContainerConsumer)
-
applyForEachModContainer
public <T> java.util.stream.Stream<T> applyForEachModContainer(java.util.function.Function<ModContainer,T> function)
-
-