Astral Realms Documentation Help

Effects

Effects apply modifications to entities when skills are cast or hit. Every skill can define two effect lists: cast-effects (applied to the caster when the skill is cast) and target-effects (applied to each entity affected by the skill). Effects are looked up in EffectFactory.REGISTRY by type; unknown types are logged as errors and skipped.

Effect types

AstralSkill ships six registered effect types:

Type

Purpose

fire

Set target fire ticks (applies to any entity)

potion-effect

Apply a Minecraft potion effect (LivingEntity only)

velocity

Set entity velocity (supports local yaw-relative or world-axis directions, plus pull-toward-caster)

command

Dispatch a console command with per-target placeholders

freezing-visual

Send powder-snow freeze packet to player for a duration

break-block

Destroy the blocks in a sphere around the skill location

Most effect parameters are PlaceholderWrapper<T> fields, so they accept placeholder expressions (e.g. %player_name%, or custom placeholders a caller registers such as %level%) resolved against the skill's PlaceholderContainer at apply time.

Fire effect

Sets the target's fire ticks (the fire bar visible to other players). Applies to any entity.

Parameters:

Name

Type

Default

Description

duration

PlaceholderWrapper<Integer>

3

Fire duration in ticks

Example: cast-effect (caster on-cast) and target-effect (hit enemy)

id: explosive-touch type: impact cast-effects: - type: fire params: duration: 5s target-effects: - type: fire params: duration: 5s

Potion-effect

Applies a Minecraft status effect (e.g., minecraft:nausea, minecraft:darkness, minecraft:strength). Only affects LivingEntity (not items, arrows, etc.); other entity types are silently skipped. The effect type is resolved by namespaced key via Bukkit's Registry.MOB_EFFECT.

Parameters:

Name

Type

Default

Description

effect

String

(required)

Namespaced effect key (e.g., minecraft:nausea, darkness)

duration

PlaceholderWrapper<Integer>

3

Effect duration in ticks (1 tick ≈ 50ms; 20 ticks = 1 second)

amplifier

PlaceholderWrapper<Integer>

0

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

ambient

boolean

false

If true, effect particles are subtle

hide-particles

boolean

false

If true, particles are not shown; the implementation inverts this to show-particles in the PotionEffect constructor

show-icon

boolean

true

If true, effect icon appears on player HUD

Example: potion effect with amplifier

id: explosive-touch type: impact cast-effects: - type: potion-effect params: effect: "minecraft:nausea" duration: 5s amplifier: 1 hide-particles: true target-effects: []

Example: darkness potion from mob attack

id: warden-potion-effect type: impact target-effects: - type: potion-effect params: effect: darkness amplifier: 1 duration: 100

Velocity effect

Sets an entity's velocity. Supports four modes: local yaw-relative direction, world-axis direction, pull toward caster, and combinations of these.

Local velocity — relative to the target's facing direction (yaw-only; pitch is ignored; local Y is always world-up):

  • local-x — rightward motion perpendicular to facing

  • local-y — upward motion (world Y)

  • local-z — forward motion along facing direction

World velocity — absolute Cartesian axes:

  • world-x, world-y, world-z — velocity components in world coordinates

Pull toward caster — pulls the target toward the entity that cast the skill:

  • pull-strength — magnitude of the pull force

  • pull-y — additional upward velocity (for arcing motion)

  • pull-horizontal — if true, ignore vertical distance (horizontal-only pull)

Parameters:

Name

Type

Default

Description

local-x

PlaceholderWrapper<Double>

null

Local rightward velocity component

local-y

PlaceholderWrapper<Double>

null

Local upward velocity component

local-z

PlaceholderWrapper<Double>

null

Local forward velocity component

world-x

PlaceholderWrapper<Double>

null

World X-axis velocity component

world-y

PlaceholderWrapper<Double>

null

World Y-axis velocity component

world-z

PlaceholderWrapper<Double>

null

World Z-axis velocity component

pull-strength

PlaceholderWrapper<Double>

null

Magnitude of pull toward caster

pull-y

PlaceholderWrapper<Double>

null

Extra upward velocity added during pull (for arc)

pull-horizontal

PlaceholderWrapper<Boolean>

null

If true, ignore vertical distance when pulling

Example: forward dash (local-z)

id: knight-attack-3-impact type: impact cast-effects: - type: velocity params: local-x: 0.0 local-y: 0.0 local-z: 2.2

Command effect

Dispatches a console command. The command is resolved through the skill's placeholder container and executed immediately or on a delay. Two per-target placeholders are injected: %uuid% (target's UUID) and %name% (target's display name).

Parameters:

Name

Type

Default

Description

command

PlaceholderWrapper<String>

(required)

Console command to execute; %uuid% and %name% are injected per-target

delay

PlaceholderWrapper<Long>

0

Delay in ticks before executing (0 = immediate, else scheduled via Bukkit.getScheduler().runTaskLater())

Example: shield resource grant on cast

id: knight-attack-3-impact type: impact cast-effects: - type: command params: command: "stats resource add %player_name% shield 40"

Example: attack speed boost with delay

id: mage-attack-4-dummy type: dummy cast-effects: - type: command params: command: "stats modifiers addtimed %player_name% astralclass:attack_speed_boost astralstats:attack_speed PERCENTAGE 150 4000" delay: 0

Freezing-visual effect

Sends a powder-snow freeze packet to the player (entity data field 7 = 140) then resets it after a delay. Creates a brief freeze-screen effect without applying actual Freeze status. Players only (non-player entities are skipped); uses PacketEvents for packet dispatch.

Parameters:

Name

Type

Default

Description

millis

PlaceholderWrapper<Integer>

20

Duration in milliseconds before resetting the visual

Example: freeze visual on mage ability

id: mage-attack-4-dummy type: dummy cast-effects: - type: freezing-visual params: millis: 4000

Break-block effect

Destroys the blocks in a sphere around the position the skill fired at. Effects always run on the main thread, so touching blocks here is safe.

How a block is removed depends on the caster:

  • A player caster, with break-as-caster left on — each block goes through Player#breakBlock, so the server runs the normal player-break path: a BlockBreakEvent is fired and land-protection plugins can cancel it block by block.

  • Any other caster, or break-as-caster: false — the block is removed directly (breakNaturally()/setType), which fires no event and is therefore invisible to protection plugins.

break-as-caster also falls back to a direct break when the caster is a player who is not in the world being edited.

Parameters:

Name

Type

Default

Description

origin

skill/target/caster

skill

What the sphere is centred on. skill is the skill location; a skill that tracks no position falls back to the target entity.

offset

Vector

—

World-space offset added to the origin (e.g. { y: -1 } to break the floor).

radius

PlaceholderWrapper<Double>

0.0

Sphere radius in blocks. 0 breaks only the block at the origin — the origin is almost never exactly at a block centre, so the sphere test would otherwise reject that block too.

max-blocks

PlaceholderWrapper<Integer>

64

Hard cap on blocks destroyed per application.

break-as-caster

PlaceholderWrapper<Boolean>

true

Break through the caster with Player#breakBlock when the caster is a player in that world.

drop-items

PlaceholderWrapper<Boolean>

true

Drop the block's items. Ignored while breaking as the caster — the held tool decides.

apply-physics

PlaceholderWrapper<Boolean>

true

Update neighbouring blocks. Only used with drop-items: false and not breaking as the caster.

break-unbreakable

PlaceholderWrapper<Boolean>

false

Also break blocks with no break time (bedrock, barrier, end portal frame, …).

whitelist

List

—

When set, only blocks matching these entries are broken.

blacklist

List

—

Never break these. Applied after the whitelist.

debug

PlaceholderWrapper<Boolean>

false

Log the resolved origin, every effective setting, and what happened to each block.

The volume is a sphere, measured from each block's centre to the skill position, even though the loop walks the enclosing cube. Blocks outside the world's height range are skipped.

Block filters

Each whitelist/blacklist entry is either a block material (CHEST, minecraft:stone — case- and namespace-insensitive) or the token TILEENTITY (also accepted as TILE_ENTITY/BLOCK_ENTITY), which matches every block holding a block entity: chests, barrels, shulker boxes, hoppers, furnaces, spawners, signs, beacons, decorated pots, and so on. Blacklisting it is the one-liner for "don't destroy anything that stores something".

target-effects: - type: break-block params: radius: 2.5 max-blocks: 48 break-as-caster: true blacklist: [ TILEENTITY, BEDROCK, OBSIDIAN ]

Filters are parsed once at load: an entry that is neither a block material nor that token fails the skill at load time with a message naming it, rather than silently widening what the skill may destroy.

Nothing breaking? Set debug: true and cast it once. Every application then prints the resolved origin and block coordinates, all effective settings, and one line per block with the reason it was skipped (air, blacklisted, not in whitelist, unbreakable, or Player#breakBlock returned false when a protection plugin cancelled the BlockBreakEvent), followed by a totals line.

Effect execution and ordering

  • Cast-effects run when the skill is triggered, applied to the caster (may be null for non-entity triggers).

  • Target-effects run for each entity that the skill affects (projectile hits, laser hits, impact radius, etc.), applied to the affected entity.

  • Within each list, effects run top-to-bottom in YAML order.

  • Unknown effect types are logged and skipped; the skill continues running.

Placeholder resolution

All effect parameters typed as PlaceholderWrapper<T> (duration, amplifier, command, millis, etc.) resolve through the skill's PlaceholderContainer, which includes:

  • AstralCore placeholders registered by the caller/consumer for the caster (e.g. player-scoped %player_name%, or custom placeholders like %level% registered by AstralClasses/AstralMobs before casting)

  • Per-effect injected placeholders (e.g., %uuid%, %name% in command effects)

Note: a top-level placeholders: map sometimes seen at the root of a skill file is not part of this resolution chain — it has no corresponding field on the skill schema and is not parsed.

Last modified: 25 September 2026