@nxg-org/mineflayer-util-plugin
Version:
mineflayer utils for NextGEN mineflayer plugins.
22 lines (21 loc) • 878 B
TypeScript
import { Bot } from "mineflayer";
import type { Block } from "prismarine-block";
import type { Entity } from "prismarine-entity";
import { Vec3 } from "vec3";
import AABB from "./calcs/aabb";
import { BlockFace } from "./calcs/iterators";
type RayAddtion = {
intersect: Vec3;
face: BlockFace;
};
export type EntityRaycastReturn = (Block | Entity) & RayAddtion;
export declare class RayTraceFunctions {
private bot;
constructor(bot: Bot);
entityRaytrace(startPos: Vec3, dir: Vec3, maxDistance?: number, matcher?: (e: Entity) => boolean): EntityRaycastReturn | null;
entityRaytraceRaw(startPos: Vec3, dir: Vec3, aabbMap: {
[id: string]: AABB;
}, maxDistance?: number, matcher?: (e: Entity) => boolean): EntityRaycastReturn | null;
entityAtEntityCursor(entity: Entity, maxDistance?: number): Entity | null;
}
export {};