接口 IModLoadingState

所有已知实现类:
ModLoadingState

public interface IModLoadingState
A mod loading state. During mod loading, the mod loader transitions between states in a defined sorted list of states, grouped into various phases.
另请参阅:
  • 方法详细资料

    • name

      String name()
      返回 the name of this state。
      返回:
      the name of this state
    • previous

      String previous()
      返回 the name of the state immediately previous to this state。 This may be a blank name, which indicates this is either the first mod loading state or an exceptional mod loading state (such as a situation where errors prevent the loading process from continuing normally).
      返回:
      the name of the state immediately previous to this state
    • phase

      返回 the mod loading phase this state belongs to。 For exceptional mod loading states, this should be ModLoadingPhase.ERROR.
      返回:
      the mod loading phase this state belongs to
    • message

      Function<ModList,String> message()
      返回 a function returning a human-friendly message for this state。
      返回:
      a function returning a human-friendly message for this state
    • size

      返回:
      a function that computes the size of this transition based on the size of the modlist. Used to compute progress.
    • inlineRunnable

      Optional<Consumer<ModList>> inlineRunnable()
      返回 an optional runnable, which runs before starting the transition from this state to the next。
      返回:
      an optional runnable, which runs before starting the transition from this state to the next
      另请参阅:
    • buildTransition

      default <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> Optional<CompletableFuture<Void>> buildTransition(Executor syncExecutor, Executor parallelExecutor, ProgressMeter progressBar)
      Builds the transition task for this state with a blank pre-sync and post-sync task.
      类型参数:
      T - a type of event fired on the mod-specific event bus
      参数:
      syncExecutor - a synchronous executor
      parallelExecutor - a parallel executor
      progressBar - a progress meter for tracking progress
      返回:
      a transition task for this state
      另请参阅:
    • buildTransition

      <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. 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.
      类型参数:
      T - a type of event fired on the mod-specific event bus
      参数:
      syncExecutor - a synchronous executor
      parallelExecutor - a parallel executor
      progressBar - a progress meter for tracking progress
      preSyncTask - a function which returns a task to run before event pre-dispatch hook
      postSyncTask - a function which returns a task to run after event post-dispatch hook
      返回:
      a transition task for this state