Package net.minecraftforge.fml
Enum ModLoadingStage
- java.lang.Object
-
- java.lang.Enum<ModLoadingStage>
-
- net.minecraftforge.fml.ModLoadingStage
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModLoadingStage>
public enum ModLoadingStage extends java.lang.Enum<ModLoadingStage>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ModLoadingStage.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
(package private) static class
ModLoadingStage.ThreadSelector
-
Enum Constant Summary
Enum Constants Enum Constant Description COMMON_SETUP
COMPLETE
CONSTRUCT
CREATE_REGISTRIES
DONE
ENQUEUE_IMC
ERROR
LOAD_REGISTRIES
PROCESS_IMC
SIDED_SETUP
VALIDATE
-
Field Summary
Fields Modifier and Type Field Description private DeferredWorkQueue
deferredWorkQueue
private java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>>
eventFunctionStream
private java.util.function.BiFunction<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>>
finalActivityGenerator
private java.util.Optional<java.lang.Class<? extends ParallelDispatchEvent>>
parallelEventClass
private java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<?>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>>
postDispatchHook
private java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<?>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>>
preDispatchHook
private ModLoadingStage.ThreadSelector
threadSelector
-
Constructor Summary
Constructors Modifier Constructor Description private
ModLoadingStage()
private
ModLoadingStage(java.lang.Class<? extends ParallelDispatchEvent> parallelClass)
private
ModLoadingStage(java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>> eventStream)
private
ModLoadingStage(java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>> eventStream, java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<T>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> preDispatchHook, java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<T>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> postDispatchHook, java.util.function.BiFunction<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> finalActivityGenerator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
ModLoadingStage.EventGenerator<T>addCompletableFutureTaskForModDispatch(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor, java.util.List<java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> completeableFutures, ModLoadingStage.EventGenerator<T> eventGenerator, java.util.function.BiFunction<ModLoadingStage,java.lang.Throwable,ModLoadingStage> nextState, ModLoadingStage.EventGenerator<T> nextGenerator)
<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>buildTransition(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor)
<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>buildTransition(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor, java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.lang.Void>> preSyncTask, java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.lang.Void>> postSyncTask)
(package private) ModLoadingStage
currentState(java.lang.Throwable exception)
DeferredWorkQueue
getDeferredWorkQueue()
java.util.Optional<java.lang.Class<? extends ParallelDispatchEvent>>
getParallelEventClass()
(package private) ModLoadingStage
nextState(java.lang.Throwable exception)
static ModLoadingStage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ModLoadingStage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ERROR
public static final ModLoadingStage ERROR
-
VALIDATE
public static final ModLoadingStage VALIDATE
-
CONSTRUCT
public static final ModLoadingStage CONSTRUCT
-
CREATE_REGISTRIES
public static final ModLoadingStage CREATE_REGISTRIES
-
LOAD_REGISTRIES
public static final ModLoadingStage LOAD_REGISTRIES
-
COMMON_SETUP
public static final ModLoadingStage COMMON_SETUP
-
SIDED_SETUP
public static final ModLoadingStage SIDED_SETUP
-
ENQUEUE_IMC
public static final ModLoadingStage ENQUEUE_IMC
-
PROCESS_IMC
public static final ModLoadingStage PROCESS_IMC
-
COMPLETE
public static final ModLoadingStage COMPLETE
-
DONE
public static final ModLoadingStage DONE
-
-
Field Detail
-
eventFunctionStream
private final java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>> eventFunctionStream
-
parallelEventClass
private final java.util.Optional<java.lang.Class<? extends ParallelDispatchEvent>> parallelEventClass
-
threadSelector
private final ModLoadingStage.ThreadSelector threadSelector
-
finalActivityGenerator
private final java.util.function.BiFunction<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> finalActivityGenerator
-
preDispatchHook
private final java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<?>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> preDispatchHook
-
postDispatchHook
private final java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<?>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> postDispatchHook
-
deferredWorkQueue
private DeferredWorkQueue deferredWorkQueue
-
-
Constructor Detail
-
ModLoadingStage
private ModLoadingStage(java.lang.Class<? extends ParallelDispatchEvent> parallelClass)
-
ModLoadingStage
private ModLoadingStage(java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>> eventStream)
-
ModLoadingStage
private ModLoadingStage(java.util.function.Supplier<java.util.stream.Stream<ModLoadingStage.EventGenerator<?>>> eventStream, java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<T>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> preDispatchHook, java.util.function.BiFunction<java.util.concurrent.Executor,? extends ModLoadingStage.EventGenerator<T>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> postDispatchHook, java.util.function.BiFunction<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>,java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> finalActivityGenerator)
-
ModLoadingStage
private ModLoadingStage()
-
-
Method Detail
-
values
public static ModLoadingStage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModLoadingStage c : ModLoadingStage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModLoadingStage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
buildTransition
public <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>> buildTransition(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor)
-
buildTransition
public <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>> buildTransition(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor, java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.lang.Void>> preSyncTask, java.util.function.Function<java.util.concurrent.Executor,java.util.concurrent.CompletableFuture<java.lang.Void>> postSyncTask)
-
addCompletableFutureTaskForModDispatch
private <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> ModLoadingStage.EventGenerator<T> addCompletableFutureTaskForModDispatch(java.util.concurrent.Executor syncExecutor, java.util.concurrent.Executor parallelExecutor, java.util.List<java.util.concurrent.CompletableFuture<java.util.List<java.lang.Throwable>>> completeableFutures, ModLoadingStage.EventGenerator<T> eventGenerator, java.util.function.BiFunction<ModLoadingStage,java.lang.Throwable,ModLoadingStage> nextState, ModLoadingStage.EventGenerator<T> nextGenerator)
-
nextState
ModLoadingStage nextState(java.lang.Throwable exception)
-
currentState
ModLoadingStage currentState(java.lang.Throwable exception)
-
getParallelEventClass
public java.util.Optional<java.lang.Class<? extends ParallelDispatchEvent>> getParallelEventClass()
-
getDeferredWorkQueue
public DeferredWorkQueue getDeferredWorkQueue()
-
-