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 providedIPayloadHandleras 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 providedIPayloadHandleras 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 recordMainThreadPayloadHandler<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.handlerThe field for thehandlerrecord component.Methods in net.neoforged.neoforge.network.handling that return IPayloadHandlerModifier and TypeMethodDescriptionMainThreadPayloadHandler.handler()Returns the value of thehandlerrecord component.Constructors in net.neoforged.neoforge.network.handling with parameters of type IPayloadHandlerModifierConstructorDescriptionMainThreadPayloadHandler(IPayloadHandler<T> handler) Creates an instance of aMainThreadPayloadHandlerrecord 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.handlerThe field for thehandlerrecord component.private final IPayloadHandler<T> ModdedPlayPayloadRegistration.handlerThe field for thehandlerrecord component.Fields in net.neoforged.neoforge.network.registration with type parameters of type IPayloadHandlerModifier and TypeFieldDescriptionprotected static final Map<ConnectionProtocol, Map<Identifier, IPayloadHandler<?>>> NetworkRegistry.CLIENTBOUND_HANDLERSprotected static final Map<ConnectionProtocol, Map<Identifier, IPayloadHandler<?>>> NetworkRegistry.SERVERBOUND_HANDLERSMethods in net.neoforged.neoforge.network.registration that return IPayloadHandlerModifier and TypeMethodDescriptionModdedConfigurationPayloadRegistration.handler()Returns the value of thehandlerrecord component.ModdedPlayPayloadRegistration.handler()Returns the value of thehandlerrecord 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<Identifier, 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<Identifier, 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(Identifier id, Class<T> type, IPayloadHandler<T> handler, StreamCodec<FriendlyByteBuf, T> reader) Creates an instance of aModdedConfigurationPayloadRegistrationrecord class.ModdedPlayPayloadRegistration(Identifier id, Class<T> type, IPayloadHandler<T> handler, StreamCodec<RegistryFriendlyByteBuf, T> reader) Creates an instance of aModdedPlayPayloadRegistrationrecord class.