Package net.minecraftforge.common
Record Class ForgeStatesProvider.SerialTransition<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
java.lang.Object
java.lang.Record
net.minecraftforge.common.ForgeStatesProvider.SerialTransition<T>
- All Implemented Interfaces:
IModStateTransition
- Enclosing class:
- ForgeStatesProvider
static record ForgeStatesProvider.SerialTransition<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream, BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>,CompletableFuture<List<Throwable>>> preDispatchHook, BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>,CompletableFuture<List<Throwable>>> postDispatchHook, BiFunction<Executor,CompletableFuture<List<Throwable>>,CompletableFuture<List<Throwable>>> finalActivityGenerator)
extends Record
implements IModStateTransition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraftforge.fml.IModStateTransition
IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Supplier<Stream<IModStateTransition.EventGenerator<?>>>The field for theeventStreamrecord component.private final BiFunction<Executor,CompletableFuture<List<Throwable>>, CompletableFuture<List<Throwable>>> The field for thefinalActivityGeneratorrecord component.private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> The field for thepostDispatchHookrecord component.private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> The field for thepreDispatchHookrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSerialTransition(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream, BiFunction<Executor, ? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> preDispatchHook, BiFunction<Executor, ? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> postDispatchHook, BiFunction<Executor, CompletableFuture<List<Throwable>>, CompletableFuture<List<Throwable>>> finalActivityGenerator) Creates an instance of aSerialTransitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventStreamrecord component.Returns the value of thefinalActivityGeneratorrecord component.final inthashCode()Returns a hash code value for this object.static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
ForgeStatesProvider.SerialTransition<T>of(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream) BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> Returns the value of thepostDispatchHookrecord component.BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> Returns the value of thepreDispatchHookrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.fml.IModStateTransition
build
-
Field Details
-
eventStream
The field for theeventStreamrecord component. -
preDispatchHook
private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>, preDispatchHookCompletableFuture<List<Throwable>>> The field for thepreDispatchHookrecord component. -
postDispatchHook
private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>, postDispatchHookCompletableFuture<List<Throwable>>> The field for thepostDispatchHookrecord component. -
finalActivityGenerator
private final BiFunction<Executor,CompletableFuture<List<Throwable>>, finalActivityGeneratorCompletableFuture<List<Throwable>>> The field for thefinalActivityGeneratorrecord component.
-
-
Constructor Details
-
SerialTransition
SerialTransition(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream, BiFunction<Executor, ? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> preDispatchHook, BiFunction<Executor, ? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> postDispatchHook, BiFunction<Executor, CompletableFuture<List<Throwable>>, CompletableFuture<List<Throwable>>> finalActivityGenerator) Creates an instance of aSerialTransitionrecord class.- Parameters:
eventStream- the value for theeventStreamrecord componentpreDispatchHook- the value for thepreDispatchHookrecord componentpostDispatchHook- the value for thepostDispatchHookrecord componentfinalActivityGenerator- the value for thefinalActivityGeneratorrecord component
-
-
Method Details
-
of
public static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> ForgeStatesProvider.SerialTransition<T> of(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream) -
eventFunctionStream
- Specified by:
eventFunctionStreamin interfaceIModStateTransition
-
threadSelector
- Specified by:
threadSelectorin interfaceIModStateTransition
-
nextModLoadingStage
- Specified by:
nextModLoadingStagein interfaceIModStateTransition
-
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). -
eventStream
Returns the value of theeventStreamrecord component.- Returns:
- the value of the
eventStreamrecord component
-
preDispatchHook
public BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, preDispatchHook()CompletableFuture<List<Throwable>>> Returns the value of thepreDispatchHookrecord component.- Specified by:
preDispatchHookin interfaceIModStateTransition- Returns:
- the value of the
preDispatchHookrecord component
-
postDispatchHook
public BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>, postDispatchHook()CompletableFuture<List<Throwable>>> Returns the value of thepostDispatchHookrecord component.- Specified by:
postDispatchHookin interfaceIModStateTransition- Returns:
- the value of the
postDispatchHookrecord component
-
finalActivityGenerator
public BiFunction<Executor,CompletableFuture<List<Throwable>>, finalActivityGenerator()CompletableFuture<List<Throwable>>> Returns the value of thefinalActivityGeneratorrecord component.- Specified by:
finalActivityGeneratorin interfaceIModStateTransition- Returns:
- the value of the
finalActivityGeneratorrecord component
-