Package net.minecraftforge.fmllegacy
Record Class SerialTransition<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
java.lang.Object
java.lang.Record
net.minecraftforge.fmllegacy.SerialTransition<T>
- All Implemented Interfaces:
IModStateTransition
record 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
Modifier and TypeFieldDescriptionprivate Supplier<Stream<IModStateTransition.EventGenerator<?>>>
The field for theeventStream
record component.private BiFunction<Executor,CompletableFuture<List<Throwable>>,CompletableFuture<List<Throwable>>>
The field for thefinalActivityGenerator
record component.private BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>>
The field for thepostDispatchHook
record component.private BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>>
The field for thepreDispatchHook
record component. -
Constructor Summary
ConstructorDescriptionSerialTransition(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 aSerialTransition
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the value of theeventStream
record component.Returns the value of thefinalActivityGenerator
record component.int
hashCode()
Returns a hash code value for this object.static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
SerialTransition<T>of(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream)
BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>>
Returns the value of thepostDispatchHook
record component.BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>>
Returns the value of thepreDispatchHook
record component.toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.fml.IModStateTransition
build
-
Field Details
-
eventStream
The field for theeventStream
record component. -
preDispatchHook
private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>,CompletableFuture<List<Throwable>>> preDispatchHookThe field for thepreDispatchHook
record component. -
postDispatchHook
private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>,CompletableFuture<List<Throwable>>> postDispatchHookThe field for thepostDispatchHook
record component. -
finalActivityGenerator
private final BiFunction<Executor,CompletableFuture<List<Throwable>>,CompletableFuture<List<Throwable>>> finalActivityGeneratorThe field for thefinalActivityGenerator
record 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 aSerialTransition
record class.- Parameters:
eventStream
- the value for theeventStream
record componentpreDispatchHook
- the value for thepreDispatchHook
record componentpostDispatchHook
- the value for thepostDispatchHook
record componentfinalActivityGenerator
- the value for thefinalActivityGenerator
record component
-
-
Method Details
-
of
public static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> SerialTransition<T> of(Supplier<Stream<IModStateTransition.EventGenerator<?>>> eventStream) -
eventFunctionStream
- Specified by:
eventFunctionStream
in interfaceIModStateTransition
-
threadSelector
- Specified by:
threadSelector
in interfaceIModStateTransition
-
nextModLoadingStage
- Specified by:
nextModLoadingStage
in 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 theeventStream
record component.- Returns:
- the value of the
eventStream
record component
-
preDispatchHook
public BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>> preDispatchHook()Returns the value of thepreDispatchHook
record component.- Specified by:
preDispatchHook
in interfaceIModStateTransition
- Returns:
- the value of the
preDispatchHook
record component
-
postDispatchHook
public BiFunction<Executor,? extends IModStateTransition.EventGenerator<T>,CompletableFuture<List<Throwable>>> postDispatchHook()Returns the value of thepostDispatchHook
record component.- Specified by:
postDispatchHook
in interfaceIModStateTransition
- Returns:
- the value of the
postDispatchHook
record component
-
finalActivityGenerator
public BiFunction<Executor,CompletableFuture<List<Throwable>>,CompletableFuture<List<Throwable>>> finalActivityGenerator()Returns the value of thefinalActivityGenerator
record component.- Specified by:
finalActivityGenerator
in interfaceIModStateTransition
- Returns:
- the value of the
finalActivityGenerator
record component
-