-
Notifications
You must be signed in to change notification settings - Fork 0
/
item.d.ts
47 lines (42 loc) · 1.05 KB
/
item.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
/**
* A class representing a Minecraft Item definition (not an item instance)
*/
declare class Item {
/**
* The Namespaced ID of the item (e.g. `minecraft:stone`)
*/
public readonly name: string;
/**
* The translate name of the item (e.g. `item.stone`)
*/
public readonly translateName: string;
}
/**
* An instance of an `Item` (has count, damage, etc.)
*/
declare class ItemStack {
/**
* The item type. Will be `null` when the item is air.
*/
public readonly item: Item | null;
/**
* The auxiliary/data value of the item (not damage) (-32768 to 32767)
*/
public readonly aux: number;
/**
* Get the display name (e.g. `Cooked Beef`)
*/
getDisplayName(): string;
/**
* Gets the number of items in the stack
*/
getCount(): number;
/**
* Gets the pickup time in milliseconds
*/
getPickupTime(): number;
/**
* Gets the damage of the item (e.g. if a sword was used once, it would have a damage value of 1)
*/
getDamage(): number;
}