Package net.frozenblock.lib.event.api
Class FrozenEvents
java.lang.Object
net.frozenblock.lib.event.api.FrozenEvents
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> net.fabricmc.fabric.api.event.Event<T>createEnvironmentEvent(Class<? super T> type, Function<T[], T> invokerFactory) Creates an environment event with the specified event type and invoker factory.static <T> net.fabricmc.fabric.api.event.Event<T>createEnvironmentEvent(Class<T> type, T emptyInvoker, Function<T[], T> invokerFactory) Creates an environment event with the specified event type, empty invoker, and invoker factory.static <T> voidRegisters the specified event.
-
Constructor Details
-
FrozenEvents
public FrozenEvents()
-
-
Method Details
-
createEnvironmentEvent
public static <T> net.fabricmc.fabric.api.event.Event<T> createEnvironmentEvent(Class<? super T> type, Function<T[], T> invokerFactory) Creates an environment event with the specified event type and invoker factory.- Parameters:
type- The type of event to be createdinvokerFactory- The function to create the invoker for the event- Returns:
- A new Event of the specified type
-
createEnvironmentEvent
public static <T> net.fabricmc.fabric.api.event.Event<T> createEnvironmentEvent(Class<T> type, T emptyInvoker, Function<T[], T> invokerFactory) Creates an environment event with the specified event type, empty invoker, and invoker factory.- Parameters:
type- The type of event to be createdemptyInvoker- An empty invoker for the eventinvokerFactory- The function to create the invoker for the event- Returns:
- A new Event of the specified type
-
register
public static <T> void register(net.fabricmc.fabric.api.event.Event<T> event, Class<? super T> type) Registers the specified event.- Parameters:
event- The event to be registeredtype- The type of the event to be registered
-