-
Notifications
You must be signed in to change notification settings - Fork 22
Registries
StationAPI provides registries for a lot of things. This is to avoid conflicts between mods and allow for extra features, such as registry tags, or string-based identifiers, which allow to eliminate certain limitations on the number of blocks, items, etc the game can have at the same time.
But, how do we add to those registries?
There are several ways. But, every StationAPI registry comes with an initialization event, which gets dispatched at the most appropriate time for modded content to get added, which is usually after the vanilla content is registered and before extra initialization is done, which, otherwise, would have had to be done by the mod itself.
An example is ItemRegistryEvent
, which is dispatched after vanilla items have been registered and before item statistics are initialized, creating the perfect opportunity for modded items to get added.