Positions
On this page(6)
Actions that happen somewhere take a position. That is at: (particles, sounds, entities, lightning), center: (an area hit), to: (a line end, a jump landing) or from: (a search). A position is an anchor plus an optional offset.
- type: particle
particle: CRIT
at: '{target_center}' # the middle of the mob that procced
offset: '0, 0.5, 0' # half a block higherQuote every anchor: '{target_pos}'.
Body anchors
| Anchor | Where |
|---|---|
{target_pos} | The feet of the mob that procced. Fixed at the proc, still valid after it died |
{player_pos} | Your feet when the action runs |
{mob_pos} | The feet of the mob of the running for-each-mob round |
{from_pos} | Where the running chain jump starts (the mob it jumps from; your feet on the first jump of start: player) |
{to_pos} | The feet of the mob the running chain jump lands on |
Body heights: _center and _top
Each anchor that names a body also has a _center and a _top form:
| Form | Where | Example |
|---|---|---|
_pos | The feet | {target_pos} |
_center | The middle of that body | {target_center}, {player_center}, {mob_center} |
_top | The top of that body | {target_top}, {to_top} |
{point_pos} is the point of the running for-each-point round. It names no body: like the area
anchors, it has no _center or _top form, so raise it with offset.
The height is the mob's own, so a rabbit and a warden are each aimed at their own middle. The
_center and _top forms also work in a particle line's to and a for-each-point's to.
Use {target_center} for hit sparks and lines, {target_top} for floating texts, and
{target_pos} for things on the ground (rings, falling blades, mobs that appear).
Flow anchors outside their flow
{mob_pos} outside a for-each-mob, {from_pos} or {to_pos} outside a chain, and {point_pos}
outside a for-each-point are a warning and read as {target_pos}. Inside a
preset called from the flow they work: the flow passes into the preset.
Area anchors
These read the mob area of the stage you are shown, once, when the enchant procs. The whole proc uses that one read.
| Anchor | Where |
|---|---|
{area_center} | The middle of the area, on its floor |
{area_min} | Its lowest corner (smallest x, y and z), on its floor |
{area_max} | Its highest corner (largest x, y and z): the top of the area, not the floor |
{random_in_area} | A random column of the area, on its floor. A new one each time the action runs |
Without a mob area (outside a zone, or with the zones module off) an action that reads one does
nothing. The console reports it once, until the next /dungeons reload.
Offset
offset moves the point. Two forms, each axis an expression:
offset: '0, 1.5, 0' # x, y, z
offset: { x: 0, y: 1.5, z: 0 } # a missing axis is 0
offset: '{random:-2:2}, 0, {random:-2:2}' # a random spot within 2 blocksThe default is '0, 0, 0'. The axes are world axes: x east, y up, z south.
Some keys take no offset of their own:
- A particle
to:and afor-each-pointto:. - A damage
at:(it names a mob, not a point). - An area hit puts its offset inside
area:. Ajump-toputs its offset insidemovement:. A mob search puts its offset insidemobs:.
Worlds
An effect in another world than yours is never sent.