接口 IModStateTransition
public interface IModStateTransition
-
嵌套类概要
嵌套类修饰符和类型接口说明static interface
IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
-
字段概要
字段修饰符和类型字段说明static final BiFunction
<Executor, ? extends IModStateTransition.EventGenerator<?>, CompletableFuture<Void>> Magic value to allow me to optimize the futures list by ignoring the default value without making old methods nullable. -
方法概要
修饰符和类型方法说明default CompletableFuture
<Void> build
(String name, Executor syncExecutor, Executor parallelExecutor, ProgressMeter progressBar, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) static IModStateTransition
default <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
@Nullable IModStateTransition.EventGenerator<T> default Supplier
<Stream<IModStateTransition.EventGenerator<?>>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。default BiFunction
<Executor, ? extends IModStateTransition.EventGenerator<?>, CompletableFuture<Void>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。default BiFunction
<Executor, ? extends IModStateTransition.EventGenerator<?>, CompletableFuture<Void>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
字段详细资料
-
NULL_HOOK
static final BiFunction<Executor,? extends IModStateTransition.EventGenerator<?>, NULL_HOOKCompletableFuture<Void>> Magic value to allow me to optimize the futures list by ignoring the default value without making old methods nullable.
-
-
方法详细资料
-
buildNoopTransition
-
build
default CompletableFuture<Void> build(String name, Executor syncExecutor, Executor parallelExecutor, ProgressMeter progressBar, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) -
nextModLoadingStage
-
eventFunctionStream
@Deprecated(since="1.21.3", forRemoval=true) default Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventFunctionStream()已过时, 待删除: 此 API 元素将从以后的版本中删除。This used to allow you to fire multiple events during the transition. However, in doing so it would cause issues with the default ModContainer's event handlers causing issues such as mod classes being constructed multiple times. -
eventFunction
@Nullable default <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> @Nullable IModStateTransition.EventGenerator<T> eventFunction() -
threadSelector
ThreadSelector threadSelector() -
finalActivityGenerator
BiFunction<Executor,CompletableFuture<Void>, finalActivityGenerator()CompletableFuture<Void>> -
preDispatchHook
@Deprecated(since="1.21.3", forRemoval=true) default BiFunction<Executor,? extends IModStateTransition.EventGenerator<?>, preDispatchHook()CompletableFuture<Void>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。I think this was meant as a way to do some things for each mod container beforge/after the transition had been sent to the container. However, the Future returned by this was never linked to the main transition future in any way. Which means that it was run in parallel and couldn't guarantee the state of the ModContainer.Plus all existing code that I could find returned a completedFuture, so I don't think anyone ever used this.
If I were to add this back it would be a CompletableFuture wrap(ModContainer, CompletableFuture)
Added magic value NULL_HOOK to allow me to optimize the futures list by ignoring the default value without making this method nullable.
-
postDispatchHook
@Deprecated(since="1.21.3", forRemoval=true) default BiFunction<Executor,? extends IModStateTransition.EventGenerator<?>, postDispatchHook()CompletableFuture<Void>> 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-