Astral Realms Documentation Help

Configuration

All AstralMobs configuration lives in plugins/AstralMobs/config.yml, loaded at startup and reloadable via /mobs reload.

config.yml

The config.yml file maps to the MainConfiguration record and controls the health display rendering and the requirement-gated equipment/effect refresh loop.

mob-health: "<dark_green>%imgmanip_test-mob-bar%<black>%imgmanip_test-mob-bar-neg%<white>%img_tower:health_container_up%"

Key

Type

Description

mob-health

ComponentWrapper (MiniMessage)

Template rendered as overhead text on non-boss mobs only, updated per force-update-interval. Resolved with placeholders: %health%, %max-health%, and %mob_*% (e.g. %mob_active-goal%, %mob_target_name%). Boss mobs do not use this template — see below.

force-update-interval

int (ticks)

Interval (in server ticks, 1 tick = 50ms) at which the health display refreshes. If ≤ 0, the display loop is not started and the health bar updates only on damage events. Default: 0 (disabled) — the shipped production config.yml leaves this unset.

requirement-update-interval

int (ticks)

Interval at which requirement-gated equipment and effects are re-evaluated and applied. Clamped to a minimum of 1 (every tick) regardless of the configured value. Only blueprints flagged dynamic are processed in this loop.

How Health Display Works

The health display is driven by the MobService tick loop:

  1. Boss mobs (blueprints with metadata.boss: true) display health via a boss bar (Minecraft boss bar UI, red, segmented). The title is hard-coded to <spoofed type name> - <health> / <max-health> — it does not use the mob-health template.

  2. Normal mobs display health via overhead text (a packet-based text display entity, anchored above the mob and following it), rendered from the mob-health template.

  3. Suppressed display: if metadata.hide-health-bar: true is set on the blueprint, no display is created or updated.

The mob-health template is resolved once per display update, for non-boss mobs only, with the following placeholder context:

  • %health% → current health (1 decimal place)

  • %max-health% → maximum health (1 decimal place)

  • %mob_*% → any placeholder registered by AstralMobs or the mob's skill system (e.g. %mob_active-goal%, %mob_has-target%, %mob_target_distance%)

Loop Lifecycle

The MobService.start() method creates the repeating scheduler tasks:

  • Display task: created only if force-update-interval > 0. Calls AstralEntity.updateHealthDisplay() on all alive mobs at the configured interval. If ≤ 0, this loop is skipped and the display updates only when damage occurs.

  • Gear task: runs every max(1, requirement-update-interval) ticks. Applies requirement-gated equipment and effects to blueprints with the dynamic flag.

Reload behavior: /mobs reload re-reads config.yml and calls loadConfiguration(), updating the mob-health template and interval values. However, the scheduler tasks are not recreated during a reload—they continue with the old interval until the server restarts. The new template takes effect immediately on the next display update.

Example Configurations

Minimal Health Bar with Images

Uses image placeholders (requires AstralImages or similar):

mob-health: "<dark_green>%imgmanip_test-mob-bar%<black>%imgmanip_test-mob-bar-neg%<white>%img_tower:health_container_up%"

Debug Display with AI State

Shows the mob's AI state inline (for development):

mob-health: "<dark_green><bold>Goal: <reset>%mob_active-goal%\n<dark_green><bold>Has target: <reset>%mob_has-target%\n<dark_green><bold>Target name: <reset>%mob_target_name%\n<dark_green><bold>Target distance: <reset>%mob_target_distance%"

Fast Health Updates

Forces the health display to update every tick (50ms server time):

force-update-interval: 1

Lazy Health Updates

Updates the health display every 20 ticks (~1 second):

force-update-interval: 20

Disabled Health Display Loop

Disables the repeating loop; the health bar updates only on damage events (does not suppress mobs with hide-health-bar):

force-update-interval: 0

Infrequent Equipment Refresh

Re-evaluates requirement-gated gear every 10 ticks:

requirement-update-interval: 10
Last modified: 25 July 2026