Class ForgeEventBusWire

java.lang.Object
com.blamejared.crafttweaker.api.event.bus.ForgeEventBusWire
All Implemented Interfaces:
IEventBusWire

public final class ForgeEventBusWire extends Object implements IEventBusWire
Wires the given IEventBus onto the default Forge's IEventBus.

The default event bus is MinecraftForge.EVENT_BUS.

By default, all even Phases are automatically wired according to the various EventPriority values provided by Forge.

Since:
11.0.0
  • Method Details

    • of

      public static IEventBusWire of()
      Obtains an instance of this class.
      Returns:
      An instance of this class.
      Since:
      11.0.0
    • registerBusForDispatch

      public <T> void registerBusForDispatch(com.google.common.reflect.TypeToken<T> eventType, IEventBus<T> bus)
      Description copied from interface: IEventBusWire
      Performs the necessary work to wire the given IEventBus to its platform-specific counterpart.
      Specified by:
      registerBusForDispatch in interface IEventBusWire
      Type Parameters:
      T - The type of the events fired in the bus.
      Parameters:
      eventType - The type of the events fired in the bus; this corresponds to invoking IEventBus.eventType() on bus.
      bus - The IEventBus that should be wired.