Skip to content

Cardinal Components Scoreboard

Pyrofab edited this page Oct 21, 2020 · 2 revisions

This module allows mods to attach components to Scoreboard and Team objects. The former can be used for storing global data, while the latter can be especially useful for implementing multiplayer systems like minigames and factions.

Usage

Registration

Scoreboard components are registered by a ScoreboardComponentInitializer, exposed as cardinal-components-scoreboard in the mod json (more information on the component registration page). Once a component factory is registered for either scoreboards or teams, its associated component will be available on every relevant instance, on both clients and servers.

Synchronization

Scoreboard components can be automatically synchronized from the server to the client by implementing AutoSyncedComponent - more information is available on the component synchronization page.

Ticking

Scoreboard components support serverside ticking through the ServerTickingComponent interface.