Interface ClientConfigurationNetworking.ConfigurationPayloadHandler<T extends CustomPayload>

Type Parameters:
T - the type of the packet
Enclosing class:
ClientConfigurationNetworking
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ClientConfigurationNetworking.ConfigurationPayloadHandler<T extends CustomPayload>
A packet handler utilizing CustomPayload.
  • Method Details

    • receive

      void receive(T payload, ClientConfigurationNetworking.Context context)
      Handles the incoming packet.

      Unlike ClientPlayNetworking.PlayPayloadHandler this method is executed on netty's event loops. Modification to the game should be scheduled.

      An example usage of this:

      
       // use PayloadTypeRegistry for registering the payload
       ClientConfigurationNetworking.registerReceiver(OVERLAY_PACKET_TYPE, (payload, context) -> {
      
       });
       
      Parameters:
      payload - the packet payload
      context - the configuration networking context
      See Also: