The public API is deliberately independent from Unity and Planet Crafter implementation assemblies. Normal mods reference only CMAPI.API.dll; keep CMAPI.API.xml beside it for editor descriptions.
Interfaces
IConsoleCommandContextDescribes one invocation of a registered console command.IConsoleCommandManagerRegisters console commands owned by the current mod.IEnvironmentManagerProvides safe current-planet environment information and actions.IGameLoopEventsProvides safe, main-thread game-loop events.IItemDefinitionDescribes one Planet Crafter inventory item.IItemManagerProvides item discovery and host-safe local-backpack mutations.IModEventsProvides the event groups exposed by CMAPI.IModHelperProvides the CMAPI services available to one mod.IModRegistryProvides safe feature and loaded-mod discovery.IModSchedulerQueues mod-owned work for safe execution on Unity's main thread.IModStorageProvides paths and JSON storage isolated to the current mod.IMonitorWrites messages attributed to the current mod.INotificationManagerShows short messages through Planet Crafter's native HUD.IPlanetDefinitionDescribes one installed Planet Crafter planet.IPlanetManagerProvides safe, read-only information about installed planets.IPlayerRepresents one player visible to the current Planet Crafter session.IPlayerEventsProvides normalized player lifecycle events.IPlayerInventoryManagerProvides read-only local backpack and equipment state.IPlayerManagerProvides read-only access to players in the active session.IPlayerPlacementManagerProvides host-safe, same-planet placement for the local player.IRecipeDefinitionDescribes one recipe defined by Planet Crafter.IRecipeIngredientDescribes one distinct ingredient and its required quantity.IRecipeManagerProvides read-only discovery of Planet Crafter recipes.IScheduledActionRepresents work queued through IModScheduler.ITerraTokenManagerProvides the shared Terra Token balance and host-safe additions.IUnlockDefinitionDescribes the live unlock state and rules for one game group.IUnlockManagerProvides read-only content unlock rules and live state.IWeatherEventDefinitionDescribes one weather or meteor event available on a planet.IWeatherManagerProvides current-planet weather discovery, status, and host-safe starts.IWorldEventsProvides loaded-world, planet, save, and weather lifecycle events.IWorldStateManagerProvides read-only terraformation values, rates, and stage progress.Classes
CMAPIFeaturesStable feature identifiers exposed by IModRegistry.ConsoleCommandOptionsDescribes how a console command appears in CMAPI's command catalog.EnvironmentActionResultContains the complete result of an environment mutation request.EnvironmentSnapshotContains current-planet day/night and local water information.GameLoopTickDescribes one CMAPI game-loop event.GameplayActionResultContains the complete result of a gameplay mutation request.InventoryItemSnapshotContains an aggregated count of one item in an inventory.ModThe base class for every CMAPI mod entry point.PlanetChangedEventDescribes a completed transition between loaded planets.PlayerInventoryChangedEventDescribes one native local-player inventory modification.PlayerInventorySnapshotContains a point-in-time view of one local-player inventory.PlayerPlacementResultContains the complete result of a player-placement request.TerraformStageSnapshotDescribes one current-planet terraformation stage.WeatherSnapshotContains a point-in-time view of the current planet's weather.WorldContextIdentifies the loaded save and current planet at an event boundary.WorldStateSnapshotContains current terraformation measurements for one planet.WorldUnitSnapshotContains a point-in-time value and production rates for one world unit.Structures
PlayerVitalsContains a read-only snapshot of a player's survival gauges.WorldPositionRepresents a position in Planet Crafter's three-dimensional world.Enumerations
ContentKindIdentifies the broad kind of content represented by a game group.DayNightPhaseProvides a coarse interpretation of the synchronized day/night value.EnvironmentActionStatusDescribes the outcome of a requested environment mutation.GameplayActionStatusDescribes the outcome of a CMAPI gameplay mutation request.LogLevelSpecifies the severity of a mod log message.PlayerInventoryKindIdentifies one local-player inventory exposed by CMAPI.PlayerPlacementStatusDescribes the outcome of a local-player placement request.WorldUnitKindIdentifies a Planet Crafter world-state measurement.