UNPKG

earthmc

Version:

An unofficial EarthMC library providing handy methods and extensive info.

64 lines 2.03 kB
import type { Route, RouteInfo, Point2D, StrictPoint2D, CardinalDirection, TravelTimes } from '../../types/index.js'; import Emitter from '../../helpers/EventEmitter.js'; import type Squaremap from './Squaremap.js'; export type GPSEvents = { locationUpdate: RouteInfo; hidden: string | { lastLocation: StrictPoint2D; routeInfo: RouteInfo; }; error: { err: string; msg: string; }; }; export declare const ACTION_SPEEDS: { readonly SNEAK: 1.295; readonly WALK: 4.317; readonly SPRINT: 5.612; readonly BOAT: 8; }; declare class GPS extends Emitter<GPSEvents> { #private; get map(): Squaremap; get emittedHidden(): boolean; protected set emittedHidden(val: boolean); get lastLoc(): { x: number; z: number; }; protected set lastLoc(val: { x: number; z: number; }); static readonly Routes: { readonly SAFEST: { readonly avoidPvp: boolean; readonly avoidPrivate: boolean; }; readonly FASTEST: { readonly avoidPvp: boolean; readonly avoidPrivate: boolean; }; readonly AVOID_PRIVATE: { readonly avoidPvp: boolean; readonly avoidPrivate: boolean; }; readonly AVOID_PVP: { readonly avoidPvp: boolean; readonly avoidPrivate: boolean; }; }; constructor(map: Squaremap); track(playerName: string, interval?: number, route?: { readonly avoidPvp: boolean; readonly avoidPrivate: boolean; }): Promise<this>; safestRoute(loc: Point2D): Promise<RouteInfo>; fastestRoute(loc: Point2D): Promise<RouteInfo>; findRoute(loc: Point2D, options?: Route): Promise<RouteInfo>; static cardinalDirection(origin: Point2D, destination: Point2D, allowIntermediates?: boolean): CardinalDirection; static calcTravelTimes(distance: number): TravelTimes; } export { GPS, GPS as default }; //# sourceMappingURL=GPS.d.ts.map