Class ImmersiveMCRegistrationImpl
java.lang.Object
com.hammy275.immersivemc.common.api_impl.ImmersiveMCRegistrationImpl
- All Implemented Interfaces:
ImmersiveMCRegistration
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImmersiveHandlerRegistrationHandler(Consumer<ImmersiveMCRegistrationEvent<ImmersiveHandler<?>>> registrationHandler) Registers an object which, at some point, ImmersiveMC will call to register yourImmersiveHandlers.voidaddPettingHandlerRegistrationHandler(Consumer<ImmersiveMCRegistrationEvent<PettingHandler<?>>> registrationHandler) Registers an object which, at some point, ImmersiveMC will call to register yourPettingHandlers.static voiddoImmersiveRegistration(Consumer<ImmersiveHandler<?>> immersiveHandlerConsumer) static voiddoPettingHandlerRegistration(Consumer<PettingHandler<?>> pettingHandlerConsumer)
-
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:ImmersiveMCRegistrationRegisters an object which, at some point, ImmersiveMC will call to register yourImmersiveHandlers. 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:
addImmersiveHandlerRegistrationHandlerin interfaceImmersiveMCRegistration- Parameters:
registrationHandler- Your object that will register ImmersiveHandlers when called.- Throws:
IllegalStateException- This method was called after registration.
-
doPettingHandlerRegistration
-
addPettingHandlerRegistrationHandler
public void addPettingHandlerRegistrationHandler(Consumer<ImmersiveMCRegistrationEvent<PettingHandler<?>>> registrationHandler) throws IllegalStateException Description copied from interface:ImmersiveMCRegistrationRegisters an object which, at some point, ImmersiveMC will call to register yourPettingHandlers. 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:
addPettingHandlerRegistrationHandlerin interfaceImmersiveMCRegistration- Parameters:
registrationHandler- Your object that will register PettingHandlers when called.- Throws:
IllegalStateException- This method was called after registration.
-