java.lang.Object
net.neoforged.bus.BusBuilderImpl
- All Implemented Interfaces:
BusBuilder
BusBuilder Implementation, public for BusBuilder.builder() only, don't use this directly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllow callingIEventBus.post(EventPriority, Event).build()Returns a built bus configured according to the configuration of this builder.Make the bus check posted events using theclass checker.classChecker(IEventClassChecker checker) Set a class checker that will allow validating the event types that the bus can handle.Override the default exception handler.Create the bus in a shut down state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.BusBuilder
markerType
-
Constructor Details
-
BusBuilderImpl
public BusBuilderImpl()
-
-
Method Details
-
setExceptionHandler
Description copied from interface:BusBuilderOverride the default exception handler.- Specified by:
setExceptionHandlerin interfaceBusBuilder- Parameters:
handler- the custom exception handler to use- Returns:
- the builder instance
-
startShutdown
Description copied from interface:BusBuilderCreate the bus in a shut down state.This bus will not post events (and will instead silently ignore them) until it is
started.- Specified by:
startShutdownin interfaceBusBuilder- Returns:
- the builder instance
-
checkTypesOnDispatch
Description copied from interface:BusBuilderMake the bus check posted events using theclass checker.- Specified by:
checkTypesOnDispatchin interfaceBusBuilder- Returns:
- the builder instance
-
classChecker
Description copied from interface:BusBuilderSet a class checker that will allow validating the event types that the bus can handle.- Specified by:
classCheckerin interfaceBusBuilder- Parameters:
checker- the custom checker- Returns:
- the builder instance
-
allowPerPhasePost
Description copied from interface:BusBuilderAllow callingIEventBus.post(EventPriority, Event).- Specified by:
allowPerPhasePostin interfaceBusBuilder
-
build
Description copied from interface:BusBuilderReturns a built bus configured according to the configuration of this builder.- Specified by:
buildin interfaceBusBuilder- Returns:
- a built bus configured according to the configuration of this builder
-