Goals
This commit is contained in:
@@ -266,9 +266,17 @@ export interface MobRef extends LivingRef {
|
||||
readonly last_attacker: Player | MobRef | undefined;
|
||||
// a number from 0 to 1, from the mob's own random, which tests replace
|
||||
random(): number;
|
||||
// walks toward x y z until it's there or stop is called. speed multiplies its movement_speed
|
||||
move_to(x: number, y: number, z: number, speed?: number): void;
|
||||
// finds a way to x y z around what's in between and walks it, see PATHFINDING.md. when the whole way isn't there it
|
||||
// walks as close as it can get. false when it can't get any closer, or when it searched in vain less than a second
|
||||
// ago, keeping the way it had. speed multiplies its movement_speed
|
||||
move_to(x: number, y: number, z: number, speed?: number): boolean;
|
||||
// stops walking its way
|
||||
stop(): void;
|
||||
// whether it's still on its way
|
||||
readonly moving: boolean;
|
||||
// a solid block in its way that its way goes through, tagged #cubi:mobs_path_through, which it's pressed against.
|
||||
// it waits there for as long as the block is solid and in its way, instead of giving up
|
||||
readonly blocked_by: { readonly x: number; readonly y: number; readonly z: number; readonly id: Id } | undefined;
|
||||
// turns its head, and its body after it, toward a point. it stops after a couple of ticks, so a goal that keeps
|
||||
// looking at something calls this every tick
|
||||
look_at(x: number, y: number, z: number): void;
|
||||
|
||||
Reference in New Issue
Block a user