Astral Realms Documentation Help

Blueprint YAML Reference

A blueprint is a single YAML file that defines one custom mob — its base entity type, display name, health, equipment, AI, skill behaviour, and lifecycle actions. Blueprints live in plugins/AstralMobs/blueprints/ (sub-folders are scanned recursively); the file name is irrelevant — each blueprint is keyed by its id field. If two files declare the same id, the one processed last silently overwrites the other.

The id is the blueprint's identity everywhere: /mobs summon <id> resolves it, and MobsAPI.spawnMob(String blueprintId, Location)/findBlueprintById(id) look it up the same way. See Installation for folder setup and Commands for /mobs reload.

Minimal example

id: skeleton type: SKELETON display-name: "<gold>Skeleton Archer" health: 150.0

Fuller example

id: skeleton type: SKELETON display-name: "<gold>Skeleton Archer" health: 150.0 move-control: type: walking goal-selectors: cast-skill: - flags: [LOOK] priority: 1 skill: skeleton-cast preferred-range: 8.0 range-tolerance: 4.0 kite: flags: [MOVE, LOOK] priority: 2 preferred-range: 8.0 range-tolerance: 1.5 idle: flags: [MOVE] priority: 3 range: 5.0 interval: 30 target-selectors: player: must-see: false must-reach: false range: 100 interval: 10 attributes: follow_range: 100 movement_speed: 0.25 step_height: 1.5 equipment: - slot: HAND item: material: bow metadata: prevent-sunburn: true always-show-name: false prevent-other-drops: true prevent-mob-kill-drops: true silent: true visible-by-default: true collidable: true

Top-level fields

Field

Type

Required

Description

id

String

Yes

Blueprint identifier. Used by /mobs summon and the Developer API. Must be unique; duplicates silently overwrite.

type

EntityType

Yes

Base Bukkit entity type the client renders the mob as (e.g. SKELETON, WARDEN, WITHER). See Overview for the Pig-backed spoofing model — the server-side entity is always the same NMSMob (Pig-based) class regardless of type; this field only drives spoofed rendering, hitbox dimensions, and vanilla-AI stripping. If the type cannot be resolved to an NMS entity type, it falls back to PIG.

display-name

Component (MiniMessage)

No

Sets the custom name via MiniMessage parsing. Only applied if present; omitting it leaves no name.

health

double

No

Sets Attributes.MAX_HEALTH base value and current health. Only applied when > 0; a missing or zero value leaves the vanilla default untouched.

metadata

MobMetadata

No

Behavioural flags (sunburn, drops, silence, speed, scale, etc.). See Attributes & Metadata.

attributes

Map<Attribute, double>

No

Arbitrary Bukkit attribute base-value overrides (e.g. follow_range, movement_speed, armor). Applied after health and metadata (before move-control) during blueprint.apply(). See Attributes & Metadata.

goal-selectors

Map

No

Named AI goal tree. See AI Goals, Targeting & Movement.

target-selectors

Map

No

Named target-selector tree. See AI Goals, Targeting & Movement.

move-control

Object

No

Movement control mode (walking, flying, creaking, none, or passenger). See AI Goals, Targeting & Movement.

equipment

List<ConditionalEquipment>

No

Per-slot gear. See Equipment below.

effects

List<ConditionalEffect>

No

Potion effects (may be requirement-gated). See Effects below.

spawn-actions

PaperActionList

No

Actions run once when the mob spawns; executor is the first online player. See Mob Actions.

death-actions

PaperActionList

No

Actions run once when the mob dies; executor is the killer (or first online player if no killer). See Mob Actions.

passenger

String

No

Id of another blueprint to spawn riding above this mob. See Passenger & Vehicle System below.

passenger-controls-vehicle

boolean

No

Default true. When true, the passenger's AI drives both mobs via PassengerFollowMoveControl; when false, the vehicle steers itself. See Passenger & Vehicle System below.

remove-passenger-on-death

boolean

No

When this mob dies, any tracked-mob passenger has its invulnerability cleared and is force-killed. See Passenger & Vehicle System below.

redirect-damage

boolean

No

When true, all damage dealt to this (vehicle) mob is cancelled and re-applied to its passenger. See Passenger & Vehicle System below.

kill-vehicle-on-passenger-death

boolean

No

When true, the death of this mob's passenger also kills this (vehicle) mob. See Passenger & Vehicle System below.

Equipment

The equipment field is a list of conditional equipment entries, not a simple key-value map. Each entry targets a single EquipmentSlot and may be requirement-gated:

equipment: - slot: HAND item: material: bow - slot: HEAD item: material: diamond_helmet requirements: - "[compare] %mob_remaining-health% > 0.5" - slot: HEAD item: material: iron_helmet

ConditionalEquipment fields

Field

Type

Required

Description

slot

EquipmentSlot

Yes

Target slot: HAND, OFF_HAND, HEAD, CHEST, LEGS, FEET. Serializer accepts dashes or underscores and is case-insensitive (hand, off-hand, off_hand all work).

item

ItemStack

Yes

The item to equip. Standard Astral format: bare material string or full map with material, name, lore, enchantments, etc.

requirements

PaperRequirementList

No

Optional requirement list. If present, the item is only worn while requirements pass; otherwise always worn (static). See Static vs Dynamic Gear below.

Slot resolution

Each slot is resolved to the first entry (in declaration order) whose requirements pass. Unmatched slots are cleared (any existing item removed). This means multiple entries may target the same slot — whichever matches first wins.

All equipped items are forced unbreakable via ItemMeta.setUnbreakable(true), regardless of whether they were defined that way.

Static vs Dynamic Gear

Static entries (no requirements block) are applied once at spawn and never re-evaluated.

Requirement-gated entries (with requirements) are re-evaluated every requirement-update-interval ticks (configurable, default 1 = every tick). A blueprint flagged as dynamic (i.e. has at least one requirement-gated equipment or effect entry) will be touched by the per-tick MobService.tickGear() loop; static-only blueprints are skipped entirely, saving CPU.

Requirements are evaluated against the first online player as the executor, with the %mob_*% placeholder namespace registered for self-state (health, target, etc.). See Mob Actions for placeholder details.

Effects

The effects field is a list of conditional potion effects, each optionally requirement-gated:

effects: - type: fire_resistance amplifier: 0 duration: -1 ambient: false particles: false icon: false - type: strength amplifier: 1 duration: 300 ambient: true particles: true icon: true requirements: - "[compare] %mob_remaining-health% < 0.5"

ConditionalEffect fields

Field

Type

Default

Description

type

PotionEffectType

Potion effect type (e.g. fire_resistance, strength, slowness, speed). Required.

amplifier

int

0

Effect amplifier (0 = level I, 1 = level II, etc.).

duration

int

-1

Duration in ticks. -1 (infinite) is the default and works naturally with requirement gates: the effect persists while requirements hold and is removed when they stop passing.

ambient

boolean

false

When true, the effect is rendered as a "potion swirl" rather than a solid color effect.

particles

boolean

false

When true, particle effects are shown.

icon

boolean

true

When true, the icon appears in the inventory/hotbar buff/debuff display.

requirements

PaperRequirementList

Optional requirement list. If present, the effect is active only while requirements pass. See Static vs Dynamic Gear above.

Effect resolution

Multiple entries may target the same PotionEffectType: the first entry (in declaration order) whose requirements pass is applied, and the effect is removed if no entry passes. When an effect is already active, it is only re-applied if the amplifier changes (to avoid resetting an infinite effect every tick).

Spawn & Death Actions

The spawn-actions and death-actions fields hold lists of Astral actions run at specific lifecycle moments:

spawn-actions: Executed once immediately after the mob is spawned. Executor is the first online player.

death-actions: Executed once when the mob dies. Executor is the killer (if a player) or the first online player (if no killer exists).

In both cases, the mob itself is registered in the placeholder container as %mob%, so you can reference %mob_uuid%, %mob_health%, %mob_target_name%, etc.

spawn-actions: - "[start-timer] cooldown-cast" - "[effect] GLOW 20 1 true" death-actions: - "[sound] minecraft:entity.warden.death" - "[console] eco give %player_name% 50"

See Mob Actions for the full action catalogue and Mob Placeholders for available %mob_*% placeholders.

Passenger & Vehicle System

A blueprint can declare another blueprint as its passenger, creating a two-mob vehicle + rider pair:

id: ravager-with-rider type: RAVAGER passenger: rider-mob passenger-controls-vehicle: true remove-passenger-on-death: false redirect-damage: true kill-vehicle-on-passenger-death: false

Fields

Field

Type

Default

Description

passenger

String

null

Id of the blueprint to spawn riding above this mob. When set, spawning this mob also spawns the referenced mob as its passenger.

passenger-controls-vehicle

boolean

true

When true, the passenger's AI goals drive the entire pair via PassengerFollowMoveControl (passenger steers). When false, the vehicle keeps its own goals and the passenger just rides.

remove-passenger-on-death

boolean

false

When this (vehicle) mob dies, any tracked-mob passenger is force-killed.

redirect-damage

boolean

false

When true, all damage dealt to this (vehicle) mob is cancelled and re-applied to its passenger, preserving the original attacker (for kill credit and aggro). Handled in MobListener#onVehicleDamageRedirect.

kill-vehicle-on-passenger-death

boolean

false

When this mob's passenger dies, the vehicle is also force-killed.

Spawn behavior

When a mob with passenger set is spawned:

  1. The vehicle mob is created and spawned first.

  2. The passenger blueprint is looked up by id and spawned at the same location.

  3. The passenger is set to ride the vehicle via Entity.startRiding().

  4. If passenger-controls-vehicle is true, the passenger's movement goals drive both mobs.

  5. Movement control is wrapped in PassengerFollowMoveControl, which gives the passenger steering priority.

The passenger field is a blueprint id, so the same mob can be a passenger, a vehicle, or have its own passenger — you can chain multiple mobs. Cycles are prevented by tracking visited blueprint ids during initialization; a blueprint that references itself (directly or indirectly) will fail to initialize.

Damage & death interaction

redirect-damage: All damage dealt to the vehicle is cancelled and re-applied to the passenger, preserving the original attacker so kill credit and threat remain correct. A vehicle with redirect-damage: true functions as a "meat shield" that passes all harm to its rider.

remove-passenger-on-death: When the vehicle dies, its passengers (if they are tracked custom mobs) have their invulnerability cleared and are force-killed.

kill-vehicle-on-passenger-death: When the passenger dies, the vehicle is also force-killed. A vehicle with kill-vehicle-on-passenger-death: true cannot survive its rider's death.

Lifecycle & Drops Behavior

Mob creation

MobService.summon(blueprint, location):

  1. Builds the NMS entity directly: new NMSMob(blueprint.type(), level), then sets its position.

  2. Clears the entity's vanilla drops list (if metadata.prevent-other-drops is set) and zeroes expToDrop (if metadata.prevent-experience-drops is set) — before spawning.

  3. Sets entity.persist = falsecustom mobs are non-persistent and never saved to chunk data or survive a server restart.

  4. Runs blueprint.apply(entity) — applies, in order: display name, health, metadata, attributes, move control. (Equipment and effects are not part of apply(); see step 6.)

  5. Spawns via level.addFreshEntity(entity, CreatureSpawnEvent.SpawnReason.CUSTOM), then injects the per-instance goal-selector and target-selector copies, and registers the mob in an in-memory UUID map.

  6. Applies requirement-gated equipment and effects (blueprint.applyGear(entity)), renders the initial health display, then fires spawn-actions.

  7. If the blueprint declares a passenger, spawns and mounts it (see Passenger & Vehicle System).

Damage event handling

MobListener#onDamage:

  • Mob-vs-mob projectiles are cancelled: If a projectile is shot by one tracked mob at another, the damage is suppressed. This prevents mobs from harming each other unintentionally.

  • Self-damage is cancelled: If a mob damages itself (e.g., its own AoE ability), the damage is suppressed.

MobListener#onEffectAdd:

  • WITHER effect on players is cancelled: Players hit by a WITHER effect from an AstralMobs entity have the effect removed. This prevents Wither mobs from inflicting server-killing decay on players.

Death event handling

MobListener#onEntityDeath:

  1. Fires death-actions (executor = killer or first online player).

  2. Clears EntityDeathEvent#getDrops() if metadata.prevent-other-drops is set (this is the actual drop suppression on the ground).

  3. Zeroes setDroppedExp(0) if metadata.prevent-experience-drops is set.

  4. Handles passenger cleanup:

    • If this mob is a passenger of a vehicle, removes the passenger reference.

    • If the vehicle has kill-vehicle-on-passenger-death: true, force-kills the vehicle.

  5. If remove-passenger-on-death: true, force-kills any tracked-mob passengers.

  6. Unregisters the mob from the UUID map and SpoofRegistry.

Health display

Health is not shown as a vanilla name tag. Instead, AstralEntity.updateHealthDisplay() builds a 17-segment health bar from Minecraft font glyphs and sets it as the mob's always-visible custom name. It renders:

  • Once on spawn.

  • On every EntityDamageEvent for that mob.

  • On a configurable schedule (controlled by forceUpdateInterval in config).

Full field summary

Field

Type

Default

Applied

id

String

type

EntityType

At construction (spoofed rendering + hitbox)

display-name

Component

1st, pre-spawn (blueprint.apply())

health

double

0

2nd, pre-spawn (blueprint.apply())

metadata

MobMetadata

3rd, pre-spawn (blueprint.apply())

attributes

Map<Attribute, double>

4th, pre-spawn (blueprint.apply())

move-control

Object

5th, pre-spawn (blueprint.apply())

goal-selectors

Map

Post-spawn, injected as per-instance copies

target-selectors

Map

Post-spawn, injected as per-instance copies

equipment

List<ConditionalEquipment>

[]

Post-spawn (applyGear); requirement-gated entries re-evaluated every requirement-update-interval ticks

effects

List<ConditionalEffect>

[]

Post-spawn (applyGear); requirement-gated entries re-evaluated every requirement-update-interval ticks

spawn-actions

PaperActionList

After gear application, once

death-actions

PaperActionList

On death

passenger

String

null

Spawn-time, after spawn-actions

passenger-controls-vehicle

boolean

true

Spawn-time

remove-passenger-on-death

boolean

false

Death-time

redirect-damage

boolean

false

Damage event

kill-vehicle-on-passenger-death

boolean

false

Death event

See also

  • Attributes & Metadata — detailed field reference for metadata and attributes blocks.

  • AI Goals, Targeting & Movement — detailed reference for goal-selectors, target-selectors, and move-control.

  • Mob Actions — full action catalogue for spawn-actions and death-actions.

  • Mob Placeholders — all %mob_*% placeholders available in actions and requirements.

  • Commands/mobs summon, /mobs reload, and other operator commands.

  • Developer API — spawn blueprints programmatically, listen to events, customize behaviour.

Last modified: 25 July 2026