Placeholders
AstralMobs registers a single placeholder namespace mob with AstralCore. Unlike global placeholders, mob_* placeholders are local — they resolve only within specific contexts where a mob is available in the placeholder container, such as in goal requirement/action contexts, spawn/death actions, and health-display conditions.
The mob namespace implements ComplexPlaceholder, allowing chaining (e.g., %mob_target_name%, %mob_memory_<key>%) and integration with the requirement DSL operators like [compare].
Identity
Placeholder | Type | Description |
|---|---|---|
| String | Spoofed entity type name as displayed to the client (e.g., "Creeper", "Evoker"). |
| String | Mob's UUID as a string, useful for issuing commands (e.g., |
Health
Placeholder | Type | Description |
|---|---|---|
| Float | Current health in half-hearts. |
| Float | Maximum health. |
| Double | Health-to-max ratio (0.0 to 1.0); useful for phase gating. |
State
Placeholder | Type | Description |
|---|---|---|
| Boolean | True if the mob has an active target (player or entity). |
| String | Simple class name of the currently running |
| LocationPlaceholder | Mob's current block location; supports sub-placeholders ( |
| LocationPlaceholder | Mob's location offset one block upward; used for particle/visual effects. |
Target
When the mob has no target, all %mob_target_*% placeholders return null.
Placeholder | Type | Description |
|---|---|---|
| String | Display name of the target (typically a player name). |
| String | Entity type of the target (e.g., "Player", "Zombie"). |
| Float | Distance in blocks from the mob to the target. |
Memory
Memory is a key-value store (type Object) scoped to the individual mob instance, populated and read by actions.
Placeholder | Type | Description |
|---|---|---|
| Object | Arbitrary value stored under |
Example: In the creeper blueprint, [store-memory] cooldown-move 2000 sets a 2-second cooldown duration, then later requirements read it with [compare] %mob_timer_cooldown-move% >= %mob_memory_cooldown-move%.
Timers
Timers measure elapsed milliseconds since the start-timer action last (re)started a named timer for that mob. Each timer is scoped to the mob and the key string.
Placeholder | Type | Description |
|---|---|---|
| Long | Milliseconds elapsed since the timer |
Example: The evoker boss uses [compare] %mob_timer_cooldown-cast-goal% > 4000 to enforce a 4-second minimum between goal state changes.
Passenger & Vehicle
Placeholder | Type | Description |
|---|---|---|
| NMSMob or null | If this mob is a vehicle carrying a blueprint passenger, returns the passenger mob; otherwise |
| NMSMob or null | If this mob is mounted as a passenger on another blueprint mob, returns the vehicle mob; otherwise |
| Boolean | True if this mob has a passenger. |
| Boolean | True if this mob is mounted on a vehicle. |
Full Reference
All placeholders registered by the mob namespace:
Placeholder | Type | Description |
|---|---|---|
| String | Spoofed entity type name. |
| String | Mob UUID (string format). |
| Float | Current health (half-hearts). |
| Float | Maximum health. |
| Double | Health-to-max ratio (0–1). |
| Object | Stored value under key, or |
| Long | Milliseconds elapsed since timer key started (0 if never started). |
| NMSMob or null | Passenger mob, or null. |
| NMSMob or null | Vehicle mob, or null. |
| Boolean | Has a passenger. |
| Boolean | Mounted on a vehicle. |
| Boolean | Has an active target. |
| LocationPlaceholder | Current location. |
| LocationPlaceholder | Location + 1 block up. |
| String | Target display name (null if no target). |
| String | Target entity type (null if no target). |
| Float | Distance to target (null if no target). |
| String | Running goal class name, or |
Usage in Requirements & Actions
Mob placeholders integrate seamlessly with the requirement DSL and action system. The [compare] requirement operator supports arithmetic and equality checks:
The store-memory and start-timer actions populate memory and timer placeholders:
Later requirements chain these:
Consult Mob Actions and AI Goals, Targeting & Movement for full action/requirement syntax.