Class RegisterPayloadHandlerEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.network.event.RegisterPayloadHandlerEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterPayloadHandlerEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Event fired when the
NetworkRegistry
is being set up.
This event is used to collect all the payload types and their handlers that should be used on the network.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegisterPayloadHandlerEvent
(Function<String, IPayloadRegistrar> registrarFactory) -
Method Summary
Modifier and TypeMethodDescriptionReturns AIPayloadRegistrar
for the given namespace, creating one if it doesn't exist..Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
Field Details
-
registrarFactory
-
-
Constructor Details
-
RegisterPayloadHandlerEvent
-
-
Method Details
-
registrar
Returns AIPayloadRegistrar
for the given namespace, creating one if it doesn't exist..- Returns:
- A
IPayloadRegistrar
for the given namespace, creating one if it doesn't exist.
-