Package net.minecraftforge.fml
Record Class ModLoadingState
java.lang.Object
java.lang.Record
net.minecraftforge.fml.ModLoadingState
- All Implemented Interfaces:
IModLoadingState
public record ModLoadingState(String name, String previous, Function<ModList,String> message, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition)
extends Record
implements IModLoadingState
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theinlineRunnablerecord component.The field for themessagerecord component.private final StringThe field for thenamerecord component.private final ModLoadingPhaseThe field for thephaserecord component.private final StringThe field for thepreviousrecord component.private final Optional<IModStateTransition>The field for thetransitionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModLoadingState(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition) Creates an instance of aModLoadingStaterecord class. -
Method Summary
Modifier and TypeMethodDescription<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
Optional<CompletableFuture<List<Throwable>>>buildTransition(Executor syncExecutor, Executor parallelExecutor, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) static ModLoadingStateempty(String name, String previous, ModLoadingPhase phase) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinlineRunnablerecord component.message()Returns the value of themessagerecord component.name()Returns the value of thenamerecord component.phase()Returns the value of thephaserecord component.previous()Returns the value of thepreviousrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionrecord component.static ModLoadingStatewithInline(String name, String previous, ModLoadingPhase phase, Consumer<ModList> inline) static ModLoadingStatewithTransition(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, IModStateTransition transition) static ModLoadingStatewithTransition(String name, String previous, ModLoadingPhase phase, IModStateTransition transition) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.fml.IModLoadingState
buildTransition
-
Field Details
-
name
The field for thenamerecord component. -
previous
The field for thepreviousrecord component. -
message
The field for themessagerecord component. -
phase
The field for thephaserecord component. -
inlineRunnable
The field for theinlineRunnablerecord component. -
transition
The field for thetransitionrecord component.
-
-
Constructor Details
-
ModLoadingState
public ModLoadingState(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, Optional<Consumer<ModList>> inlineRunnable, Optional<IModStateTransition> transition) Creates an instance of aModLoadingStaterecord class.- Parameters:
name- the value for thenamerecord componentprevious- the value for thepreviousrecord componentmessage- the value for themessagerecord componentphase- the value for thephaserecord componentinlineRunnable- the value for theinlineRunnablerecord componenttransition- the value for thetransitionrecord component
-
-
Method Details
-
buildTransition
public <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> Optional<CompletableFuture<List<Throwable>>> buildTransition(Executor syncExecutor, Executor parallelExecutor, Function<Executor, CompletableFuture<Void>> preSyncTask, Function<Executor, CompletableFuture<Void>> postSyncTask) - Specified by:
buildTransitionin interfaceIModLoadingState
-
empty
-
withTransition
public static ModLoadingState withTransition(String name, String previous, ModLoadingPhase phase, IModStateTransition transition) -
withTransition
public static ModLoadingState withTransition(String name, String previous, Function<ModList, String> message, ModLoadingPhase phase, IModStateTransition transition) -
withInline
public static ModLoadingState withInline(String name, String previous, ModLoadingPhase phase, Consumer<ModList> inline) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceIModLoadingState- Returns:
- the value of the
namerecord component
-
previous
Returns the value of thepreviousrecord component.- Specified by:
previousin interfaceIModLoadingState- Returns:
- the value of the
previousrecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceIModLoadingState- Returns:
- the value of the
messagerecord component
-
phase
Returns the value of thephaserecord component.- Specified by:
phasein interfaceIModLoadingState- Returns:
- the value of the
phaserecord component
-
inlineRunnable
Returns the value of theinlineRunnablerecord component.- Specified by:
inlineRunnablein interfaceIModLoadingState- Returns:
- the value of the
inlineRunnablerecord component
-
transition
Returns the value of thetransitionrecord component.- Returns:
- the value of the
transitionrecord component
-