@minecraft/server 1.0.0-preview.1.19.50.21 → 1.0.0-preview.1.19.50.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +27 -28
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ```json
|
|
16
16
|
* {
|
|
17
17
|
* "module_name": "@minecraft/server",
|
|
18
|
-
* "version": "1.1.0-internal.preview.1.19.50.
|
|
18
|
+
* "version": "1.1.0-internal.preview.1.19.50.24"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
@@ -24,19 +24,20 @@
|
|
|
24
24
|
* Contains return data on the result of a command execution.
|
|
25
25
|
*/
|
|
26
26
|
export class CommandResult {
|
|
27
|
+
protected constructor();
|
|
27
28
|
/**
|
|
28
29
|
* If the command operates against a number of entities,
|
|
29
30
|
* blocks, or items, this returns the number of successful
|
|
30
31
|
* applications of this command.
|
|
31
32
|
*/
|
|
32
33
|
readonly successCount: number;
|
|
33
|
-
protected constructor();
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* A class that represents a particular dimension (e.g., The
|
|
37
37
|
* End) within a world.
|
|
38
38
|
*/
|
|
39
39
|
export class Dimension {
|
|
40
|
+
protected constructor();
|
|
40
41
|
/**
|
|
41
42
|
* Identifier of the dimension.
|
|
42
43
|
* @throws This property can throw when used.
|
|
@@ -45,9 +46,9 @@ export class Dimension {
|
|
|
45
46
|
/**
|
|
46
47
|
* @remarks
|
|
47
48
|
* Runs a particular command asynchronously from the context of
|
|
48
|
-
* the broader dimension.
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* the broader dimension. Note that there is a maximum queue
|
|
50
|
+
* of 128 asynchronous commands that can be run in a given
|
|
51
|
+
* tick.
|
|
51
52
|
* @param commandString
|
|
52
53
|
* Command to run. Note that command strings should not start
|
|
53
54
|
* with slash.
|
|
@@ -57,18 +58,13 @@ export class Dimension {
|
|
|
57
58
|
* @throws This function can throw errors.
|
|
58
59
|
*/
|
|
59
60
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
60
|
-
protected constructor();
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Represents the state of an entity (a mob, the player, or
|
|
64
64
|
* other moving objects like minecarts) in the world.
|
|
65
65
|
*/
|
|
66
66
|
export class Entity {
|
|
67
|
-
|
|
68
|
-
* Dimension that the entity is currently within.
|
|
69
|
-
* @throws This property can throw when used.
|
|
70
|
-
*/
|
|
71
|
-
readonly dimension: Dimension;
|
|
67
|
+
protected constructor();
|
|
72
68
|
/**
|
|
73
69
|
* Unique identifier of the entity. This identifier is intended
|
|
74
70
|
* to be consistent across loads of a world instance. No
|
|
@@ -86,9 +82,8 @@ export class Entity {
|
|
|
86
82
|
/**
|
|
87
83
|
* @remarks
|
|
88
84
|
* Runs a particular command asynchronously from the context of
|
|
89
|
-
* this entity.
|
|
90
|
-
*
|
|
91
|
-
* operations.
|
|
85
|
+
* this entity. Note that there is a maximum queue of 128
|
|
86
|
+
* asynchronous commands that can be run in a given tick.
|
|
92
87
|
* @param commandString
|
|
93
88
|
* Command to run. Note that command strings should not start
|
|
94
89
|
* with slash.
|
|
@@ -98,13 +93,13 @@ export class Entity {
|
|
|
98
93
|
* @throws This function can throw errors.
|
|
99
94
|
*/
|
|
100
95
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
101
|
-
protected constructor();
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
98
|
* A collection of default Minecraft dimension types.
|
|
105
99
|
*/
|
|
106
100
|
// tslint:disable-next-line:no-unnecessary-class
|
|
107
101
|
export class MinecraftDimensionTypes {
|
|
102
|
+
protected constructor();
|
|
108
103
|
/**
|
|
109
104
|
* The Nether is a collection of biomes separate from the
|
|
110
105
|
* Overworld, including Soul Sand Valleys and Crimson forests.
|
|
@@ -132,17 +127,12 @@ export class MinecraftDimensionTypes {
|
|
|
132
127
|
* the End.
|
|
133
128
|
*/
|
|
134
129
|
static readonly theEnd = 'minecraft:the_end';
|
|
135
|
-
protected constructor();
|
|
136
130
|
}
|
|
137
131
|
/**
|
|
138
132
|
* Represents a player within the world.
|
|
139
133
|
*/
|
|
140
134
|
export class Player extends Entity {
|
|
141
|
-
|
|
142
|
-
* Dimension that the entity is currently within.
|
|
143
|
-
* @throws This property can throw when used.
|
|
144
|
-
*/
|
|
145
|
-
readonly dimension: Dimension;
|
|
135
|
+
protected constructor();
|
|
146
136
|
/**
|
|
147
137
|
* Unique identifier of the player. This identifier is intended
|
|
148
138
|
* to be consistent across loads of a world instance. No
|
|
@@ -165,9 +155,8 @@ export class Player extends Entity {
|
|
|
165
155
|
/**
|
|
166
156
|
* @remarks
|
|
167
157
|
* Runs a particular command asynchronously from the context of
|
|
168
|
-
* this entity.
|
|
169
|
-
*
|
|
170
|
-
* operations.
|
|
158
|
+
* this entity. Note that there is a maximum queue of 128
|
|
159
|
+
* asynchronous commands that can be run in a given tick.
|
|
171
160
|
* @param commandString
|
|
172
161
|
* Command to run. Note that command strings should not start
|
|
173
162
|
* with slash.
|
|
@@ -177,21 +166,32 @@ export class Player extends Entity {
|
|
|
177
166
|
* @throws This function can throw errors.
|
|
178
167
|
*/
|
|
179
168
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
180
|
-
protected constructor();
|
|
181
169
|
}
|
|
182
170
|
/**
|
|
183
171
|
* A class that provides system-level events and functions.
|
|
184
172
|
*/
|
|
185
173
|
export class System {
|
|
186
|
-
readonly currentTick: number;
|
|
187
|
-
run(callback: () => void, tickDelay?: number): number;
|
|
188
174
|
protected constructor();
|
|
175
|
+
/**
|
|
176
|
+
* @remarks
|
|
177
|
+
* Runs a specified function at a future time. This is
|
|
178
|
+
* frequently used to implement delayed behaviors and game
|
|
179
|
+
* loops.
|
|
180
|
+
* @param callback
|
|
181
|
+
* Function callback to run when the tickDelay time criteria is
|
|
182
|
+
* met.
|
|
183
|
+
* @returns
|
|
184
|
+
* An opaque identifier that can be used with the `clearRun`
|
|
185
|
+
* function to cancel the execution of this run.
|
|
186
|
+
*/
|
|
187
|
+
run(callback: () => void): number;
|
|
189
188
|
}
|
|
190
189
|
/**
|
|
191
190
|
* A class that wraps the state of a world - a set of
|
|
192
191
|
* dimensions and the environment of Minecraft.
|
|
193
192
|
*/
|
|
194
193
|
export class World {
|
|
194
|
+
protected constructor();
|
|
195
195
|
getAllPlayers(): Player[];
|
|
196
196
|
/**
|
|
197
197
|
* @param dimensionId
|
|
@@ -201,7 +201,6 @@ export class World {
|
|
|
201
201
|
* Throws if the given dimension name is invalid
|
|
202
202
|
*/
|
|
203
203
|
getDimension(dimensionId: string): Dimension;
|
|
204
|
-
protected constructor();
|
|
205
204
|
}
|
|
206
205
|
/**
|
|
207
206
|
* A class that provides system-level events and functions.
|