记录类 ModLoadingState
java.lang.Object
java.lang.Record
net.minecraftforge.fml.ModLoadingState
- 记录组件:
name
- the name of this stateprevious
- the name of the state immediately previous to this statemessage
- a function returning a human-friendly message for this statephase
- the mod loading phase this state belongs toinlineRunnable
- an optional runnable, which runs before starting the transition from this state to the nexttransition
- optional state transition information
- 所有已实现的接口:
IModLoadingState
public record ModLoadingState(String name, String previous, Function<ModList,String> message, ToIntFunction<ModList> size, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition)
extends Record
implements IModLoadingState
Implementation of the
IModLoadingState
interface.-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明inlineRunnable
记录组件的字段。message
记录组件的字段。private final String
name
记录组件的字段。private final ModLoadingPhase
phase
记录组件的字段。private final String
previous
记录组件的字段。private final ToIntFunction
<ModList> size
记录组件的字段。private final Optional
<IModStateTransition> transition
记录组件的字段。 -
构造器概要
构造器构造器说明ModLoadingState
(String name, String previous, Function<ModList, String> message, ToIntFunction<ModList> size, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition) 创建ModLoadingState
记录类的实例。 -
方法概要
修饰符和类型方法说明<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
Optional<CompletableFuture<Void>> buildTransition
(Executor syncExecutor, Executor parallelExecutor, ProgressMeter progressBar, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) Builds the transition task for this state.static ModLoadingState
empty
(String name, String previous, ModLoadingPhase phase) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderfinal boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。返回inlineRunnable
记录组件的值。message()
返回message
记录组件的值。name()
返回name
记录组件的值。static ModLoadingState.Builder
of
(String name, ModLoadingPhase phase) phase()
返回phase
记录组件的值。previous()
返回previous
记录组件的值。size()
返回size
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。返回transition
记录组件的值。static ModLoadingState
withInline
(String name, String previous, ModLoadingPhase phase, Consumer<ModList> inline) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderstatic ModLoadingState
withTransition
(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, IModStateTransition transition) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderstatic ModLoadingState
withTransition
(String name, String previous, ModLoadingPhase phase, IModStateTransition transition) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builder从接口继承的方法 net.minecraftforge.fml.IModLoadingState
buildTransition
-
字段详细资料
-
name
name
记录组件的字段。 -
previous
previous
记录组件的字段。 -
message
message
记录组件的字段。 -
size
size
记录组件的字段。 -
phase
phase
记录组件的字段。 -
inlineRunnable
inlineRunnable
记录组件的字段。 -
transition
transition
记录组件的字段。
-
-
构造器详细资料
-
ModLoadingState
public ModLoadingState(String name, String previous, Function<ModList, String> message, ToIntFunction<ModList> size, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition) 创建ModLoadingState
记录类的实例。- 参数:
name
-name
记录组件的值previous
-previous
记录组件的值message
-message
记录组件的值size
-size
记录组件的值phase
-phase
记录组件的值inlineRunnable
-inlineRunnable
记录组件的值transition
-transition
记录组件的值
-
-
方法详细资料
-
buildTransition
public <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> Optional<CompletableFuture<Void>> buildTransition(Executor syncExecutor, Executor parallelExecutor, ProgressMeter progressBar, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) 从接口复制的说明:IModLoadingState
Builds the transition task for this state. The pre-sync and post-sync task functions allow the transition builder to run these tasks on the same executor as the actual event dispatch and pre/post hooks.- 指定者:
buildTransition
在接口中IModLoadingState
- 类型参数:
T
- a type of event fired on the mod-specific event bus- 参数:
syncExecutor
- a synchronous executorparallelExecutor
- a parallel executorprogressBar
- a progress meter for tracking progresspreSyncTask
- a function which returns a task to run before event pre-dispatch hookpostSyncTask
- a function which returns a task to run after event post-dispatch hook- 返回:
- a transition task for this state
-
empty
@Deprecated(since="1.21.3", forRemoval=true) public static ModLoadingState empty(String name, String previous, ModLoadingPhase phase) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builder返回 an empty mod loading state。 The mod loading state has a blank human-readable message, no inline runnable, and no state transition information.- 参数:
name
- the name of the stateprevious
- the name of the immediately previous state to this statephase
- the mod loading phase the state belongs to- 返回:
- an empty mod loading state
-
withTransition
@Deprecated(since="1.21.3", forRemoval=true) public static ModLoadingState withTransition(String name, String previous, ModLoadingPhase phase, IModStateTransition transition) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderReturns a mod loading state with state transition information and a default human-friendly message ofProcessing transition [name]
.- 参数:
name
- the name of the stateprevious
- the name of the immediately previous state to this statephase
- the mod loading phase the state belongs totransition
- the state transition information
-
withTransition
@Deprecated(since="1.21.3", forRemoval=true) public static ModLoadingState withTransition(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, IModStateTransition transition) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderReturns a mod loading state with state transition information and a custom human-friendly message function.- 参数:
name
- the name of the stateprevious
- the name of the immediately previous state to this statemessage
- a function returning a human-friendly message for this statephase
- the mod loading phase the state belongs totransition
- the state transition information- 返回:
- a mod loading state with state transition information and a custom message
-
withInline
@Deprecated(since="1.21.3", forRemoval=true) public static ModLoadingState withInline(String name, String previous, ModLoadingPhase phase, Consumer<ModList> inline) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use the builderReturns a mod loading state with an inline runnable and a default human-friendly message ofProcessing work [name]
.- 参数:
name
- the name of the stateprevious
- the name of the immediately previous state to this statephase
- the mod loading phase the state belongs toinline
- an optional runnable, which runs before starting the transition from this state to the next- 返回:
- a mod loading state with an inline runnable and default message
-
of
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
name
返回name
记录组件的值。- 指定者:
name
在接口中IModLoadingState
- 返回:
name
记录组件的值
-
previous
返回previous
记录组件的值。- 指定者:
previous
在接口中IModLoadingState
- 返回:
previous
记录组件的值
-
message
返回message
记录组件的值。- 指定者:
message
在接口中IModLoadingState
- 返回:
message
记录组件的值
-
size
返回size
记录组件的值。- 指定者:
size
在接口中IModLoadingState
- 返回:
size
记录组件的值
-
phase
返回phase
记录组件的值。- 指定者:
phase
在接口中IModLoadingState
- 返回:
phase
记录组件的值
-
inlineRunnable
返回inlineRunnable
记录组件的值。- 指定者:
inlineRunnable
在接口中IModLoadingState
- 返回:
inlineRunnable
记录组件的值- 另请参阅:
-
transition
返回transition
记录组件的值。- 返回:
transition
记录组件的值
-