Class NeoForgeSyncBootstrap
java.lang.Object
com.oliveryasuna.mc.rubric.neoforge.NeoForgeSyncBootstrap
Loader-side helpers that wire a
SyncService into NeoForge's event
surface so consumers don't have to learn the event API to use sync. Build a
manager + codec registry, call installServer(com.oliveryasuna.mc.rubric.value.CodecRegistry, com.oliveryasuna.mc.rubric.platform.PermissionGate) on the common entry
point and installClient(com.oliveryasuna.mc.rubric.value.CodecRegistry) on the client entry point, then register
the manager and (on the client side) hand the resulting service to
RubricGui.registerSyncService(manager, service).-
Method Summary
Modifier and TypeMethodDescriptionstatic com.oliveryasuna.mc.rubric.sync.SyncServiceinstallClient(com.oliveryasuna.mc.rubric.value.CodecRegistry codecs) Builds the client-sideSyncServicearound the client transport (payload receiver is wired viaregisterPayloadon the mod event bus) and starts it.static com.oliveryasuna.mc.rubric.sync.SyncServiceinstallServer(com.oliveryasuna.mc.rubric.value.CodecRegistry codecs, com.oliveryasuna.mc.rubric.platform.PermissionGate gate) Builds the server-sideSyncService, hooksPlayerEvent.PlayerLoggedInEventto dispatch handshake + initial snapshot per joining player.
-
Method Details
-
installServer
public static com.oliveryasuna.mc.rubric.sync.SyncService installServer(com.oliveryasuna.mc.rubric.value.CodecRegistry codecs, com.oliveryasuna.mc.rubric.platform.PermissionGate gate) Builds the server-sideSyncService, hooksPlayerEvent.PlayerLoggedInEventto dispatch handshake + initial snapshot per joining player. Started before returning.- Parameters:
codecs- Codec registry shared with the consumer's managers.gate- Permission gate consulted byhandleClientEdit.- Returns:
- The configured, started service. Register managers on it.
-
installClient
public static com.oliveryasuna.mc.rubric.sync.SyncService installClient(com.oliveryasuna.mc.rubric.value.CodecRegistry codecs) Builds the client-sideSyncServicearound the client transport (payload receiver is wired viaregisterPayloadon the mod event bus) and starts it.- Parameters:
codecs- Codec registry shared with the consumer's managers.- Returns:
- The configured, started service. Register managers on it and
hand to
RubricGui.registerSyncServiceso the screen's Save & Exit can forward dirty server-scoped edits.
-