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
Modifier and TypeFieldDescriptionprivate final Supplier<Stream<IModStateTransition.EventGenerator<?>>>
The field for theeventStream
record component.private final BiFunction<Executor,
CompletableFuture<List<Throwable>>, CompletableFuture<List<Throwable>>> The field for thefinalActivityGenerator
record component.private final BiFunction<Executor,
? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> The field for thepostDispatchHook
record component.private final 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 TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theeventStream
record component.Returns the value of thefinalActivityGenerator
record component.final int
hashCode()
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 thepostDispatchHook
record component.BiFunction<Executor,
? extends IModStateTransition.EventGenerator<T>, CompletableFuture<List<Throwable>>> Returns the value of thepreDispatchHook
record component.final String
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>, preDispatchHookCompletableFuture<List<Throwable>>> The field for thepreDispatchHook
record component. -
postDispatchHook
private final BiFunction<Executor,? extends IModStateTransition.EventGenerator<T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>, postDispatchHookCompletableFuture<List<Throwable>>> The field for thepostDispatchHook
record component. -
finalActivityGenerator
private final BiFunction<Executor,CompletableFuture<List<Throwable>>, finalActivityGeneratorCompletableFuture<List<Throwable>>> The 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> ForgeStatesProvider.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>, preDispatchHook()CompletableFuture<List<Throwable>>> 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>, postDispatchHook()CompletableFuture<List<Throwable>>> 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>>, finalActivityGenerator()CompletableFuture<List<Throwable>>> Returns the value of thefinalActivityGenerator
record component.- Specified by:
finalActivityGenerator
in interfaceIModStateTransition
- Returns:
- the value of the
finalActivityGenerator
record component
-