Class WildfireSync
java.lang.Object
com.wildfire.common.networking.WildfireSync
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsendToAllClients(net.minecraft.server.level.ServerPlayer toSync, PlayerConfigHolder playerConfig) Sync a player's configuration to all nearby connected playersstatic voidsendToClient(net.minecraft.server.level.ServerPlayer sendTo, PlayerConfigHolder toSync) Sync a player's configuration to another connected playerstatic voidsendToServer(net.minecraft.network.Connection connection, PlayerConfigHolder plr) Send the client player's configuration 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.server.level.ServerPlayer toSync, PlayerConfigHolder playerConfig) Sync a player's configuration to all nearby connected players- Parameters:
toSync- Theplayerto syncplayerConfig- Theconfigurationfor the target player
-
sendToClient
public static void sendToClient(net.minecraft.server.level.ServerPlayer sendTo, PlayerConfigHolder toSync) Sync a player's configuration to another connected player- Parameters:
sendTo- Theplayerto send the sync totoSync- Theconfigurationfor the player being synced
-
sendToServer
public static void sendToServer(net.minecraft.network.Connection connection, PlayerConfigHolder plr) Send the client player's configuration to the server for syncing to other players- Parameters:
plr- Theconfigurationfor the client player- API Note:
- Only call on the client
-