Class WildfireSync

java.lang.Object
com.wildfire.common.networking.WildfireSync

public final class WildfireSync extends Object
  • Field Details

    • MARKER

      public static final org.slf4j.Marker MARKER
  • Method Details

    • sendToAllClients

      public static void sendToAllClients(net.minecraft.world.entity.Avatar toSync, AbstractAvatarConfigHolder config, @Nullable @Nullable net.minecraft.server.level.ServerPlayer except)
      Sync a player or mannequin's configuration to all nearby connected players
      Parameters:
      toSync - The Avatar to sync
      config - The configuration for the target avatar
      except - Optional player to exclude from being sent a sync packet
    • sendToAllClients

      public static void sendToAllClients(net.minecraft.world.entity.Avatar toSync, AbstractAvatarConfigHolder config)
      Sync a player or mannequin's configuration to all nearby connected players
      Parameters:
      toSync - The Avatar to sync
      config - The configuration for the target avatar
    • sendToClient

      public static void sendToClient(net.minecraft.server.level.ServerPlayer sendTo, AbstractAvatarConfigHolder toSync)
      Sync a player or mannequin's configuration to another connected player
      Parameters:
      sendTo - The player to send the sync to
      toSync - The configuration for the player being synced
    • sendToServer

      public static boolean sendToServer(net.minecraft.network.Connection connection, AbstractAvatarConfigHolder config)
      Send the client player's or a mannequin's config to the server for syncing to other players
      Parameters:
      config - The configuration for the client player or target mannequin
      Returns:
      true if the provided config was synced to the connected server
      API Note:
      Only call on the client