Class 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.
    • 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
      • indexedMods

        private java.util.Map<java.lang.String,​ModContainer> indexedMods
      • modFileScanData

        private java.util.List<net.minecraftforge.forgespi.language.ModFileScanData> modFileScanData
    • Constructor Detail

      • ModList

        private ModList​(java.util.List<ModFile> modFiles,
                        java.util.List<ModInfo> sortedList)
    • 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()
      • of

        public static ModList of​(java.util.List<ModFile> modFiles,
                                 java.util.List<ModInfo> sortedList)
      • 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)