Class FabricNetworkHelper

java.lang.Object
johnsmith.enchantingoverhauled.platform.network.FabricNetworkHelper
All Implemented Interfaces:
NetworkHelper

public class FabricNetworkHelper extends Object implements NetworkHelper
  • Constructor Details

    • FabricNetworkHelper

      public FabricNetworkHelper()
  • Method Details

    • sendToClient

      public void sendToClient(EnchantmentMenuSyncPayload payload, net.minecraft.server.level.ServerPlayer serverPlayer)
      Description copied from interface: NetworkHelper
      Dispatches a custom network payload to a specific client.

      Used to synchronize complex, non-primitive menu state (like the EnchantmentContext list) that cannot be natively synchronized via standard container DataSlots.

      Specified by:
      sendToClient in interface NetworkHelper
      Parameters:
      payload - The constructed payload containing the data to synchronize.
      serverPlayer - The specific connected client player to receive the payload.