Class FrozenEvents

java.lang.Object
net.frozenblock.lib.event.api.FrozenEvents

public class FrozenEvents extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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> void
    register(net.fabricmc.fabric.api.event.Event<T> event, Class<? super T> type)
    Registers the specified event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 created
      invokerFactory - 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 created
      emptyInvoker - An empty invoker for the event
      invokerFactory - 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 registered
      type - The type of the event to be registered