API reference / @jsprismarine/entity-goals / SlimeHeading
Class: SlimeHeading
Defined in: goals/slimeHeading.ts:19
Where one slime is heading.
Constructors
Constructor
new SlimeHeading():
SlimeHeading
Returns
SlimeHeading
Methods
ahead()
ahead(
from,reach):EntityPosition|undefined
Defined in: goals/slimeHeading.ts:40
Where one hop along the heading lands.
Parameters
from
Where the slime is now.
reach
number
How far one hop carries it, in blocks.
Returns
EntityPosition | undefined
The position, or undefined while nothing has set a heading yet.
set()
set(
radians):void
Defined in: goals/slimeHeading.ts:24
Points the slime along a heading, in radians.
Parameters
radians
number
Returns
void
toward()
toward(
from,to):void
Defined in: goals/slimeHeading.ts:29
Points the slime from one position at another, which is what chasing a target is.
Parameters
from
to
Returns
void