Appearance
helix / PosValue
Class: PosValue
Defined in: core/values/pos.ts:14
A coordinate tuple (block_pos, vec3, vec2, column_pos). One mode applies to the whole vector:
Pos(10, 4, 5) -> "10 4 5" (absolute) Pos.rel(0, 1, 0) -> "~ ~1 ~" (relative, ~) Pos.local(0, 0, 2) -> "^ ^ ^2" (local, ^) Pos.here() -> "~ ~ ~"
Implements
Constructors
Constructor
new PosValue(
coords,mode):PosValue
Defined in: core/values/pos.ts:15
Parameters
coords
number[]
mode
Mode
Returns
PosValue
Methods
center()
center():
PosValue
Defined in: core/values/pos.ts:39
A new position at the center of this block cell (+0.5 on each axis). A block_display whose blocks are translated by -0.5 (centered for rotation) renders its visual center at the entity position, so summoning at a cell's center makes those blocks fill the cell exactly instead of sitting 0.5 low.
Returns
PosValue
offset()
offset(
dx,dy,dz):PosValue
Defined in: core/values/pos.ts:25
A new position shifted by (dx, dy, dz), keeping the same mode.
Parameters
dx
number
dy
number
dz
number
Returns
PosValue
render()
render():
string
Defined in: core/values/pos.ts:20
Returns
string