Enum Class ModLoadingStage

java.lang.Object
java.lang.Enum<ModLoadingStage>
net.minecraftforge.fml.ModLoadingStage
All Implemented Interfaces:
Serializable, Comparable<ModLoadingStage>, Constable

public enum ModLoadingStage extends Enum<ModLoadingStage>
Mod loading stage of mod containers during the mod loading process. These will have a corresponding ModLoadingState in the basic mod loading process provided by FML.

Each mod loading stage has a global DeferredWorkQueue, which is populated during the execution of the state associated with this stage and emptied at the end of the state's execution.

  • Enum Constant Details

    • ERROR

      public static final ModLoadingStage ERROR
      Special stage for exceptional situations and error handling.
    • VALIDATE

      public static final ModLoadingStage VALIDATE
      Validation of the mod list. TODO: figure out where this is used and why this exists instead of CONSTRUCT being the first normal stage
    • CONSTRUCT

      public static final ModLoadingStage CONSTRUCT
      Default stage of mod containers after construction.
    • COMMON_SETUP

      public static final ModLoadingStage COMMON_SETUP
      Common (non-side-specific) setup and initialization.
    • SIDED_SETUP

      public static final ModLoadingStage SIDED_SETUP
      Side-specific setup and initialization.
      See Also:
      • Dist
    • ENQUEUE_IMC

      public static final ModLoadingStage ENQUEUE_IMC
      Stage for enqueuing InterModComms messages for later processing.
    • PROCESS_IMC

      public static final ModLoadingStage PROCESS_IMC
      Stage for processing received messages though InterModComms.
    • COMPLETE

      public static final ModLoadingStage COMPLETE
      Marks the completion of mod loading for this container.
    • DONE

      public static final ModLoadingStage DONE
      Marks the completion of the full mod loading process.
  • Field Details

  • Constructor Details

    • ModLoadingStage

      private ModLoadingStage()
  • Method Details

    • values

      public static ModLoadingStage[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ModLoadingStage valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • nextState

      ModLoadingStage nextState(Throwable exception)
      Returns the next stage after this stage, or ERROR if the exception is not null.
      Parameters:
      exception - the exception that occurred during this stage, may be null
      Returns:
      the next stage after this stage, or ERROR if the exception is not null
    • currentState

      public ModLoadingStage currentState(Throwable exception)
      Returns this stage, or ERROR if the exception is not null.
      Parameters:
      exception - the exception that occurred during this stage, may be null
      Returns:
      this stage, or ERROR if the exception is not null
    • getDeferredWorkQueue

      public DeferredWorkQueue getDeferredWorkQueue()
      Returns the deferred work queue for this stage.
      Returns:
      the deferred work queue for this stage