Class CommonWirelessEventBusWire
java.lang.Object
com.blamejared.crafttweaker.api.event.bus.CommonWirelessEventBusWire
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionstatic IEventBusWireof()Obtains an instance of aCommonWirelessEventBusWire.<T> voidregisterBusForDispatch(com.google.common.reflect.TypeToken<T> eventType, IEventBus<T> bus) Performs the necessary work to wire the givenIEventBusto its platform-specific counterpart.
-
Method Details
-
of
Obtains an instance of aCommonWirelessEventBusWire.- 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:IEventBusWirePerforms the necessary work to wire the givenIEventBusto its platform-specific counterpart.- Specified by:
registerBusForDispatchin interfaceIEventBusWire- 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 invokingIEventBus.eventType()onbus.bus- TheIEventBusthat should be wired.
-