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
Fuller example
Top-level fields
Field | Type | Required | Description |
|---|---|---|---|
| String | Yes | Blueprint identifier. Used by |
|
| Yes | Base Bukkit entity type the client renders the mob as (e.g. |
| Component (MiniMessage) | No | Sets the custom name via MiniMessage parsing. Only applied if present; omitting it leaves no name. |
| double | No | Sets |
|
| No | Behavioural flags (sunburn, drops, silence, speed, scale, etc.). See Attributes & Metadata. |
|
| No | Arbitrary Bukkit attribute base-value overrides (e.g. |
| Map | No | Named AI goal tree. See AI Goals, Targeting & Movement. |
| Map | No | Named target-selector tree. See AI Goals, Targeting & Movement. |
| Object | No | Movement control mode ( |
|
| No | Per-slot gear. See Equipment below. |
|
| No | Potion effects (may be requirement-gated). See Effects below. |
|
| No | Actions run once when the mob spawns; executor is the first online player. See Mob Actions. |
|
| No | Actions run once when the mob dies; executor is the killer (or first online player if no killer). See Mob Actions. |
| String | No | Id of another blueprint to spawn riding above this mob. See Passenger & Vehicle System below. |
| boolean | No | Default |
| boolean | No | When this mob dies, any tracked-mob passenger has its invulnerability cleared and is force-killed. See Passenger & Vehicle System below. |
| boolean | No | When |
| boolean | No | When |
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:
ConditionalEquipment fields
Field | Type | Required | Description |
|---|---|---|---|
|
| Yes | Target slot: |
|
| Yes | The item to equip. Standard Astral format: bare material string or full map with |
|
| 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:
ConditionalEffect fields
Field | Type | Default | Description |
|---|---|---|---|
|
| — | Potion effect type (e.g. |
| int |
| Effect amplifier (0 = level I, 1 = level II, etc.). |
| int |
| Duration in ticks. |
| boolean |
| When |
| boolean |
| When |
| boolean |
| When |
|
| — | 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.
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:
Fields
Field | Type | Default | Description |
|---|---|---|---|
| String |
| Id of the blueprint to spawn riding above this mob. When set, spawning this mob also spawns the referenced mob as its passenger. |
| boolean |
| When |
| boolean |
| When this (vehicle) mob dies, any tracked-mob passenger is force-killed. |
| boolean |
| When |
| boolean |
| When this mob's passenger dies, the vehicle is also force-killed. |
Spawn behavior
When a mob with passenger set is spawned:
The vehicle mob is created and spawned first.
The passenger blueprint is looked up by id and spawned at the same location.
The passenger is set to ride the vehicle via
Entity.startRiding().If
passenger-controls-vehicleistrue, the passenger's movement goals drive both mobs.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):
Builds the NMS entity directly:
new NMSMob(blueprint.type(), level), then sets its position.Clears the entity's vanilla
dropslist (ifmetadata.prevent-other-dropsis set) and zeroesexpToDrop(ifmetadata.prevent-experience-dropsis set) — before spawning.Sets
entity.persist = false— custom mobs are non-persistent and never saved to chunk data or survive a server restart.Runs
blueprint.apply(entity)— applies, in order: display name, health, metadata, attributes, move control. (Equipment and effects are not part ofapply(); see step 6.)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.Applies requirement-gated equipment and effects (
blueprint.applyGear(entity)), renders the initial health display, then firesspawn-actions.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:
Fires
death-actions(executor = killer or first online player).Clears
EntityDeathEvent#getDrops()ifmetadata.prevent-other-dropsis set (this is the actual drop suppression on the ground).Zeroes
setDroppedExp(0)ifmetadata.prevent-experience-dropsis set.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.
If
remove-passenger-on-death: true, force-kills any tracked-mob passengers.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
EntityDamageEventfor that mob.On a configurable schedule (controlled by
forceUpdateIntervalin config).
Full field summary
Field | Type | Default | Applied |
|---|---|---|---|
| String | — | — |
|
| — | At construction (spoofed rendering + hitbox) |
| Component | — | 1st, pre-spawn ( |
| double |
| 2nd, pre-spawn ( |
|
| — | 3rd, pre-spawn ( |
|
| — | 4th, pre-spawn ( |
| Object | — | 5th, pre-spawn ( |
| Map | — | Post-spawn, injected as per-instance copies |
| Map | — | Post-spawn, injected as per-instance copies |
|
|
| Post-spawn ( |
|
|
| Post-spawn ( |
|
| — | After gear application, once |
|
| — | On death |
| String |
| Spawn-time, after spawn-actions |
| boolean |
| Spawn-time |
| boolean |
| Death-time |
| boolean |
| Damage event |
| boolean |
| Death event |
See also
Attributes & Metadata — detailed field reference for
metadataandattributesblocks.AI Goals, Targeting & Movement — detailed reference for
goal-selectors,target-selectors, andmove-control.Mob Actions — full action catalogue for
spawn-actionsanddeath-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.