@@ -11,10 +11,11 @@ declare module 'prismarine-nbt'{
11
11
Long = 'long' ,
12
12
Float = 'float' ,
13
13
Double = 'double' ,
14
- ByteArray = 'byteArray' ,
15
14
String = 'string' ,
16
15
List = 'list' ,
17
16
Compound = 'compound' ,
17
+ ByteArray = 'byteArray' ,
18
+ ShortArray = 'shortArray' ,
18
19
IntArray = 'intArray' ,
19
20
LongArray = 'longArray' ,
20
21
}
@@ -26,10 +27,11 @@ declare module 'prismarine-nbt'{
26
27
[ TagType . Long ] : { type : TagType . Long , value : [ number , number ] } ;
27
28
[ TagType . Float ] : { type : TagType . Float , value : number } ;
28
29
[ TagType . Double ] : { type : TagType . Double , value : number } ;
29
- [ TagType . ByteArray ] : { type : TagType . ByteArray , value : number [ ] } ;
30
30
[ TagType . String ] : { type : TagType . String , value : string } ;
31
31
[ TagType . List ] : List < TagType >
32
32
[ TagType . Compound ] : { type : TagType . Compound , value : Record < string , undefined | Tags [ TagType ] > } ;
33
+ [ TagType . ByteArray ] : { type : TagType . ByteArray , value : number [ ] } ;
34
+ [ TagType . ShortArray ] : { type : TagType . ShortArray , value : number [ ] } ;
33
35
[ TagType . IntArray ] : { type : TagType . IntArray , value : number [ ] } ;
34
36
[ TagType . LongArray ] : { type : TagType . LongArray , value : [ number , number ] [ ] } ;
35
37
}
@@ -66,22 +68,22 @@ declare module 'prismarine-nbt'{
66
68
/** @deprecated */
67
69
export function parse ( data : Buffer , callback : ( err : Error | null , value : NBT ) => any ) : void ;
68
70
69
- export function bool ( val : number ) : { type : 'short' , value : number }
70
- export function short ( val : number ) : { type : 'short' , value : number }
71
- export function byte < T extends number > ( val : number ) : { type : 'byte' , value : number }
72
- export function string < T extends string | string [ ] > ( val : T ) : { type : 'string' , value : T }
73
- export function comp < T extends object | object [ ] > ( val : T , name ?: string ) : { type : 'compound' , name ?: string , value : T }
74
- export function int < T extends number | number [ ] > ( val : T ) : { type : 'int' , value : T }
75
- export function list < T extends string , K extends { type : T } > ( value : K ) : { type : 'list' ; value : { type : T | 'end' , value : K } }
76
- export function float < T extends number | number [ ] > ( value : T ) : { type : 'float' , value : T }
77
- export function double < T extends number | number [ ] > ( value : T ) : { type : 'double' , value : T }
71
+ export function bool ( val : number ) : { type : TagType . Short , value : number }
72
+ export function short ( val : number ) : { type : TagType . Short , value : number }
73
+ export function byte < T extends number > ( val : number ) : { type : TagType . Byte , value : number }
74
+ export function string < T extends string | string [ ] > ( val : T ) : { type : TagType . String , value : T }
75
+ export function comp < T extends object | object [ ] > ( val : T , name ?: string ) : { type : TagType . Compound , name ?: string , value : T }
76
+ export function int < T extends number | number [ ] > ( val : T ) : { type : TagType . Int , value : T }
77
+ export function list < T extends string , K extends { type : T } > ( value : K ) : { type : TagType . List ; value : { type : T | 'end' , value : K } }
78
+ export function float < T extends number | number [ ] > ( value : T ) : { type : TagType . Float , value : T }
79
+ export function double < T extends number | number [ ] > ( value : T ) : { type : TagType . Double , value : T }
78
80
/**
79
81
* @param value Takes a BigInt or an array of two 32-bit integers
80
82
*/
81
- export function long < T extends number | number [ ] | BigInt > ( value : T ) : { type : 'long' , value : T }
83
+ export function long < T extends number | number [ ] | BigInt > ( value : T ) : { type : TagType . Long , value : T }
82
84
// Arrays
83
- export function byteArray ( value : number [ ] ) : { type : 'byteArray' , value : number [ ] }
84
- export function shortArray ( value : number [ ] ) : { type : 'shortArray' , value : number [ ] }
85
- export function intArray ( value : number [ ] ) : { type : 'intArray' , value : number [ ] }
86
- export function longArray < T extends number [ ] | BigInt [ ] > ( value : T ) : { type : 'longArray' , value : T }
85
+ export function byteArray ( value : number [ ] ) : { type : TagType . ByteArray , value : number [ ] }
86
+ export function shortArray ( value : number [ ] ) : { type : TagType . ShortArray , value : number [ ] }
87
+ export function intArray ( value : number [ ] ) : { type : TagType . ByteArray , value : number [ ] }
88
+ export function longArray < T extends number [ ] | BigInt [ ] > ( value : T ) : { type : TagType . LongArray , value : T }
87
89
}
0 commit comments