Astral Realms Documentation Help

Pipeline Tails

Tails run after every chain link. They apply the side effects: dropping items, giving items to the player, logging. Tails execute in YAML insertion order and each receives the same PipelineContext the previous tail left behind.

A pipeline without tails will mutate context state but never actually grant the player anything — the captured drops sit in the context list and are discarded when the pipeline run ends.

drop

Drops every ItemStack in context.drops() naturally at context.location() (falls back to the player's location if no location was captured). Awards context.vanillaExperience() to the player. Clears both state fields after the work is done.

tails: drop: type: drop blacklist: [DIRT] whitelist: [DIAMOND, IRON_ORE]

Field

Type

Description

blacklist

List<Material>

Drop materials skipped by this tail.

whitelist

List<Material>

If non-empty, only listed materials are dropped.

Both filters are applied per-stack. Items filtered out are dropped from the context state — a later tail will not see them. If you want filtered items to survive, run the filtered tail before an unfiltered one.

magnet

Adds every ItemStack in context.drops() directly to the player's inventory. Anything that doesn't fit (inventory full, filtered out) is kept in context.drops() so a subsequent drop tail can spill the remainder on the ground. Also awards context.vanillaExperience() to the player and zeroes it out.

tails: magnet: type: magnet blacklist: [STONE]

Field

Type

Description

blacklist

List<Material>

Drop materials skipped by the magnet (kept in context for later tails).

whitelist

List<Material>

If non-empty, only listed materials are magnet-collected.

A common pattern is magnet followed by drop:

tails: magnet: type: magnet spill: type: drop

The magnet collects what fits; the drop spills whatever the player's inventory could not hold.

mailbox

Sends every ItemStack in context.drops() to the player's mailbox via AstralCore's MailboxService (giveOrAdd, async), then clears context.drops(). No-op when the drop list is empty; failures are logged.

tails: mailbox: type: mailbox

No configurable fields. A useful pattern is magnetmailbox: the magnet grants what fits in the inventory, and the mailbox catches whatever is left over instead of spilling it on the ground.

debug

Dumps the current PipelineContext to the server console at INFO level. No configurable fields.

tails: debug: type: debug

Output looks like:

[AstralItems] End of pipeline: rare:hammer [AstralItems] Dumping context: PipelineContext{…} [AstralItems] Used item: ItemStack{DIAMOND_PICKAXE x1} [AstralItems] Used player: Steve [AstralItems] Drops: [ItemStack{IRON_INGOT x1}, …] [AstralItems] Vanilla exp: 12 [AstralItems] ==================================== [AstralItems] Dumping loaded pipe [AstralItems] (ENTRY) - BlockBreakPipelineHead@… [AstralItems] Chain links (3): [AstralItems] - HammerPipelineLink[…] [AstralItems] - MeltPipelineLink[…] [AstralItems] - TakeDurabilityPipelineLink[…] [AstralItems] Tails (1): [AstralItems] - MagnetPipelineTail@…

Useful while authoring a new pipeline. Remove it before going live — every fired event logs.

Last modified: 25 July 2026