Class WildfireSync
java.lang.Object
com.wildfire.common.networking.WildfireSync
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsendToAllClients(net.minecraft.world.entity.Avatar toSync, AbstractAvatarConfigHolder config) Sync a player or mannequin's configuration to all nearby connected playersstatic voidsendToAllClients(net.minecraft.world.entity.Avatar toSync, AbstractAvatarConfigHolder config, @Nullable net.minecraft.server.level.ServerPlayer except) Sync a player or mannequin's configuration to all nearby connected playersstatic voidsendToClient(net.minecraft.server.level.ServerPlayer sendTo, AbstractAvatarConfigHolder toSync) Sync a player or mannequin's configuration to another connected playerstatic booleansendToServer(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
-
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- TheAvatarto syncconfig- Theconfigurationfor the target avatarexcept- 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- TheAvatarto syncconfig- Theconfigurationfor 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- Theplayerto send the sync totoSync- Theconfigurationfor 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- Theconfigurationfor the client player or target mannequin- Returns:
trueif the provided config was synced to the connected server- API Note:
- Only call on the client
-