Class ImmersiveMCRegistrationImpl
java.lang.Object
com.hammy275.immersivemc.common.api_impl.ImmersiveMCRegistrationImpl
- All Implemented Interfaces:
ImmersiveMCRegistration
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addImmersiveHandlerRegistrationHandler
(Consumer<ImmersiveMCRegistrationEvent<ImmersiveHandler<?>>> registrationHandler) Registers an object which, at some point, ImmersiveMC will call to register yourImmersiveHandler
s.static void
doImmersiveRegistration
(Consumer<ImmersiveHandler<?>> immersiveHandlerConsumer)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ImmersiveMCRegistrationImpl
public ImmersiveMCRegistrationImpl()
-
-
Method Details
-
doImmersiveRegistration
-
addImmersiveHandlerRegistrationHandler
public void addImmersiveHandlerRegistrationHandler(Consumer<ImmersiveMCRegistrationEvent<ImmersiveHandler<?>>> registrationHandler) throws IllegalStateException Description copied from interface:ImmersiveMCRegistration
Registers an object which, at some point, ImmersiveMC will call to register yourImmersiveHandler
s. The time at which registration occurs is only guaranteed to be some time after mods are initially constructed, so handlers should be added here as early as possible, and be prepared for a lack of registry availability.- Specified by:
addImmersiveHandlerRegistrationHandler
in interfaceImmersiveMCRegistration
- Parameters:
registrationHandler
- Your object that will register ImmersiveHandlers when called.- Throws:
IllegalStateException
- This method was called after registration.
-