-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.d.ts
55 lines (51 loc) · 1.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/// <reference types="node" />
/// <reference types="vec3" />
/// <reference types="prismarine-item" />
import {EventEmitter} from 'events';
import { Vec3 } from 'vec3';
import { Item } from 'prismarine-item';
import { ChatMessage } from 'prismarine-chat';
declare module 'prismarine-entity' {
export interface Effect {
id: number;
amplifier: number;
duration: number;
}
export class Entity extends EventEmitter {
constructor(id: number);
id: number;
type: EntityType;
uuid?: string;
username?: string;
mobType?: string;
displayName?: string;
entityType?: number;
kind?: string;
name?: string;
objectType?: string;
count?: number;
position: Vec3;
velocity: Vec3;
yaw: number;
pitch: number;
height: number;
width: number;
onGround: boolean;
equipment: Array<Item>;
get heldItem(): Item;
metadata: Array<object>;
isValid: boolean;
health?: number;
food?: number;
foodSaturation?: number;
elytraFlying?: boolean
player?: object;
effects: Effect[];
vehicle: Entity;
passengers: Entity[];
setEquipment(index: number, item: Item): void;
getCustomName(): ChatMessage | null;
getDroppedItem(): Item | null;
}
export type EntityType = 'player' | 'mob' | 'object' | 'global' | 'orb' | 'projectile'| 'hostile' | 'other';
}