Placeholders
AstralCollections registers two placeholder namespaces with AstralCore. They are available in messages, menus, completion actions, and anywhere else AstralCore resolves placeholders.
For the underlying placeholder syntax (%a_b_c%, %a_{b_c}%, $e(...)), see Placeholders.
collection_*
A CollectionBlueprint placeholder. The base form %collection% returns the blueprint itself; the keys below drill into it.
Placeholder | Type | Description |
|---|---|---|
| String | Blueprint identifier. |
| ItemStack | Display item — chain further keys like |
| ItemProvider | Every entry, suitable as a layout |
| Integer | Number of entries the viewer has discovered (0 if no viewer context). |
| Integer | Total number of entries in the blueprint. |
| Component | A 20-character progress bar (green/grey) for the viewer. |
| Boolean |
|
The blueprint is typically reached through a layout that exposes one collection per slot, so the namespace is most often used inside the layout item template:
entry_*
A CollectionEntry placeholder.
Placeholder | Type | Description |
|---|---|---|
| String | Entry identifier. |
| String | ID of the parent collection. |
| CollectionBlueprint | The parent blueprint — chain |
| ItemStack | The item to discover. |
| Boolean |
|
The default entry-discovered message demonstrates a typical chain:
Each chain resolves left-to-right: %entry_collection_progress% walks entry → collection (the parent blueprint) → progress (current viewer's count).
Context requirements
The placeholders that read player state — collection_progress, collection_progressBar, collection_completed, entry_completed — need a player in the placeholder context. They return 0 or false when no player is available (e.g. when used in console-side computation).
The menu and message pipelines always pass the viewing player as context, so this only matters if you resolve placeholders manually from Java without a player.