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 is to display an overlay message:

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