Class PayloadHandlerBuilder<T extends CustomPacketPayload>
java.lang.Object
net.neoforged.neoforge.network.registration.PayloadHandlerBuilder<T>
- Type Parameters:
 T- The type ofCustomPacketPayloadthat this handler handles
- All Implemented Interfaces:
 IDirectionAwarePayloadHandlerBuilder<T,IPayloadHandler<T>> 
@Internal
class PayloadHandlerBuilder<T extends CustomPacketPayload>
extends Object
implements IDirectionAwarePayloadHandlerBuilder<T,IPayloadHandler<T>> 
The internal implementation of 
IDirectionAwarePayloadHandlerBuilder, for use by IPayloadRegistrar.common(ResourceLocation, FriendlyByteBuf.Reader, Consumer)- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable IPayloadHandler<T>private @Nullable IPayloadHandler<T> - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionclient(IPayloadHandler<T> clientSide) Sets the client side handler.(package private) voidhandleConfiguration(IDirectionAwarePayloadHandlerBuilder<T, IConfigurationPayloadHandler<T>> configuration) Internal callback method used to configure the configuration builder with the handlers(package private) voidInternal callback method used to configure the play builder with the handlersserver(IPayloadHandler<T> serverSide) Sets the server side handler. 
- 
Field Details
- 
clientSide
 - 
serverSide
 
 - 
 - 
Constructor Details
- 
PayloadHandlerBuilder
PayloadHandlerBuilder() 
 - 
 - 
Method Details
- 
client
Description copied from interface:IDirectionAwarePayloadHandlerBuilderSets the client side handler.- Specified by:
 clientin interfaceIDirectionAwarePayloadHandlerBuilder<T extends CustomPacketPayload,IPayloadHandler<T extends CustomPacketPayload>> - Parameters:
 clientSide- The client side handler.- Returns:
 - This builder.
 
 - 
server
Description copied from interface:IDirectionAwarePayloadHandlerBuilderSets the server side handler.- Specified by:
 serverin interfaceIDirectionAwarePayloadHandlerBuilder<T extends CustomPacketPayload,IPayloadHandler<T extends CustomPacketPayload>> - Parameters:
 serverSide- The server side handler.- Returns:
 - This builder.
 
 - 
handlePlay
Internal callback method used to configure the play builder with the handlers- Parameters:
 play- The play builder
 - 
handleConfiguration
void handleConfiguration(IDirectionAwarePayloadHandlerBuilder<T, IConfigurationPayloadHandler<T>> configuration) Internal callback method used to configure the configuration builder with the handlers- Parameters:
 configuration- The configuration builder
 
 -