Package net.neoforged.fml
Class ModList
java.lang.Object
net.neoforged.fml.ModList
Master list of all mods - game-side version. This is classloaded in the game scope and
can dispatch game level events as a result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, ModFileInfo> private Map
<String, ModContainer> private static ModList
private final List
<IModFileInfo> private List
<ModFileScanData> private List
<ModContainer> private List
<ModContainer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Stream
<T> applyForEachModContainer
(Function<ModContainer, T> function) <T> Stream
<T> applyForEachModFile
(Function<IModFile, T> function) <T> Stream
<T> applyForEachModFileAlphabetical
(Function<IModFile, T> function) Stream sorted by Mod Name in alphabetical order(package private) static CompletionStage
<Void> completableFutureFromExceptionList
(List<? extends Map.Entry<?, Throwable>> t) private String
private String
fileToLine
(IModFile mf) void
forEachModContainer
(BiConsumer<String, ModContainer> modContainerConsumer) void
forEachModFile
(Consumer<IModFile> fileConsumer) void
forEachModInOrder
(Consumer<ModContainer> containerConsumer) (package private) static <V> CompletableFuture
<List<Map.Entry<V, Throwable>>> gather
(List<? extends CompletableFuture<? extends V>> futures) static ModList
get()
Optional
<? extends ModContainer> getModContainerById
(String modId) getModFileById
(String modid) getMods()
boolean
static ModList
(package private) void
setLoadedMods
(List<ModContainer> modContainers) int
size()
-
Field Details
-
INSTANCE
-
modFiles
-
sortedList
-
fileById
-
mods
-
indexedMods
-
modFileScanData
-
sortedContainers
-
-
Constructor Details
-
ModList
-
-
Method Details
-
fileToLine
-
crashReport
-
of
-
get
-
getModFiles
-
getModFileById
-
completableFutureFromExceptionList
static CompletionStage<Void> completableFutureFromExceptionList(List<? extends Map.Entry<?, Throwable>> t) -
gather
static <V> CompletableFuture<List<Map.Entry<V,Throwable>>> gather(List<? extends CompletableFuture<? extends V>> futures) -
setLoadedMods
-
getModContainerById
-
getMods
-
isLoaded
-
size
public int size() -
getAllScanData
-
forEachModFile
-
applyForEachModFile
-
applyForEachModFileAlphabetical
Stream sorted by Mod Name in alphabetical order -
forEachModContainer
-
getSortedMods
-
forEachModInOrder
-
applyForEachModContainer
-