Uses of Interface
net.neoforged.neoforge.network.handling.IPayloadHandler
Packages that use IPayloadHandler
Package
Description
-
Uses of IPayloadHandler in net.neoforged.neoforge.client.network.event
Methods in net.neoforged.neoforge.client.network.event with parameters of type IPayloadHandlerModifier and TypeMethodDescription<T extends CustomPacketPayload>
voidRegisterClientPayloadHandlersEvent.register
(CustomPacketPayload.Type<T> type, IPayloadHandler<T> handler) Registers the providedIPayloadHandler
as the client handler to be invoked on the main thread for the providedCustomPacketPayload.Type
<T extends CustomPacketPayload>
voidRegisterClientPayloadHandlersEvent.register
(CustomPacketPayload.Type<T> type, HandlerThread thread, IPayloadHandler<T> handler) Registers the providedIPayloadHandler
as the client handler to be invoked on the specified thread for the providedCustomPacketPayload.Type
-
Uses of IPayloadHandler in net.neoforged.neoforge.client.network.registration
Methods in net.neoforged.neoforge.client.network.registration with parameters of type IPayloadHandlerModifier and TypeMethodDescriptionstatic <T extends CustomPacketPayload>
voidClientNetworkRegistry.register
(CustomPacketPayload.Type<T> type, HandlerThread thread, IPayloadHandler<T> handler) -
Uses of IPayloadHandler in net.neoforged.neoforge.network.handling
Classes in net.neoforged.neoforge.network.handling that implement IPayloadHandlerModifier and TypeClassDescriptionfinal record
MainThreadPayloadHandler<T extends CustomPacketPayload>
Helper class that always executes the wrapped handler on the main thread.Fields in net.neoforged.neoforge.network.handling declared as IPayloadHandlerModifier and TypeFieldDescriptionprivate final IPayloadHandler
<T> MainThreadPayloadHandler.handler
The field for thehandler
record component.Methods in net.neoforged.neoforge.network.handling that return IPayloadHandlerModifier and TypeMethodDescriptionMainThreadPayloadHandler.handler()
Returns the value of thehandler
record component.Constructors in net.neoforged.neoforge.network.handling with parameters of type IPayloadHandlerModifierConstructorDescriptionMainThreadPayloadHandler
(IPayloadHandler<T> handler) Creates an instance of aMainThreadPayloadHandler
record class. -
Uses of IPayloadHandler in net.neoforged.neoforge.network.registration
Fields in net.neoforged.neoforge.network.registration declared as IPayloadHandlerModifier and TypeFieldDescriptionprivate final IPayloadHandler
<T> ModdedConfigurationPayloadRegistration.handler
The field for thehandler
record component.private final IPayloadHandler
<T> ModdedPlayPayloadRegistration.handler
The field for thehandler
record component.Fields in net.neoforged.neoforge.network.registration with type parameters of type IPayloadHandlerModifier and TypeFieldDescriptionprotected static final Map
<ConnectionProtocol, Map<ResourceLocation, IPayloadHandler<?>>> NetworkRegistry.CLIENTBOUND_HANDLERS
protected static final Map
<ConnectionProtocol, Map<ResourceLocation, IPayloadHandler<?>>> NetworkRegistry.SERVERBOUND_HANDLERS
Methods in net.neoforged.neoforge.network.registration that return IPayloadHandlerModifier and TypeMethodDescriptionModdedConfigurationPayloadRegistration.handler()
Returns the value of thehandler
record component.ModdedPlayPayloadRegistration.handler()
Returns the value of thehandler
record component.Methods in net.neoforged.neoforge.network.registration with parameters of type IPayloadHandlerModifier and TypeMethodDescription<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a client-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.commonToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a server-bound payload for all phases.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a client-bound payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.configurationToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super FriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a server-bound payload for the configuration phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler) Registers a bidirectional payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playBidirectional
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler) Registers a bidirectional payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToClient
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a client-bound payload for the play phase.<T extends CustomPacketPayload>
PayloadRegistrarPayloadRegistrar.playToServer
(CustomPacketPayload.Type<T> type, StreamCodec<? super RegistryFriendlyByteBuf, T> codec, IPayloadHandler<T> handler) Registers a server-bound payload for the play phase.static <T extends CustomPacketPayload,
B extends FriendlyByteBuf>
voidNetworkRegistry.register
(CustomPacketPayload.Type<T> type, StreamCodec<? super B, T> codec, @Nullable IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) Registers a new payload.private <T extends CustomPacketPayload,
B extends FriendlyByteBuf>
voidPayloadRegistrar.register
(CustomPacketPayload.Type<T> type, StreamCodec<? super B, T> codec, @Nullable IPayloadHandler<T> serverHandler, @Nullable IPayloadHandler<T> clientHandler, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) protected static <T extends CustomPacketPayload>
voidNetworkRegistry.registerHandler
(Map<ConnectionProtocol, Map<ResourceLocation, IPayloadHandler<?>>> handlers, ConnectionProtocol protocol, PacketFlow flow, CustomPacketPayload.Type<T> type, IPayloadHandler<T> handler) Method parameters in net.neoforged.neoforge.network.registration with type arguments of type IPayloadHandlerModifier and TypeMethodDescriptionprotected static <T extends CustomPacketPayload>
voidNetworkRegistry.registerHandler
(Map<ConnectionProtocol, Map<ResourceLocation, IPayloadHandler<?>>> handlers, ConnectionProtocol protocol, PacketFlow flow, CustomPacketPayload.Type<T> type, IPayloadHandler<T> handler) Constructors in net.neoforged.neoforge.network.registration with parameters of type IPayloadHandlerModifierConstructorDescriptionModdedConfigurationPayloadRegistration
(ResourceLocation id, Class<T> type, IPayloadHandler<T> handler, StreamCodec<FriendlyByteBuf, T> reader) Creates an instance of aModdedConfigurationPayloadRegistration
record class.ModdedPlayPayloadRegistration
(ResourceLocation id, Class<T> type, IPayloadHandler<T> handler, StreamCodec<RegistryFriendlyByteBuf, T> reader) Creates an instance of aModdedPlayPayloadRegistration
record class.