类 ConfigSync
java.lang.Object
net.neoforged.neoforge.network.ConfigSync
-
字段概要
字段修饰符和类型字段说明private static final Map
<Connection, Map<String, byte[]>> Connection -> Config file name -> byte[] of the config serialized to TOML.private static final Object
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void
receiveSyncedConfig
(byte[] contents, String fileName) static void
Registers a listener forModConfigEvent.Reloading
for all mod busses, that will sync changes to server configs to connected clients.static void
static void
syncPendingConfigs
(MinecraftServer server)
-
字段详细资料
-
lock
-
configsToSync
Connection -> Config file name -> byte[] of the config serialized to TOML.Pending config updates get sent to players in the PLAY phase only, but start being tracked as soon as the
SyncConfig
configuration task runs. This ensures that all updates during the configuration phase will eventually arrive to the clients.Connections get removed when GC'ed thanks to the WeakHashMap.
-
-
构造器详细资料
-
ConfigSync
private ConfigSync()
-
-
方法详细资料
-
syncAllConfigs
-
registerEventListeners
public static void registerEventListeners()Registers a listener forModConfigEvent.Reloading
for all mod busses, that will sync changes to server configs to connected clients. -
syncPendingConfigs
-
receiveSyncedConfig
-