Class CommonWirelessEventBusWire

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

public final class CommonWirelessEventBusWire extends Object implements IEventBusWire
Wire that allows the creation of a wireless IEventBus.

An event bus is defined as wireless if it does not require any additional wiring in order to be operative, allowing it to behave fully standalone. This is usually the case for buses for common events, as they do not have to latch onto a pre-existing event bus.

Since:
11.0.0
  • Method Details

    • of

      public static IEventBusWire of()
      Obtains an instance of a CommonWirelessEventBusWire.
      Returns:
      An event wire instance.
      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.