UNPKG

@nxg-org/mineflayer-tracker

Version:

Provides functionality for more accurate entity and projectile tracking.

23 lines (22 loc) 1.08 kB
import { Entity } from "prismarine-entity"; import { Bot } from "mineflayer"; import { ControlStateHandler, EPhysicsCtx, EntityState } from "@nxg-org/mineflayer-physics-util"; import { Vec3 } from "vec3"; import { IPhysics } from "@nxg-org/mineflayer-physics-util/dist/physics/engines"; export interface MovementSimOptions { sprintFirst: boolean; jumpFirst: boolean; } /** * To be used once per movement. * * Provide state that will serve as a base. The state itself will not be modified/consumed unless called for. */ export declare class MovementSimulations { bot: Bot; readonly ctx: IPhysics; constructor(bot: Bot, ctx: IPhysics); predictGenerator(ctx: EPhysicsCtx, world: any, ticks?: number, controls?: ControlStateHandler): Generator<EntityState, EPhysicsCtx<import("@nxg-org/mineflayer-physics-util").IEntityState>, unknown>; predictForward(target: Entity, world: any, ticks?: number, controls?: ControlStateHandler): EPhysicsCtx<EntityState>; findCorrectMovements(lastState: EPhysicsCtx, world: any, wantedPos: Vec3): ControlStateHandler; }