Class ClientPayloadHandler

java.lang.Object
johnsmith.enchantingoverhauled.client.network.ClientPayloadHandler

public class ClientPayloadHandler extends Object
Handles the reception and execution of custom network payloads on the logical client.
  • Constructor Details

    • ClientPayloadHandler

      public ClientPayloadHandler()
  • Method Details

    • handleMenuSync

      public static void handleMenuSync(EnchantmentMenuSyncPayload payload)
      Processes the EnchantmentMenuSyncPayload received from the server.

      Updates the client-side active EnchantmentMenu with the server-calculated list of enchantment contexts. This task is enqueued onto the main client thread to ensure thread safety and prevent ConcurrentModificationExceptions when the UI reads this data during a render frame.

      Parameters:
      payload - The payload containing the container ID and the list of contexts.