Blueprint YAML Reference
A blueprint defines a single custom item: its identifier, version, rarity, display appearance, optional metadata, pipelines, and optional default item data.
Blueprints live in plugins/AstralItems/blueprints/ (sub-folders are scanned recursively). The file name is irrelevant; the id field inside combined with the referenced rarity's id forms the item's Key.
Minimal example
Top-level fields
Field | Type | Required | Description |
|---|---|---|---|
| String | Yes | Blueprint identifier. Combined with the rarity id to produce the item's |
| String | Yes | Id of an existing rarity in |
| String | No | Semver |
|
| Yes | Standard AstralCore item template — |
|
| No | Behavioural metadata (see metadata below). |
|
| No | Map of pipeline-id → pipeline. Pipeline ids are unique per blueprint, not globally. |
|
| No | Default values for the item data registered to the blueprint. Each key resolves through |
| Map | No | Per-item numeric stats rolled once at creation (experimental). See Item Stats. |
metadata
Field | Type | Default | Description |
|---|---|---|---|
| int |
| Override Minecraft's default stack size. |
| boolean |
| If |
| boolean |
| If |
|
|
| Free-form tags used to filter |
|
|
| Whitelist + per-enchantment level cap honoured by the custom anvil: books containing other enchantments are rejected, applied levels are clamped to the cap. Also drives the |
default-data
default-data pre-populates the item data bag every time a new instance is created from the blueprint. Keys must be registered in ItemDataRegistry; values are deserialised by the registered ItemDataAdapter.
The first key matches StoredMaterialItemDataAdapter (used by tools like the spade and mallet to remember the block the player loaded onto them). The second matches ScalableItemDataAdapter (used by levelling items).
stats
stats declares numeric stats that are rolled once when the item is created and persisted on the instance. Each entry has a key, a min/max roll range, and an optional context:
See Item Stats for the roll rules, persistence, placeholders, and the current (experimental) status of the feature.
version
The blueprint version is captured by the item at creation and persisted in PDC. When the player handles an item whose stored version is older than the blueprint's current version, the UpgradeListener calls ItemService.upgrade(stack) — it rebuilds the display from the new blueprint while preserving the item's UUID, enchantments, damage, amount, and unbreakable flag. See Developer API.
Map-form (major: 2, minor: 0, patch: 3) is also accepted by the deserialiser, but the string form is preferred.
pipelines
The pipelines block is a map of pipeline id → pipeline definition. Every pipeline has the same three sections:
Inside links and tails the map key is a free-form id used only for ordering and config tooling. Order follows the YAML insertion order — chain links run top-to-bottom, then tails run top-to-bottom.
A blueprint may declare multiple pipelines — for example a spade that has one pipeline for drag-and-drop (to store the seed loaded by the player), one for interact → plant-crops, and a third for interact → spade-grass.
See:
Pipelines Overview — execution model and lifecycle
Pipeline Heads — every available
head.typePipeline Links — every available link
typePipeline Tails — every available tail
type
Per-component requirements
Every wrapped pipeline component (head, link, or tail) can optionally carry a requirements block evaluated against the player and the current PipelineContext (which exposes item, location, block, entity, drop, and extra-context placeholders):
Requirements use AstralCore's PaperRequirementList. When a head's requirements fail the event is cancelled and the rest of the pipeline is skipped; when a link or tail's requirements fail the component is silently skipped and the next one runs.
Validation
The blueprint loader rejects entries that fail any of these checks:
Missing or empty
id— file is logged and skipped.Missing or empty
rarity, or araritythat is not registered.displaycannot be parsed as anItemStackWrapper.A pipeline references a
typethat is not registered withPipelineService— see Pipeline Heads / Links / Tails for the registry.A
default-datakey is not registered inItemDataRegistry.Two blueprints resolve to the same
Key(rarity:id) — the duplicate is logged as a warning and skipped.
A bad blueprint does not prevent the rest from loading.
Hot reload
/items reload clears the blueprint registry, re-reads every file from blueprints/, and calls PipelineService.initialize() which:
Unregisters every dummy listener previously registered with Bukkit.
Walks every blueprint's pipelines.
Registers a fresh listener per
(EventPriority, Event)pair and inserts the freshly deserialised pipelines into the rightEventNode.
CraftEngine triggers the same reload path automatically when it fires CraftEngineReloadEvent (which is also the trigger for the very first blueprint load on server boot).
Item upgrade
When a player handles a stack whose stored blueprint version is older than the current blueprint version, ItemService.upgrade(stack) rebuilds the ItemStack from the new blueprint and transfers:
The
ItemInstanceUUID.Enchantments — capped against
metadata.available-enchantments.Damage value.
unbreakableflag.Stack amount.
Upgrades fire on PlayerDataLoadedEvent (from AstralSync), InventoryOpenEvent, and ChunkLoadEvent (for item frames, containers, and shelves in newly loaded chunks).