@minecraft/server 2.0.0-beta.1.21.83-stable → 2.0.0-rc.1.21.100-preview.20
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 +366 -2755
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
***************************************************************************** */
|
|
9
9
|
/**
|
|
10
|
-
* @
|
|
10
|
+
* @preview
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
* Contains many types related to manipulating a Minecraft
|
|
13
13
|
* world, including entities, blocks, dimensions, and more.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "2.0.0
|
|
19
|
+
* "version": "2.0.0"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -24,25 +24,6 @@
|
|
|
24
24
|
import * as minecraftcommon from '@minecraft/common';
|
|
25
25
|
// @ts-ignore Optional types-only package, will decay to any if @minecraft/vanilla-data isn't installed
|
|
26
26
|
import type * as minecraftvanilladata from '@minecraft/vanilla-data';
|
|
27
|
-
/**
|
|
28
|
-
* @beta
|
|
29
|
-
* Specifies different targeting modes for use in aim-assist.
|
|
30
|
-
*/
|
|
31
|
-
export enum AimAssistTargetMode {
|
|
32
|
-
/**
|
|
33
|
-
* @remarks
|
|
34
|
-
* Angle based targeting.
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
Angle = 'Angle',
|
|
38
|
-
/**
|
|
39
|
-
* @remarks
|
|
40
|
-
* Distance based targeting.
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
Distance = 'Distance',
|
|
44
|
-
}
|
|
45
|
-
|
|
46
27
|
/**
|
|
47
28
|
* The types of block components that are accessible via
|
|
48
29
|
* function Block.getComponent.
|
|
@@ -141,240 +122,6 @@ export enum ButtonState {
|
|
|
141
122
|
Released = 'Released',
|
|
142
123
|
}
|
|
143
124
|
|
|
144
|
-
/**
|
|
145
|
-
* @beta
|
|
146
|
-
* The required permission level to execute the custom command.
|
|
147
|
-
*/
|
|
148
|
-
export enum CommandPermissionLevel {
|
|
149
|
-
/**
|
|
150
|
-
* @remarks
|
|
151
|
-
* Anything can run this level.
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
Any = 0,
|
|
155
|
-
/**
|
|
156
|
-
* @remarks
|
|
157
|
-
* Any operator can run this command, including command blocks.
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
GameDirectors = 1,
|
|
161
|
-
/**
|
|
162
|
-
* @remarks
|
|
163
|
-
* Any operator can run this command, but NOT command blocks.
|
|
164
|
-
*
|
|
165
|
-
*/
|
|
166
|
-
Admin = 2,
|
|
167
|
-
/**
|
|
168
|
-
* @remarks
|
|
169
|
-
* Any server host can run this command.
|
|
170
|
-
*
|
|
171
|
-
*/
|
|
172
|
-
Host = 3,
|
|
173
|
-
/**
|
|
174
|
-
* @remarks
|
|
175
|
-
* Only dedicated server can run this command.
|
|
176
|
-
*
|
|
177
|
-
*/
|
|
178
|
-
Owner = 4,
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @beta
|
|
183
|
-
* The Action enum determines how the CompoundBlockVolume
|
|
184
|
-
* considers the associated CompoundBlockVolumeItem when
|
|
185
|
-
* performing inside/outside calculations.
|
|
186
|
-
*/
|
|
187
|
-
export enum CompoundBlockVolumeAction {
|
|
188
|
-
/**
|
|
189
|
-
* @remarks
|
|
190
|
-
* The associated BlockVolume is considered a positive space,
|
|
191
|
-
* and any intersection tests are considered hits
|
|
192
|
-
*
|
|
193
|
-
*/
|
|
194
|
-
Add = 0,
|
|
195
|
-
/**
|
|
196
|
-
* @remarks
|
|
197
|
-
* The associated BlockVolume is considered a negative or void
|
|
198
|
-
* space, and any intersection tests are considered misses.
|
|
199
|
-
* Using the Subtract action, it is possible to `punch holes`
|
|
200
|
-
* in block volumes so that any intersection tests may pass
|
|
201
|
-
* through such spaces
|
|
202
|
-
*
|
|
203
|
-
*/
|
|
204
|
-
Subtract = 1,
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @beta
|
|
209
|
-
* An enum describing the relativity of the
|
|
210
|
-
* CompoundBlockVolumeItem, relative to the parent
|
|
211
|
-
* CompoundVolume.
|
|
212
|
-
*/
|
|
213
|
-
export enum CompoundBlockVolumePositionRelativity {
|
|
214
|
-
/**
|
|
215
|
-
* @remarks
|
|
216
|
-
* The locations within the associated BlockVolume are relative
|
|
217
|
-
* to the CompoundBlockVolume to which they were added
|
|
218
|
-
*
|
|
219
|
-
*/
|
|
220
|
-
Relative = 0,
|
|
221
|
-
/**
|
|
222
|
-
* @remarks
|
|
223
|
-
* The locations within the associated BlockVolume are in
|
|
224
|
-
* absolute world space
|
|
225
|
-
*
|
|
226
|
-
*/
|
|
227
|
-
Absolute = 1,
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* @beta
|
|
232
|
-
* Reason why custom command registration failed.
|
|
233
|
-
*/
|
|
234
|
-
export enum CustomCommandErrorReason {
|
|
235
|
-
/**
|
|
236
|
-
* @remarks
|
|
237
|
-
* Command name already registered.
|
|
238
|
-
*
|
|
239
|
-
*/
|
|
240
|
-
AlreadyRegistered = 'AlreadyRegistered',
|
|
241
|
-
/**
|
|
242
|
-
* @remarks
|
|
243
|
-
* Custom Command references an enum that has not been
|
|
244
|
-
* registered.
|
|
245
|
-
*
|
|
246
|
-
*/
|
|
247
|
-
EnumDependencyMissing = 'EnumDependencyMissing',
|
|
248
|
-
/**
|
|
249
|
-
* @remarks
|
|
250
|
-
* Supplied Custom Command namespace does not match previous
|
|
251
|
-
* registrations for this add-on.
|
|
252
|
-
*
|
|
253
|
-
*/
|
|
254
|
-
NamespaceMismatch = 'NamespaceMismatch',
|
|
255
|
-
/**
|
|
256
|
-
* @remarks
|
|
257
|
-
* Too many command parameters defined in CustomCommand.
|
|
258
|
-
*
|
|
259
|
-
*/
|
|
260
|
-
ParameterLimit = 'ParameterLimit',
|
|
261
|
-
/**
|
|
262
|
-
* @remarks
|
|
263
|
-
* Custom command registry can not be accessed after world
|
|
264
|
-
* initialized event.
|
|
265
|
-
*
|
|
266
|
-
*/
|
|
267
|
-
RegistryInvalid = 'RegistryInvalid',
|
|
268
|
-
/**
|
|
269
|
-
* @remarks
|
|
270
|
-
* Command parameters cannot be redefined during reload. Only
|
|
271
|
-
* the script closure itself can be changed.
|
|
272
|
-
*
|
|
273
|
-
*/
|
|
274
|
-
RegistryReadOnly = 'RegistryReadOnly',
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* @beta
|
|
279
|
-
* The types of paramaters accepted by a custom command.
|
|
280
|
-
*/
|
|
281
|
-
export enum CustomCommandParamType {
|
|
282
|
-
/**
|
|
283
|
-
* @remarks
|
|
284
|
-
* Command boolean parameter expecting true or false as input.
|
|
285
|
-
*
|
|
286
|
-
*/
|
|
287
|
-
Boolean = 0,
|
|
288
|
-
/**
|
|
289
|
-
* @remarks
|
|
290
|
-
* Command integer parameter.
|
|
291
|
-
*
|
|
292
|
-
*/
|
|
293
|
-
Integer = 1,
|
|
294
|
-
/**
|
|
295
|
-
* @remarks
|
|
296
|
-
* Command float parameter.
|
|
297
|
-
*
|
|
298
|
-
*/
|
|
299
|
-
Float = 2,
|
|
300
|
-
/**
|
|
301
|
-
* @remarks
|
|
302
|
-
* Command string parameter.
|
|
303
|
-
*
|
|
304
|
-
*/
|
|
305
|
-
String = 3,
|
|
306
|
-
/**
|
|
307
|
-
* @remarks
|
|
308
|
-
* Command entity selector parameter.
|
|
309
|
-
*
|
|
310
|
-
*/
|
|
311
|
-
EntitySelector = 4,
|
|
312
|
-
/**
|
|
313
|
-
* @remarks
|
|
314
|
-
* Command player selector parameter.
|
|
315
|
-
*
|
|
316
|
-
*/
|
|
317
|
-
PlayerSelector = 5,
|
|
318
|
-
/**
|
|
319
|
-
* @remarks
|
|
320
|
-
* Command location parameter.
|
|
321
|
-
*
|
|
322
|
-
*/
|
|
323
|
-
Location = 6,
|
|
324
|
-
/**
|
|
325
|
-
* @remarks
|
|
326
|
-
* Command block type parameter expecting a Minecraft block.
|
|
327
|
-
*
|
|
328
|
-
*/
|
|
329
|
-
BlockType = 7,
|
|
330
|
-
/**
|
|
331
|
-
* @remarks
|
|
332
|
-
* Command item name parameter.
|
|
333
|
-
*
|
|
334
|
-
*/
|
|
335
|
-
ItemType = 8,
|
|
336
|
-
/**
|
|
337
|
-
* @remarks
|
|
338
|
-
* Command enum parameter.
|
|
339
|
-
*
|
|
340
|
-
*/
|
|
341
|
-
Enum = 9,
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* @beta
|
|
346
|
-
* Who executed the command.
|
|
347
|
-
*/
|
|
348
|
-
export enum CustomCommandSource {
|
|
349
|
-
/**
|
|
350
|
-
* @remarks
|
|
351
|
-
* Command originated from a command block.
|
|
352
|
-
*
|
|
353
|
-
*/
|
|
354
|
-
Block = 'Block',
|
|
355
|
-
/**
|
|
356
|
-
* @remarks
|
|
357
|
-
* Command originated from an entity or player.
|
|
358
|
-
*
|
|
359
|
-
*/
|
|
360
|
-
Entity = 'Entity',
|
|
361
|
-
NPCDialogue = 'NPCDialogue',
|
|
362
|
-
/**
|
|
363
|
-
* @remarks
|
|
364
|
-
* Command originated from the server.
|
|
365
|
-
*
|
|
366
|
-
*/
|
|
367
|
-
Server = 'Server',
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* @beta
|
|
372
|
-
*/
|
|
373
|
-
export enum CustomCommandStatus {
|
|
374
|
-
Success = 0,
|
|
375
|
-
Failure = 1,
|
|
376
|
-
}
|
|
377
|
-
|
|
378
125
|
export enum CustomComponentNameErrorReason {
|
|
379
126
|
NoNamespace = 1,
|
|
380
127
|
DisallowedNamespace = 2,
|
|
@@ -983,14 +730,6 @@ export enum EntityComponentTypes {
|
|
|
983
730
|
*
|
|
984
731
|
*/
|
|
985
732
|
NavigationWalk = 'minecraft:navigation.walk',
|
|
986
|
-
/**
|
|
987
|
-
* @beta
|
|
988
|
-
* @remarks
|
|
989
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
990
|
-
* name, and dialogue interactions.
|
|
991
|
-
*
|
|
992
|
-
*/
|
|
993
|
-
Npc = 'minecraft:npc',
|
|
994
733
|
/**
|
|
995
734
|
* @remarks
|
|
996
735
|
* When present on an entity, this entity is on fire.
|
|
@@ -1362,14 +1101,6 @@ export enum EntityInitializationCause {
|
|
|
1362
1101
|
* and mainhand slots.
|
|
1363
1102
|
*/
|
|
1364
1103
|
export enum EquipmentSlot {
|
|
1365
|
-
/**
|
|
1366
|
-
* @beta
|
|
1367
|
-
* @remarks
|
|
1368
|
-
* The body slot. This slot is used to hold armor for
|
|
1369
|
-
* non-humanoid mobs.
|
|
1370
|
-
*
|
|
1371
|
-
*/
|
|
1372
|
-
Body = 'Body',
|
|
1373
1104
|
/**
|
|
1374
1105
|
* @remarks
|
|
1375
1106
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1450,13 +1181,15 @@ export enum FluidType {
|
|
|
1450
1181
|
*/
|
|
1451
1182
|
export enum GameMode {
|
|
1452
1183
|
/**
|
|
1184
|
+
* @rc
|
|
1453
1185
|
* @remarks
|
|
1454
1186
|
* World is in a more locked-down experience, where blocks may
|
|
1455
1187
|
* not be manipulated.
|
|
1456
1188
|
*
|
|
1457
1189
|
*/
|
|
1458
|
-
|
|
1190
|
+
Adventure = 'Adventure',
|
|
1459
1191
|
/**
|
|
1192
|
+
* @rc
|
|
1460
1193
|
* @remarks
|
|
1461
1194
|
* World is in a full creative mode. In creative mode, the
|
|
1462
1195
|
* player has all the resources available in the item selection
|
|
@@ -1467,8 +1200,9 @@ export enum GameMode {
|
|
|
1467
1200
|
* disappear.
|
|
1468
1201
|
*
|
|
1469
1202
|
*/
|
|
1470
|
-
|
|
1203
|
+
Creative = 'Creative',
|
|
1471
1204
|
/**
|
|
1205
|
+
* @rc
|
|
1472
1206
|
* @remarks
|
|
1473
1207
|
* World is in spectator mode. In spectator mode, spectators
|
|
1474
1208
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -1479,8 +1213,9 @@ export enum GameMode {
|
|
|
1479
1213
|
* transparent floating head.
|
|
1480
1214
|
*
|
|
1481
1215
|
*/
|
|
1482
|
-
|
|
1216
|
+
Spectator = 'Spectator',
|
|
1483
1217
|
/**
|
|
1218
|
+
* @rc
|
|
1484
1219
|
* @remarks
|
|
1485
1220
|
* World is in a survival mode, where players can take damage
|
|
1486
1221
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -1489,7 +1224,7 @@ export enum GameMode {
|
|
|
1489
1224
|
* time, chip away at player health and hunger bar.
|
|
1490
1225
|
*
|
|
1491
1226
|
*/
|
|
1492
|
-
|
|
1227
|
+
Survival = 'Survival',
|
|
1493
1228
|
}
|
|
1494
1229
|
|
|
1495
1230
|
/**
|
|
@@ -1612,10 +1347,6 @@ export enum GameRule {
|
|
|
1612
1347
|
*
|
|
1613
1348
|
*/
|
|
1614
1349
|
KeepInventory = 'keepInventory',
|
|
1615
|
-
/**
|
|
1616
|
-
* @beta
|
|
1617
|
-
*/
|
|
1618
|
-
LocatorBar = 'locatorBar',
|
|
1619
1350
|
/**
|
|
1620
1351
|
* @remarks
|
|
1621
1352
|
* The maximum number of chained commands that can execute per
|
|
@@ -1753,7 +1484,7 @@ export enum GameRule {
|
|
|
1753
1484
|
}
|
|
1754
1485
|
|
|
1755
1486
|
/**
|
|
1756
|
-
* @
|
|
1487
|
+
* @rc
|
|
1757
1488
|
* Describes the graphics mode of a client. Used by {@link
|
|
1758
1489
|
* Player.graphicsMode}
|
|
1759
1490
|
*/
|
|
@@ -1988,7 +1719,7 @@ export enum ItemComponentTypes {
|
|
|
1988
1719
|
*/
|
|
1989
1720
|
Durability = 'minecraft:durability',
|
|
1990
1721
|
/**
|
|
1991
|
-
* @
|
|
1722
|
+
* @rc
|
|
1992
1723
|
*/
|
|
1993
1724
|
Dyeable = 'minecraft:dyeable',
|
|
1994
1725
|
/**
|
|
@@ -2003,10 +1734,6 @@ export enum ItemComponentTypes {
|
|
|
2003
1734
|
*
|
|
2004
1735
|
*/
|
|
2005
1736
|
Food = 'minecraft:food',
|
|
2006
|
-
/**
|
|
2007
|
-
* @beta
|
|
2008
|
-
*/
|
|
2009
|
-
Potion = 'minecraft:potion',
|
|
2010
1737
|
}
|
|
2011
1738
|
|
|
2012
1739
|
/**
|
|
@@ -2146,6 +1873,16 @@ export enum MoonPhase {
|
|
|
2146
1873
|
WaxingGibbous = 7,
|
|
2147
1874
|
}
|
|
2148
1875
|
|
|
1876
|
+
/**
|
|
1877
|
+
* @rc
|
|
1878
|
+
*/
|
|
1879
|
+
export enum MovementType {
|
|
1880
|
+
Immovable = 'Immovable',
|
|
1881
|
+
Popped = 'Popped',
|
|
1882
|
+
Push = 'Push',
|
|
1883
|
+
PushPull = 'PushPull',
|
|
1884
|
+
}
|
|
1885
|
+
|
|
2149
1886
|
/**
|
|
2150
1887
|
* An enumeration describing the reason for the namespace name
|
|
2151
1888
|
* error being thrown
|
|
@@ -2390,6 +2127,14 @@ export enum SignSide {
|
|
|
2390
2127
|
Front = 'Front',
|
|
2391
2128
|
}
|
|
2392
2129
|
|
|
2130
|
+
/**
|
|
2131
|
+
* @rc
|
|
2132
|
+
*/
|
|
2133
|
+
export enum StickyType {
|
|
2134
|
+
None = 'None',
|
|
2135
|
+
Same = 'Same',
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2393
2138
|
/**
|
|
2394
2139
|
* Specifies how structure blocks should be animated when a
|
|
2395
2140
|
* structure is placed.
|
|
@@ -2551,39 +2296,54 @@ export enum TimeOfDay {
|
|
|
2551
2296
|
}
|
|
2552
2297
|
|
|
2553
2298
|
/**
|
|
2554
|
-
* @
|
|
2299
|
+
* @rc
|
|
2300
|
+
* Tint logic applied to a block or part of a block. The color
|
|
2301
|
+
* may vary when a world position is part of the context, as
|
|
2302
|
+
* biomes often have an influence on the resulting tint.
|
|
2555
2303
|
*/
|
|
2556
2304
|
export enum TintMethod {
|
|
2305
|
+
/**
|
|
2306
|
+
* @remarks
|
|
2307
|
+
* Specifies a birch foliage tint method.
|
|
2308
|
+
*
|
|
2309
|
+
*/
|
|
2557
2310
|
BirchFoliage = 'BirchFoliage',
|
|
2311
|
+
/**
|
|
2312
|
+
* @remarks
|
|
2313
|
+
* Specifies a default foliage tint method.
|
|
2314
|
+
*
|
|
2315
|
+
*/
|
|
2558
2316
|
DefaultFoliage = 'DefaultFoliage',
|
|
2317
|
+
/**
|
|
2318
|
+
* @remarks
|
|
2319
|
+
* Specifies a dry foliage tint method.
|
|
2320
|
+
*
|
|
2321
|
+
*/
|
|
2559
2322
|
DryFoliage = 'DryFoliage',
|
|
2323
|
+
/**
|
|
2324
|
+
* @remarks
|
|
2325
|
+
* Specifies an evergreen foliage tint method.
|
|
2326
|
+
*
|
|
2327
|
+
*/
|
|
2560
2328
|
EvergreenFoliage = 'EvergreenFoliage',
|
|
2329
|
+
/**
|
|
2330
|
+
* @remarks
|
|
2331
|
+
* Specifies a grass tint method.
|
|
2332
|
+
*
|
|
2333
|
+
*/
|
|
2561
2334
|
Grass = 'Grass',
|
|
2562
|
-
None = 'None',
|
|
2563
|
-
Water = 'Water',
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
/**
|
|
2567
|
-
* @beta
|
|
2568
|
-
* An enumeration with the reason that a watchdog is deciding
|
|
2569
|
-
* to terminate execution of a behavior packs' script.
|
|
2570
|
-
*/
|
|
2571
|
-
export enum WatchdogTerminateReason {
|
|
2572
2335
|
/**
|
|
2573
2336
|
* @remarks
|
|
2574
|
-
*
|
|
2575
|
-
* non-responsiveness from script (a hang or infinite loop).
|
|
2337
|
+
* Specifies no tint method, resulting in a white tint.
|
|
2576
2338
|
*
|
|
2577
2339
|
*/
|
|
2578
|
-
|
|
2340
|
+
None = 'None',
|
|
2579
2341
|
/**
|
|
2580
2342
|
* @remarks
|
|
2581
|
-
*
|
|
2582
|
-
* stack overflow (a long, and potentially infinite) chain of
|
|
2583
|
-
* function calls.
|
|
2343
|
+
* Specifies a water tint method.
|
|
2584
2344
|
*
|
|
2585
2345
|
*/
|
|
2586
|
-
|
|
2346
|
+
Water = 'Water',
|
|
2587
2347
|
}
|
|
2588
2348
|
|
|
2589
2349
|
/**
|
|
@@ -2616,17 +2376,17 @@ export type BlockComponentReturnType<T extends string> = T extends keyof BlockCo
|
|
|
2616
2376
|
: BlockCustomComponentInstance;
|
|
2617
2377
|
|
|
2618
2378
|
export type BlockComponentTypeMap = {
|
|
2619
|
-
destruction_particles: BlockDestructionParticlesComponent;
|
|
2620
2379
|
fluid_container: BlockFluidContainerComponent;
|
|
2621
2380
|
inventory: BlockInventoryComponent;
|
|
2622
2381
|
map_color: BlockMapColorComponent;
|
|
2623
|
-
'minecraft:destruction_particles': BlockDestructionParticlesComponent;
|
|
2624
2382
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
2625
2383
|
'minecraft:inventory': BlockInventoryComponent;
|
|
2626
2384
|
'minecraft:map_color': BlockMapColorComponent;
|
|
2385
|
+
'minecraft:movable': BlockMovableComponent;
|
|
2627
2386
|
'minecraft:piston': BlockPistonComponent;
|
|
2628
2387
|
'minecraft:record_player': BlockRecordPlayerComponent;
|
|
2629
2388
|
'minecraft:sign': BlockSignComponent;
|
|
2389
|
+
movable: BlockMovableComponent;
|
|
2630
2390
|
piston: BlockPistonComponent;
|
|
2631
2391
|
record_player: BlockRecordPlayerComponent;
|
|
2632
2392
|
sign: BlockSignComponent;
|
|
@@ -2733,7 +2493,6 @@ export type EntityComponentTypeMap = {
|
|
|
2733
2493
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
2734
2494
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
2735
2495
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
2736
|
-
'minecraft:npc': EntityNpcComponent;
|
|
2737
2496
|
'minecraft:onfire': EntityOnFireComponent;
|
|
2738
2497
|
'minecraft:projectile': EntityProjectileComponent;
|
|
2739
2498
|
'minecraft:push_through': EntityPushThroughComponent;
|
|
@@ -2764,7 +2523,6 @@ export type EntityComponentTypeMap = {
|
|
|
2764
2523
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
2765
2524
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
2766
2525
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
2767
|
-
npc: EntityNpcComponent;
|
|
2768
2526
|
onfire: EntityOnFireComponent;
|
|
2769
2527
|
projectile: EntityProjectileComponent;
|
|
2770
2528
|
push_through: EntityPushThroughComponent;
|
|
@@ -2781,15 +2539,6 @@ export type EntityComponentTypeMap = {
|
|
|
2781
2539
|
wants_jockey: EntityWantsJockeyComponent;
|
|
2782
2540
|
};
|
|
2783
2541
|
|
|
2784
|
-
/**
|
|
2785
|
-
* @beta
|
|
2786
|
-
*/
|
|
2787
|
-
export type EntityIdentifierType<T> = [T] extends [never]
|
|
2788
|
-
? VanillaEntityIdentifier
|
|
2789
|
-
: T extends string
|
|
2790
|
-
? VanillaEntityIdentifier | T
|
|
2791
|
-
: never;
|
|
2792
|
-
|
|
2793
2542
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
2794
2543
|
? ItemComponentTypeMap[T]
|
|
2795
2544
|
: ItemCustomComponentInstance;
|
|
@@ -2807,545 +2556,71 @@ export type ItemComponentTypeMap = {
|
|
|
2807
2556
|
'minecraft:dyeable': ItemDyeableComponent;
|
|
2808
2557
|
'minecraft:enchantable': ItemEnchantableComponent;
|
|
2809
2558
|
'minecraft:food': ItemFoodComponent;
|
|
2810
|
-
'minecraft:potion': ItemPotionComponent;
|
|
2811
|
-
potion: ItemPotionComponent;
|
|
2812
2559
|
};
|
|
2813
2560
|
|
|
2814
2561
|
/**
|
|
2815
|
-
*
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
2820
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
2821
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
2822
|
-
|
|
2823
|
-
/**
|
|
2824
|
-
* @beta
|
|
2825
|
-
* Handle to an aim-assist category that exists in the
|
|
2826
|
-
* world.aimAssist registry.
|
|
2562
|
+
* Represents a block in a dimension. A block represents a
|
|
2563
|
+
* unique X, Y, and Z within a dimension and get/sets the state
|
|
2564
|
+
* of the block at that location. This type was significantly
|
|
2565
|
+
* updated in version 1.17.10.21.
|
|
2827
2566
|
*/
|
|
2828
|
-
export class
|
|
2567
|
+
export class Block {
|
|
2829
2568
|
private constructor();
|
|
2830
2569
|
/**
|
|
2831
2570
|
* @remarks
|
|
2832
|
-
*
|
|
2833
|
-
* getBlockPriorities.
|
|
2571
|
+
* Returns the dimension that the block is within.
|
|
2834
2572
|
*
|
|
2835
|
-
* @throws This property can throw when used.
|
|
2836
2573
|
*/
|
|
2837
|
-
readonly
|
|
2574
|
+
readonly dimension: Dimension;
|
|
2838
2575
|
/**
|
|
2839
2576
|
* @remarks
|
|
2840
|
-
*
|
|
2841
|
-
*
|
|
2577
|
+
* Returns true if this block is an air block (i.e., empty
|
|
2578
|
+
* space).
|
|
2842
2579
|
*
|
|
2843
2580
|
* @throws This property can throw when used.
|
|
2581
|
+
*
|
|
2582
|
+
* {@link LocationInUnloadedChunkError}
|
|
2583
|
+
*
|
|
2584
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
2844
2585
|
*/
|
|
2845
|
-
readonly
|
|
2586
|
+
readonly isAir: boolean;
|
|
2846
2587
|
/**
|
|
2847
2588
|
* @remarks
|
|
2848
|
-
*
|
|
2589
|
+
* Returns true if this block is a liquid block - (e.g., a
|
|
2590
|
+
* water block and a lava block are liquid, while an air block
|
|
2591
|
+
* and a stone block are not. Water logged blocks are not
|
|
2592
|
+
* liquid blocks).
|
|
2593
|
+
*
|
|
2594
|
+
* @throws This property can throw when used.
|
|
2849
2595
|
*
|
|
2596
|
+
* {@link LocationInUnloadedChunkError}
|
|
2597
|
+
*
|
|
2598
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
2850
2599
|
*/
|
|
2851
|
-
readonly
|
|
2600
|
+
readonly isLiquid: boolean;
|
|
2852
2601
|
/**
|
|
2602
|
+
* @rc
|
|
2853
2603
|
* @remarks
|
|
2854
|
-
*
|
|
2604
|
+
* Returns true if this reference to a block is still valid
|
|
2605
|
+
* (for example, if the block is unloaded, references to that
|
|
2606
|
+
* block will no longer be valid.)
|
|
2855
2607
|
*
|
|
2856
|
-
* @returns
|
|
2857
|
-
* The record mapping block Ids to their priority settings.
|
|
2858
|
-
* Larger numbers have greater priority.
|
|
2859
|
-
* @throws This function can throw errors.
|
|
2860
2608
|
*/
|
|
2861
|
-
|
|
2609
|
+
readonly isValid: boolean;
|
|
2862
2610
|
/**
|
|
2863
2611
|
* @remarks
|
|
2864
|
-
*
|
|
2612
|
+
* Returns or sets whether this block has water on it.
|
|
2865
2613
|
*
|
|
2866
|
-
* @
|
|
2867
|
-
*
|
|
2868
|
-
*
|
|
2869
|
-
*
|
|
2614
|
+
* @throws This property can throw when used.
|
|
2615
|
+
*
|
|
2616
|
+
* {@link LocationInUnloadedChunkError}
|
|
2617
|
+
*
|
|
2618
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
2870
2619
|
*/
|
|
2871
|
-
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2874
|
-
/**
|
|
2875
|
-
* @beta
|
|
2876
|
-
* Settings used with AimAssistRegistry.addCategory for
|
|
2877
|
-
* creation of the AimAssistCategory.
|
|
2878
|
-
*/
|
|
2879
|
-
export class AimAssistCategorySettings {
|
|
2620
|
+
readonly isWaterlogged: boolean;
|
|
2880
2621
|
/**
|
|
2881
2622
|
* @remarks
|
|
2882
|
-
*
|
|
2883
|
-
* not provided to setBlockPriorities.
|
|
2884
|
-
*
|
|
2885
|
-
* This property can't be edited in read-only mode.
|
|
2886
|
-
*
|
|
2887
|
-
*/
|
|
2888
|
-
defaultBlockPriority: number;
|
|
2889
|
-
/**
|
|
2890
|
-
* @remarks
|
|
2891
|
-
* Optional. Default targeting priority used for entity types
|
|
2892
|
-
* not provided to setEntityPriorities.
|
|
2893
|
-
*
|
|
2894
|
-
* This property can't be edited in read-only mode.
|
|
2895
|
-
*
|
|
2896
|
-
*/
|
|
2897
|
-
defaultEntityPriority: number;
|
|
2898
|
-
/**
|
|
2899
|
-
* @remarks
|
|
2900
|
-
* The unique Id used to register the category with. Must have
|
|
2901
|
-
* a namespace.
|
|
2902
|
-
*
|
|
2903
|
-
*/
|
|
2904
|
-
readonly identifier: string;
|
|
2905
|
-
/**
|
|
2906
|
-
* @remarks
|
|
2907
|
-
* Constructor that takes a unique Id to associate with the
|
|
2908
|
-
* created AimAssistCategory. Must have a namespace.
|
|
2909
|
-
*
|
|
2910
|
-
*/
|
|
2911
|
-
constructor(identifier: string);
|
|
2912
|
-
/**
|
|
2913
|
-
* @remarks
|
|
2914
|
-
* Gets the priority settings used for block targeting.
|
|
2915
|
-
*
|
|
2916
|
-
* @returns
|
|
2917
|
-
* The record mapping block Ids to their priority settings.
|
|
2918
|
-
* Larger numbers have greater priority.
|
|
2919
|
-
*/
|
|
2920
|
-
getBlockPriorities(): Record<string, number>;
|
|
2921
|
-
/**
|
|
2922
|
-
* @remarks
|
|
2923
|
-
* Gets the priority settings used for entity targeting.
|
|
2924
|
-
*
|
|
2925
|
-
* @returns
|
|
2926
|
-
* The record mapping entity Ids to their priority settings.
|
|
2927
|
-
* Larger numbers have greater priority.
|
|
2928
|
-
*/
|
|
2929
|
-
getEntityPriorities(): Record<string, number>;
|
|
2930
|
-
/**
|
|
2931
|
-
* @remarks
|
|
2932
|
-
* Sets the priority settings used for block targeting.
|
|
2933
|
-
*
|
|
2934
|
-
* This function can't be called in read-only mode.
|
|
2935
|
-
*
|
|
2936
|
-
* @param blockPriorities
|
|
2937
|
-
* A record mapping block Ids to their priority settings.
|
|
2938
|
-
* Larger numbers have greater priority.
|
|
2939
|
-
*/
|
|
2940
|
-
setBlockPriorities(
|
|
2941
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
2942
|
-
): void;
|
|
2943
|
-
/**
|
|
2944
|
-
* @remarks
|
|
2945
|
-
* Sets the priority settings used for entity targeting.
|
|
2946
|
-
*
|
|
2947
|
-
* This function can't be called in read-only mode.
|
|
2948
|
-
*
|
|
2949
|
-
* @param entityPriorities
|
|
2950
|
-
* A record mapping entity Ids to their priority settings.
|
|
2951
|
-
* Larger numbers have greater priority.
|
|
2952
|
-
*/
|
|
2953
|
-
setEntityPriorities(
|
|
2954
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
2955
|
-
): void;
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
/**
|
|
2959
|
-
* @beta
|
|
2960
|
-
* Handle to an aim-assist preset that exists in the
|
|
2961
|
-
* world.aimAssist registry.
|
|
2962
|
-
*/
|
|
2963
|
-
export class AimAssistPreset {
|
|
2964
|
-
private constructor();
|
|
2965
|
-
/**
|
|
2966
|
-
* @remarks
|
|
2967
|
-
* Optional. Default aim-assist category Id used for items not
|
|
2968
|
-
* provided to setItemSettings.
|
|
2969
|
-
*
|
|
2970
|
-
* @throws This property can throw when used.
|
|
2971
|
-
*/
|
|
2972
|
-
readonly defaultItemSettings?: string;
|
|
2973
|
-
/**
|
|
2974
|
-
* @remarks
|
|
2975
|
-
* Optional. Aim-assist category Id used for an empty hand.
|
|
2976
|
-
*
|
|
2977
|
-
* @throws This property can throw when used.
|
|
2978
|
-
*/
|
|
2979
|
-
readonly handSettings?: string;
|
|
2980
|
-
/**
|
|
2981
|
-
* @remarks
|
|
2982
|
-
* The unique Id associated with the preset.
|
|
2983
|
-
*
|
|
2984
|
-
*/
|
|
2985
|
-
readonly identifier: string;
|
|
2986
|
-
/**
|
|
2987
|
-
* @remarks
|
|
2988
|
-
* Gets the list of block/entity Ids to exclude from aim assist
|
|
2989
|
-
* targeting.
|
|
2990
|
-
*
|
|
2991
|
-
* @returns
|
|
2992
|
-
* The array of block/entity Ids.
|
|
2993
|
-
* @throws This function can throw errors.
|
|
2994
|
-
*/
|
|
2995
|
-
getExcludedTargets(): string[];
|
|
2996
|
-
/**
|
|
2997
|
-
* @remarks
|
|
2998
|
-
* Gets the per-item aim-assist category Ids.
|
|
2999
|
-
*
|
|
3000
|
-
* @returns
|
|
3001
|
-
* The record mapping item Ids to aim-assist category Ids.
|
|
3002
|
-
* @throws This function can throw errors.
|
|
3003
|
-
*/
|
|
3004
|
-
getItemSettings(): Record<string, string>;
|
|
3005
|
-
/**
|
|
3006
|
-
* @remarks
|
|
3007
|
-
* Gets the list of item Ids that will target liquid blocks
|
|
3008
|
-
* with aim-assist when being held.
|
|
3009
|
-
*
|
|
3010
|
-
* @returns
|
|
3011
|
-
* The array of item Ids.
|
|
3012
|
-
* @throws This function can throw errors.
|
|
3013
|
-
*/
|
|
3014
|
-
getLiquidTargetingItems(): string[];
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
|
-
/**
|
|
3018
|
-
* @beta
|
|
3019
|
-
* Settings used with AimAssistRegistry.addPreset for creation
|
|
3020
|
-
* of the AimAssistPreset.
|
|
3021
|
-
*/
|
|
3022
|
-
export class AimAssistPresetSettings {
|
|
3023
|
-
/**
|
|
3024
|
-
* @remarks
|
|
3025
|
-
* Optional. Default aim-assist category Id used for items not
|
|
3026
|
-
* provided to setItemSettings.
|
|
3027
|
-
*
|
|
3028
|
-
* This property can't be edited in read-only mode.
|
|
3029
|
-
*
|
|
3030
|
-
*/
|
|
3031
|
-
defaultItemSettings?: string;
|
|
3032
|
-
/**
|
|
3033
|
-
* @remarks
|
|
3034
|
-
* Optional. Aim-assist category Id used for an empty hand.
|
|
3035
|
-
*
|
|
3036
|
-
* This property can't be edited in read-only mode.
|
|
3037
|
-
*
|
|
3038
|
-
*/
|
|
3039
|
-
handSettings?: string;
|
|
3040
|
-
/**
|
|
3041
|
-
* @remarks
|
|
3042
|
-
* The unique Id used to register the preset with. Must have a
|
|
3043
|
-
* namespace.
|
|
3044
|
-
*
|
|
3045
|
-
*/
|
|
3046
|
-
readonly identifier: string;
|
|
3047
|
-
/**
|
|
3048
|
-
* @remarks
|
|
3049
|
-
* Constructor that takes a unique Id to associate with the
|
|
3050
|
-
* created AimAssistPreset. Must have a namespace.
|
|
3051
|
-
*
|
|
3052
|
-
*/
|
|
3053
|
-
constructor(identifier: string);
|
|
3054
|
-
/**
|
|
3055
|
-
* @remarks
|
|
3056
|
-
* Gets the list of block/entity Ids to exclude from aim assist
|
|
3057
|
-
* targeting.
|
|
3058
|
-
*
|
|
3059
|
-
* @returns
|
|
3060
|
-
* The array of block/entity Ids.
|
|
3061
|
-
*/
|
|
3062
|
-
getExcludedTargets(): string[] | undefined;
|
|
3063
|
-
/**
|
|
3064
|
-
* @remarks
|
|
3065
|
-
* Gets the per-item aim-assist category Ids.
|
|
3066
|
-
*
|
|
3067
|
-
* @returns
|
|
3068
|
-
* The record mapping item Ids to aim-assist category Ids.
|
|
3069
|
-
*/
|
|
3070
|
-
getItemSettings(): Record<string, string>;
|
|
3071
|
-
/**
|
|
3072
|
-
* @remarks
|
|
3073
|
-
* Gets the list of item Ids that will target liquid blocks
|
|
3074
|
-
* with aim-assist when being held.
|
|
3075
|
-
*
|
|
3076
|
-
* @returns
|
|
3077
|
-
* The array of item Ids.
|
|
3078
|
-
*/
|
|
3079
|
-
getLiquidTargetingItems(): string[] | undefined;
|
|
3080
|
-
/**
|
|
3081
|
-
* @remarks
|
|
3082
|
-
* Sets the list of block/entity Ids to exclude from aim assist
|
|
3083
|
-
* targeting.
|
|
3084
|
-
*
|
|
3085
|
-
* This function can't be called in read-only mode.
|
|
3086
|
-
*
|
|
3087
|
-
* @param targets
|
|
3088
|
-
* An array of block/entity Ids.
|
|
3089
|
-
*/
|
|
3090
|
-
setExcludedTargets(
|
|
3091
|
-
targets?: (
|
|
3092
|
-
| keyof typeof minecraftvanilladata.MinecraftBlockTypes
|
|
3093
|
-
| keyof typeof minecraftvanilladata.MinecraftEntityTypes
|
|
3094
|
-
| string
|
|
3095
|
-
)[],
|
|
3096
|
-
): void;
|
|
3097
|
-
/**
|
|
3098
|
-
* @remarks
|
|
3099
|
-
* Sets the per-item aim-assist category Ids.
|
|
3100
|
-
*
|
|
3101
|
-
* This function can't be called in read-only mode.
|
|
3102
|
-
*
|
|
3103
|
-
* @param itemSettings
|
|
3104
|
-
* A record mapping item Ids to aim-assist category Ids.
|
|
3105
|
-
* Category Ids must have a namespace.
|
|
3106
|
-
*/
|
|
3107
|
-
setItemSettings(itemSettings: Record<keyof typeof minecraftvanilladata.MinecraftItemTypes | string, string>): void;
|
|
3108
|
-
/**
|
|
3109
|
-
* @remarks
|
|
3110
|
-
* Sets the list of item Ids that will target liquid blocks
|
|
3111
|
-
* with aim-assist when being held.
|
|
3112
|
-
*
|
|
3113
|
-
* This function can't be called in read-only mode.
|
|
3114
|
-
*
|
|
3115
|
-
* @param items
|
|
3116
|
-
* An array of item Ids.
|
|
3117
|
-
*/
|
|
3118
|
-
setLiquidTargetingItems(items?: (keyof typeof minecraftvanilladata.MinecraftItemTypes | string)[]): void;
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3121
|
-
/**
|
|
3122
|
-
* @beta
|
|
3123
|
-
* A container for APIs related to the world's aim-assist
|
|
3124
|
-
* settings.
|
|
3125
|
-
*/
|
|
3126
|
-
export class AimAssistRegistry {
|
|
3127
|
-
private constructor();
|
|
3128
|
-
/**
|
|
3129
|
-
* @remarks
|
|
3130
|
-
* The default aim-assist preset Id that is used when not
|
|
3131
|
-
* otherwise specified.
|
|
3132
|
-
*
|
|
3133
|
-
*/
|
|
3134
|
-
static readonly DefaultPresetId = 'minecraft:aim_assist_default';
|
|
3135
|
-
/**
|
|
3136
|
-
* @remarks
|
|
3137
|
-
* Adds an aim-assist category to the registry.
|
|
3138
|
-
*
|
|
3139
|
-
* This function can't be called in read-only mode.
|
|
3140
|
-
*
|
|
3141
|
-
* @param category
|
|
3142
|
-
* The category settings used to create the new category.
|
|
3143
|
-
* @returns
|
|
3144
|
-
* The created category handle.
|
|
3145
|
-
* @throws This function can throw errors.
|
|
3146
|
-
*
|
|
3147
|
-
* {@link minecraftcommon.EngineError}
|
|
3148
|
-
*
|
|
3149
|
-
* {@link Error}
|
|
3150
|
-
*
|
|
3151
|
-
* {@link minecraftcommon.InvalidArgumentError}
|
|
3152
|
-
*
|
|
3153
|
-
* {@link NamespaceNameError}
|
|
3154
|
-
*/
|
|
3155
|
-
addCategory(category: AimAssistCategorySettings): AimAssistCategory;
|
|
3156
|
-
/**
|
|
3157
|
-
* @remarks
|
|
3158
|
-
* Adds an aim-assist preset to the registry.
|
|
3159
|
-
*
|
|
3160
|
-
* This function can't be called in read-only mode.
|
|
3161
|
-
*
|
|
3162
|
-
* @param preset
|
|
3163
|
-
* The preset settings used to create the new preset.
|
|
3164
|
-
* @returns
|
|
3165
|
-
* The created preset handle.
|
|
3166
|
-
* @throws This function can throw errors.
|
|
3167
|
-
*
|
|
3168
|
-
* {@link minecraftcommon.EngineError}
|
|
3169
|
-
*
|
|
3170
|
-
* {@link Error}
|
|
3171
|
-
*
|
|
3172
|
-
* {@link minecraftcommon.InvalidArgumentError}
|
|
3173
|
-
*
|
|
3174
|
-
* {@link NamespaceNameError}
|
|
3175
|
-
*/
|
|
3176
|
-
addPreset(preset: AimAssistPresetSettings): AimAssistPreset;
|
|
3177
|
-
/**
|
|
3178
|
-
* @remarks
|
|
3179
|
-
* Gets all available categories in the registry.
|
|
3180
|
-
*
|
|
3181
|
-
* @returns
|
|
3182
|
-
* An array of all available category objects.
|
|
3183
|
-
*/
|
|
3184
|
-
getCategories(): AimAssistCategory[];
|
|
3185
|
-
/**
|
|
3186
|
-
* @remarks
|
|
3187
|
-
* Gets the category associated with the provided Id.
|
|
3188
|
-
*
|
|
3189
|
-
* This function can't be called in read-only mode.
|
|
3190
|
-
*
|
|
3191
|
-
* @returns
|
|
3192
|
-
* The category object if it exists, otherwise returns
|
|
3193
|
-
* undefined.
|
|
3194
|
-
*/
|
|
3195
|
-
getCategory(categoryId: string): AimAssistCategory | undefined;
|
|
3196
|
-
/**
|
|
3197
|
-
* @remarks
|
|
3198
|
-
* Gets the preset associated with the provided Id.
|
|
3199
|
-
*
|
|
3200
|
-
* This function can't be called in read-only mode.
|
|
3201
|
-
*
|
|
3202
|
-
* @param presetId
|
|
3203
|
-
* The Id of the preset to retrieve. Must have a namespace.
|
|
3204
|
-
* @returns
|
|
3205
|
-
* The preset object if it exists, otherwise returns undefined.
|
|
3206
|
-
*/
|
|
3207
|
-
getPreset(presetId: string): AimAssistPreset | undefined;
|
|
3208
|
-
/**
|
|
3209
|
-
* @remarks
|
|
3210
|
-
* Gets all available presets in the registry.
|
|
3211
|
-
*
|
|
3212
|
-
* @returns
|
|
3213
|
-
* An array of all available preset objects.
|
|
3214
|
-
*/
|
|
3215
|
-
getPresets(): AimAssistPreset[];
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
/**
|
|
3219
|
-
* @beta
|
|
3220
|
-
* Describes a type of biome.
|
|
3221
|
-
*/
|
|
3222
|
-
export class BiomeType {
|
|
3223
|
-
private constructor();
|
|
3224
|
-
/**
|
|
3225
|
-
* @remarks
|
|
3226
|
-
* Identifier of the biome type.
|
|
3227
|
-
*
|
|
3228
|
-
*/
|
|
3229
|
-
readonly id: string;
|
|
3230
|
-
}
|
|
3231
|
-
|
|
3232
|
-
/**
|
|
3233
|
-
* @beta
|
|
3234
|
-
* Supports a catalog of available biome types registered
|
|
3235
|
-
* within Minecraft.
|
|
3236
|
-
*/
|
|
3237
|
-
export class BiomeTypes {
|
|
3238
|
-
private constructor();
|
|
3239
|
-
/**
|
|
3240
|
-
* @remarks
|
|
3241
|
-
* Returns a specific biome type.
|
|
3242
|
-
*
|
|
3243
|
-
* @param typeName
|
|
3244
|
-
* Identifier of the biome. Generally, namespaced identifiers
|
|
3245
|
-
* (e.g., minecraft:frozen_peaks) should be used.
|
|
3246
|
-
* @returns
|
|
3247
|
-
* If the biome exists, a BiomeType object is returned. If not,
|
|
3248
|
-
* undefined is returned.
|
|
3249
|
-
*/
|
|
3250
|
-
static get(typeName: string): BiomeType | undefined;
|
|
3251
|
-
/**
|
|
3252
|
-
* @remarks
|
|
3253
|
-
* Returns all registered biome types within Minecraft
|
|
3254
|
-
*
|
|
3255
|
-
*/
|
|
3256
|
-
static getAll(): BiomeType[];
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
|
-
/**
|
|
3260
|
-
* Represents a block in a dimension. A block represents a
|
|
3261
|
-
* unique X, Y, and Z within a dimension and get/sets the state
|
|
3262
|
-
* of the block at that location. This type was significantly
|
|
3263
|
-
* updated in version 1.17.10.21.
|
|
3264
|
-
*/
|
|
3265
|
-
export class Block {
|
|
3266
|
-
private constructor();
|
|
3267
|
-
/**
|
|
3268
|
-
* @remarks
|
|
3269
|
-
* Returns the dimension that the block is within.
|
|
3270
|
-
*
|
|
3271
|
-
*/
|
|
3272
|
-
readonly dimension: Dimension;
|
|
3273
|
-
/**
|
|
3274
|
-
* @remarks
|
|
3275
|
-
* Returns true if this block is an air block (i.e., empty
|
|
3276
|
-
* space).
|
|
3277
|
-
*
|
|
3278
|
-
* @throws This property can throw when used.
|
|
3279
|
-
*
|
|
3280
|
-
* {@link LocationInUnloadedChunkError}
|
|
3281
|
-
*
|
|
3282
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3283
|
-
*/
|
|
3284
|
-
readonly isAir: boolean;
|
|
3285
|
-
/**
|
|
3286
|
-
* @remarks
|
|
3287
|
-
* Returns true if this block is a liquid block - (e.g., a
|
|
3288
|
-
* water block and a lava block are liquid, while an air block
|
|
3289
|
-
* and a stone block are not. Water logged blocks are not
|
|
3290
|
-
* liquid blocks).
|
|
3291
|
-
*
|
|
3292
|
-
* @throws This property can throw when used.
|
|
3293
|
-
*
|
|
3294
|
-
* {@link LocationInUnloadedChunkError}
|
|
3295
|
-
*
|
|
3296
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3297
|
-
*/
|
|
3298
|
-
readonly isLiquid: boolean;
|
|
3299
|
-
/**
|
|
3300
|
-
* @beta
|
|
3301
|
-
* @remarks
|
|
3302
|
-
* Returns true if this block is solid and impassible - (e.g.,
|
|
3303
|
-
* a cobblestone block and a diamond block are solid, while a
|
|
3304
|
-
* ladder block and a fence block are not).
|
|
3305
|
-
*
|
|
3306
|
-
* @throws This property can throw when used.
|
|
3307
|
-
*
|
|
3308
|
-
* {@link LocationInUnloadedChunkError}
|
|
3309
|
-
*
|
|
3310
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3311
|
-
*/
|
|
3312
|
-
readonly isSolid: boolean;
|
|
3313
|
-
/**
|
|
3314
|
-
* @beta
|
|
3315
|
-
* @remarks
|
|
3316
|
-
* Returns true if this reference to a block is still valid
|
|
3317
|
-
* (for example, if the block is unloaded, references to that
|
|
3318
|
-
* block will no longer be valid.)
|
|
3319
|
-
*
|
|
3320
|
-
*/
|
|
3321
|
-
readonly isValid: boolean;
|
|
3322
|
-
/**
|
|
3323
|
-
* @remarks
|
|
3324
|
-
* Returns or sets whether this block has water on it.
|
|
3325
|
-
*
|
|
3326
|
-
* @throws This property can throw when used.
|
|
3327
|
-
*
|
|
3328
|
-
* {@link LocationInUnloadedChunkError}
|
|
3329
|
-
*
|
|
3330
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3331
|
-
*/
|
|
3332
|
-
readonly isWaterlogged: boolean;
|
|
3333
|
-
/**
|
|
3334
|
-
* @beta
|
|
3335
|
-
* @remarks
|
|
3336
|
-
* key for the localization of this block's name used in .lang
|
|
3337
|
-
* files.
|
|
3338
|
-
*
|
|
3339
|
-
* @throws This property can throw when used.
|
|
3340
|
-
*
|
|
3341
|
-
* {@link LocationInUnloadedChunkError}
|
|
3342
|
-
*
|
|
3343
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3344
|
-
*/
|
|
3345
|
-
readonly localizationKey: string;
|
|
3346
|
-
/**
|
|
3347
|
-
* @remarks
|
|
3348
|
-
* Coordinates of the specified block.
|
|
2623
|
+
* Coordinates of the specified block.
|
|
3349
2624
|
*
|
|
3350
2625
|
* @throws This property can throw when used.
|
|
3351
2626
|
*/
|
|
@@ -3458,40 +2733,16 @@ export class Block {
|
|
|
3458
2733
|
*
|
|
3459
2734
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3460
2735
|
*/
|
|
3461
|
-
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
3462
|
-
/**
|
|
3463
|
-
* @remarks
|
|
3464
|
-
* Returns whether this block can have a liquid placed over it,
|
|
3465
|
-
* i.e. be waterlogged.
|
|
3466
|
-
*
|
|
3467
|
-
* @param liquidType
|
|
3468
|
-
* The type of liquid this function should be called for.
|
|
3469
|
-
* @returns
|
|
3470
|
-
* Whether this block can have a liquid placed over it.
|
|
3471
|
-
* @throws This function can throw errors.
|
|
3472
|
-
*
|
|
3473
|
-
* {@link Error}
|
|
3474
|
-
*
|
|
3475
|
-
* {@link LocationInUnloadedChunkError}
|
|
3476
|
-
*
|
|
3477
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3478
|
-
*/
|
|
3479
|
-
canContainLiquid(liquidType: LiquidType): boolean;
|
|
2736
|
+
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
3480
2737
|
/**
|
|
3481
|
-
* @beta
|
|
3482
2738
|
* @remarks
|
|
3483
|
-
*
|
|
3484
|
-
*
|
|
3485
|
-
* block.
|
|
2739
|
+
* Returns whether this block can have a liquid placed over it,
|
|
2740
|
+
* i.e. be waterlogged.
|
|
3486
2741
|
*
|
|
3487
|
-
* @param
|
|
3488
|
-
*
|
|
3489
|
-
* @param faceToPlaceOn
|
|
3490
|
-
* Optional specific face of this block to check placement
|
|
3491
|
-
* against.
|
|
2742
|
+
* @param liquidType
|
|
2743
|
+
* The type of liquid this function should be called for.
|
|
3492
2744
|
* @returns
|
|
3493
|
-
*
|
|
3494
|
-
* placed on this block, else `false`.
|
|
2745
|
+
* Whether this block can have a liquid placed over it.
|
|
3495
2746
|
* @throws This function can throw errors.
|
|
3496
2747
|
*
|
|
3497
2748
|
* {@link Error}
|
|
@@ -3500,7 +2751,7 @@ export class Block {
|
|
|
3500
2751
|
*
|
|
3501
2752
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3502
2753
|
*/
|
|
3503
|
-
|
|
2754
|
+
canContainLiquid(liquidType: LiquidType): boolean;
|
|
3504
2755
|
/**
|
|
3505
2756
|
* @remarks
|
|
3506
2757
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -3568,15 +2819,6 @@ export class Block {
|
|
|
3568
2819
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3569
2820
|
*/
|
|
3570
2821
|
getItemStack(amount?: number, withData?: boolean): ItemStack | undefined;
|
|
3571
|
-
/**
|
|
3572
|
-
* @beta
|
|
3573
|
-
* @throws This function can throw errors.
|
|
3574
|
-
*
|
|
3575
|
-
* {@link LocationInUnloadedChunkError}
|
|
3576
|
-
*
|
|
3577
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3578
|
-
*/
|
|
3579
|
-
getMapColor(): RGBA;
|
|
3580
2822
|
/**
|
|
3581
2823
|
* @remarks
|
|
3582
2824
|
* Returns the net redstone power of this block.
|
|
@@ -3812,27 +3054,6 @@ export class Block {
|
|
|
3812
3054
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3813
3055
|
*/
|
|
3814
3056
|
south(steps?: number): Block | undefined;
|
|
3815
|
-
/**
|
|
3816
|
-
* @beta
|
|
3817
|
-
* @remarks
|
|
3818
|
-
* Tries to set the block in the dimension to the state of the
|
|
3819
|
-
* permutation by first checking if the placement is valid.
|
|
3820
|
-
*
|
|
3821
|
-
* This function can't be called in read-only mode.
|
|
3822
|
-
*
|
|
3823
|
-
* @param permutation
|
|
3824
|
-
* Permutation that contains a set of property states for the
|
|
3825
|
-
* Block.
|
|
3826
|
-
* @returns
|
|
3827
|
-
* Returns `true` if the block permutation data was
|
|
3828
|
-
* successfully set, else `false`.
|
|
3829
|
-
* @throws This function can throw errors.
|
|
3830
|
-
*
|
|
3831
|
-
* {@link LocationInUnloadedChunkError}
|
|
3832
|
-
*
|
|
3833
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3834
|
-
*/
|
|
3835
|
-
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
3836
3057
|
/**
|
|
3837
3058
|
* @remarks
|
|
3838
3059
|
* Returns the {@link Block} to the west of this block
|
|
@@ -3850,137 +3071,6 @@ export class Block {
|
|
|
3850
3071
|
west(steps?: number): Block | undefined;
|
|
3851
3072
|
}
|
|
3852
3073
|
|
|
3853
|
-
/**
|
|
3854
|
-
* @beta
|
|
3855
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
3856
|
-
* of useful functions for the creation and utility of {@link
|
|
3857
|
-
* BlockBoundingBox} objects
|
|
3858
|
-
*/
|
|
3859
|
-
export class BlockBoundingBoxUtils {
|
|
3860
|
-
private constructor();
|
|
3861
|
-
/**
|
|
3862
|
-
* @remarks
|
|
3863
|
-
* Create a validated instance of a {@link BlockBoundingBox}
|
|
3864
|
-
* where the min and max components are guaranteed to be (min
|
|
3865
|
-
* <= max)
|
|
3866
|
-
*
|
|
3867
|
-
* This function can't be called in read-only mode.
|
|
3868
|
-
*
|
|
3869
|
-
* @param min
|
|
3870
|
-
* A corner world location
|
|
3871
|
-
* @param max
|
|
3872
|
-
* A corner world location diametrically opposite
|
|
3873
|
-
*/
|
|
3874
|
-
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
3875
|
-
/**
|
|
3876
|
-
* @remarks
|
|
3877
|
-
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
3878
|
-
* each axis.
|
|
3879
|
-
* Sizes can be negative to perform contraction.
|
|
3880
|
-
* Note: corners can be inverted if the contraction size is
|
|
3881
|
-
* greater than the span, but the min/max relationship will
|
|
3882
|
-
* remain correct
|
|
3883
|
-
*
|
|
3884
|
-
* This function can't be called in read-only mode.
|
|
3885
|
-
*
|
|
3886
|
-
* @returns
|
|
3887
|
-
* Return a new {@link BlockBoundingBox} object representing
|
|
3888
|
-
* the changes
|
|
3889
|
-
*/
|
|
3890
|
-
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
3891
|
-
/**
|
|
3892
|
-
* @remarks
|
|
3893
|
-
* Check if two {@link BlockBoundingBox} objects are identical
|
|
3894
|
-
*
|
|
3895
|
-
* This function can't be called in read-only mode.
|
|
3896
|
-
*
|
|
3897
|
-
*/
|
|
3898
|
-
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3899
|
-
/**
|
|
3900
|
-
* @remarks
|
|
3901
|
-
* Expand the initial box object bounds to include the 2nd box
|
|
3902
|
-
* argument. The resultant {@link BlockBoundingBox} object
|
|
3903
|
-
* will be a BlockBoundingBox which exactly encompasses the two
|
|
3904
|
-
* boxes.
|
|
3905
|
-
*
|
|
3906
|
-
* This function can't be called in read-only mode.
|
|
3907
|
-
*
|
|
3908
|
-
* @returns
|
|
3909
|
-
* A new {@link BlockBoundingBox} instance representing the
|
|
3910
|
-
* smallest possible bounding box which can encompass both
|
|
3911
|
-
*/
|
|
3912
|
-
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
3913
|
-
/**
|
|
3914
|
-
* @remarks
|
|
3915
|
-
* Calculate the center block of a given {@link
|
|
3916
|
-
* BlockBoundingBox} object.
|
|
3917
|
-
*
|
|
3918
|
-
* This function can't be called in read-only mode.
|
|
3919
|
-
*
|
|
3920
|
-
* @returns
|
|
3921
|
-
* Note that {@link BlockBoundingBox} objects represent whole
|
|
3922
|
-
* blocks, so the center of boxes which have odd numbered
|
|
3923
|
-
* bounds are not mathematically centered...
|
|
3924
|
-
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
3925
|
-
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
3926
|
-
*/
|
|
3927
|
-
static getCenter(box: BlockBoundingBox): Vector3;
|
|
3928
|
-
/**
|
|
3929
|
-
* @remarks
|
|
3930
|
-
* Calculate the BlockBoundingBox which represents the union
|
|
3931
|
-
* area of two intersecting BlockBoundingBoxes
|
|
3932
|
-
*
|
|
3933
|
-
* This function can't be called in read-only mode.
|
|
3934
|
-
*
|
|
3935
|
-
*/
|
|
3936
|
-
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
3937
|
-
/**
|
|
3938
|
-
* @remarks
|
|
3939
|
-
* Get the Span of each of the BlockBoundingBox Axis components
|
|
3940
|
-
*
|
|
3941
|
-
* This function can't be called in read-only mode.
|
|
3942
|
-
*
|
|
3943
|
-
*/
|
|
3944
|
-
static getSpan(box: BlockBoundingBox): Vector3;
|
|
3945
|
-
/**
|
|
3946
|
-
* @remarks
|
|
3947
|
-
* Check to see if two BlockBoundingBox objects intersect
|
|
3948
|
-
*
|
|
3949
|
-
* This function can't be called in read-only mode.
|
|
3950
|
-
*
|
|
3951
|
-
*/
|
|
3952
|
-
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3953
|
-
/**
|
|
3954
|
-
* @remarks
|
|
3955
|
-
* Check to see if a given coordinate is inside a
|
|
3956
|
-
* BlockBoundingBox
|
|
3957
|
-
*
|
|
3958
|
-
* This function can't be called in read-only mode.
|
|
3959
|
-
*
|
|
3960
|
-
*/
|
|
3961
|
-
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
3962
|
-
/**
|
|
3963
|
-
* @remarks
|
|
3964
|
-
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
3965
|
-
* max))
|
|
3966
|
-
*
|
|
3967
|
-
* This function can't be called in read-only mode.
|
|
3968
|
-
*
|
|
3969
|
-
*/
|
|
3970
|
-
static isValid(box: BlockBoundingBox): boolean;
|
|
3971
|
-
/**
|
|
3972
|
-
* @remarks
|
|
3973
|
-
* Move a BlockBoundingBox by a given amount
|
|
3974
|
-
*
|
|
3975
|
-
* This function can't be called in read-only mode.
|
|
3976
|
-
*
|
|
3977
|
-
* @returns
|
|
3978
|
-
* Return a new BlockBoundingBox object which represents the
|
|
3979
|
-
* change
|
|
3980
|
-
*/
|
|
3981
|
-
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
3982
|
-
}
|
|
3983
|
-
|
|
3984
3074
|
/**
|
|
3985
3075
|
* Base type for components associated with blocks.
|
|
3986
3076
|
*/
|
|
@@ -4032,22 +3122,23 @@ export class BlockComponentOnPlaceEvent extends BlockEvent {
|
|
|
4032
3122
|
}
|
|
4033
3123
|
|
|
4034
3124
|
/**
|
|
4035
|
-
*
|
|
4036
|
-
*
|
|
3125
|
+
* @rc
|
|
3126
|
+
* Contains information regarding a specific block being broken
|
|
3127
|
+
* by a player.
|
|
4037
3128
|
*/
|
|
4038
3129
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4039
|
-
export class
|
|
3130
|
+
export class BlockComponentPlayerBreakEvent extends BlockEvent {
|
|
4040
3131
|
private constructor();
|
|
4041
3132
|
/**
|
|
4042
3133
|
* @remarks
|
|
4043
3134
|
* Returns permutation information about this block before it
|
|
4044
|
-
* was
|
|
3135
|
+
* was broken.
|
|
4045
3136
|
*
|
|
4046
3137
|
*/
|
|
4047
|
-
readonly
|
|
3138
|
+
readonly brokenBlockPermutation: BlockPermutation;
|
|
4048
3139
|
/**
|
|
4049
3140
|
* @remarks
|
|
4050
|
-
* The player that
|
|
3141
|
+
* The player that broke this block.
|
|
4051
3142
|
*
|
|
4052
3143
|
*/
|
|
4053
3144
|
readonly player?: Player;
|
|
@@ -4189,37 +3280,13 @@ export class BlockComponentTickEvent extends BlockEvent {
|
|
|
4189
3280
|
}
|
|
4190
3281
|
|
|
4191
3282
|
/**
|
|
4192
|
-
* @
|
|
3283
|
+
* @rc
|
|
4193
3284
|
* An instance of a custom component on a block.
|
|
4194
3285
|
*/
|
|
4195
3286
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4196
3287
|
export class BlockCustomComponentInstance extends BlockComponent {
|
|
4197
3288
|
private constructor();
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
/**
|
|
4201
|
-
* @beta
|
|
4202
|
-
* Represents the particles that appear when the block is
|
|
4203
|
-
* destroyed.
|
|
4204
|
-
*/
|
|
4205
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4206
|
-
export class BlockDestructionParticlesComponent extends BlockComponent {
|
|
4207
|
-
private constructor();
|
|
4208
|
-
/**
|
|
4209
|
-
* @remarks
|
|
4210
|
-
* Name of the texture used for the particles.
|
|
4211
|
-
*
|
|
4212
|
-
* @throws This property can throw when used.
|
|
4213
|
-
*/
|
|
4214
|
-
readonly texture: string;
|
|
4215
|
-
/**
|
|
4216
|
-
* @remarks
|
|
4217
|
-
* Type of tint applied to the particles.
|
|
4218
|
-
*
|
|
4219
|
-
* @throws This property can throw when used.
|
|
4220
|
-
*/
|
|
4221
|
-
readonly tintMethod: TintMethod;
|
|
4222
|
-
static readonly componentId = 'minecraft:destruction_particles';
|
|
3289
|
+
readonly customComponentParameters: CustomComponentParameters;
|
|
4223
3290
|
}
|
|
4224
3291
|
|
|
4225
3292
|
/**
|
|
@@ -4431,18 +3498,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
4431
3498
|
*
|
|
4432
3499
|
*/
|
|
4433
3500
|
[Symbol.iterator](): Iterator<Vector3>;
|
|
4434
|
-
/**
|
|
4435
|
-
* @beta
|
|
4436
|
-
* @remarks
|
|
4437
|
-
* Checks if the underlining block volume has been invalidated.
|
|
4438
|
-
* Will return false if the block volume was modified between
|
|
4439
|
-
* creating the iterator and iterating it, and true otherwise.
|
|
4440
|
-
*
|
|
4441
|
-
* @throws This function can throw errors.
|
|
4442
|
-
*
|
|
4443
|
-
* {@link minecraftcommon.EngineError}
|
|
4444
|
-
*/
|
|
4445
|
-
isValid(): boolean;
|
|
4446
3501
|
/**
|
|
4447
3502
|
* @remarks
|
|
4448
3503
|
* This function can't be called in read-only mode.
|
|
@@ -4452,7 +3507,7 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
4452
3507
|
}
|
|
4453
3508
|
|
|
4454
3509
|
/**
|
|
4455
|
-
* @
|
|
3510
|
+
* @rc
|
|
4456
3511
|
* Represents the color of a block when displayed on a map.
|
|
4457
3512
|
*/
|
|
4458
3513
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -4482,6 +3537,31 @@ export class BlockMapColorComponent extends BlockComponent {
|
|
|
4482
3537
|
static readonly componentId = 'minecraft:map_color';
|
|
4483
3538
|
}
|
|
4484
3539
|
|
|
3540
|
+
/**
|
|
3541
|
+
* @rc
|
|
3542
|
+
*/
|
|
3543
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3544
|
+
export class BlockMovableComponent extends BlockComponent {
|
|
3545
|
+
private constructor();
|
|
3546
|
+
/**
|
|
3547
|
+
* @throws This property can throw when used.
|
|
3548
|
+
*
|
|
3549
|
+
* {@link LocationInUnloadedChunkError}
|
|
3550
|
+
*
|
|
3551
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3552
|
+
*/
|
|
3553
|
+
readonly movementType: MovementType;
|
|
3554
|
+
/**
|
|
3555
|
+
* @throws This property can throw when used.
|
|
3556
|
+
*
|
|
3557
|
+
* {@link LocationInUnloadedChunkError}
|
|
3558
|
+
*
|
|
3559
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3560
|
+
*/
|
|
3561
|
+
readonly stickyType: StickyType;
|
|
3562
|
+
static readonly componentId = 'minecraft:movable';
|
|
3563
|
+
}
|
|
3564
|
+
|
|
4485
3565
|
/**
|
|
4486
3566
|
* Contains the combination of type {@link BlockType} and
|
|
4487
3567
|
* properties (also sometimes called block state) which
|
|
@@ -4998,9 +4078,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4998
4078
|
* @param message
|
|
4999
4079
|
* The message to set on the sign. If set to a string, then
|
|
5000
4080
|
* call `getText` to read that string. If set to a RawMessage,
|
|
5001
|
-
* then calling `getRawText` will return a RawText.
|
|
5002
|
-
* RawText, then calling `getRawText` will return the same
|
|
5003
|
-
* object that was passed in.
|
|
4081
|
+
* then calling `getRawText` will return a RawText.
|
|
5004
4082
|
* @param side
|
|
5005
4083
|
* The side of the sign the message will be set on. If not
|
|
5006
4084
|
* provided, the message will be set on the front side of the
|
|
@@ -5010,7 +4088,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
5010
4088
|
* Throws if the provided message is greater than 512
|
|
5011
4089
|
* characters in length.
|
|
5012
4090
|
*/
|
|
5013
|
-
setText(message: RawMessage |
|
|
4091
|
+
setText(message: RawMessage | string, side?: SignSide): void;
|
|
5014
4092
|
/**
|
|
5015
4093
|
* @remarks
|
|
5016
4094
|
* Sets the dye color of the text.
|
|
@@ -5220,15 +4298,6 @@ export class BlockVolumeBase {
|
|
|
5220
4298
|
*
|
|
5221
4299
|
*/
|
|
5222
4300
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
5223
|
-
/**
|
|
5224
|
-
* @beta
|
|
5225
|
-
* @remarks
|
|
5226
|
-
* Return a {@link BlockBoundingBox} object which represents
|
|
5227
|
-
* the validated min and max coordinates of the volume
|
|
5228
|
-
*
|
|
5229
|
-
* @throws This function can throw errors.
|
|
5230
|
-
*/
|
|
5231
|
-
getBoundingBox(): BlockBoundingBox;
|
|
5232
4301
|
/**
|
|
5233
4302
|
* @remarks
|
|
5234
4303
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -5358,7 +4427,7 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
5358
4427
|
export class ButtonPushAfterEventSignal {
|
|
5359
4428
|
private constructor();
|
|
5360
4429
|
/**
|
|
5361
|
-
* @
|
|
4430
|
+
* @rc
|
|
5362
4431
|
* @remarks
|
|
5363
4432
|
* Adds a callback that will be called when a button is pushed.
|
|
5364
4433
|
*
|
|
@@ -5369,7 +4438,7 @@ export class ButtonPushAfterEventSignal {
|
|
|
5369
4438
|
*/
|
|
5370
4439
|
subscribe(callback: (arg0: ButtonPushAfterEvent) => void): (arg0: ButtonPushAfterEvent) => void;
|
|
5371
4440
|
/**
|
|
5372
|
-
* @
|
|
4441
|
+
* @rc
|
|
5373
4442
|
* @remarks
|
|
5374
4443
|
* Removes a callback from being called when a button is
|
|
5375
4444
|
* pushed.
|
|
@@ -5389,7 +4458,7 @@ export class ButtonPushAfterEventSignal {
|
|
|
5389
4458
|
export class Camera {
|
|
5390
4459
|
private constructor();
|
|
5391
4460
|
/**
|
|
5392
|
-
* @
|
|
4461
|
+
* @rc
|
|
5393
4462
|
* @remarks
|
|
5394
4463
|
* Returns whether the Camera is valid to access and use. A
|
|
5395
4464
|
* Camera is considered valid when the owning Player of the
|
|
@@ -5423,179 +4492,43 @@ export class Camera {
|
|
|
5423
4492
|
fade(fadeCameraOptions?: CameraFadeOptions): void;
|
|
5424
4493
|
/**
|
|
5425
4494
|
* @remarks
|
|
5426
|
-
* Sets the current active camera for the specified player.
|
|
5427
|
-
*
|
|
5428
|
-
* This function can't be called in read-only mode.
|
|
5429
|
-
*
|
|
5430
|
-
* @param cameraPreset
|
|
5431
|
-
* Identifier of a camera preset file defined within JSON.
|
|
5432
|
-
* @param setOptions
|
|
5433
|
-
* Additional options for the camera.
|
|
5434
|
-
* @throws This function can throw errors.
|
|
5435
|
-
*/
|
|
5436
|
-
setCamera(
|
|
5437
|
-
cameraPreset: string,
|
|
5438
|
-
setOptions?:
|
|
5439
|
-
| CameraDefaultOptions
|
|
5440
|
-
| CameraFixedBoomOptions
|
|
5441
|
-
| CameraSetFacingOptions
|
|
5442
|
-
| CameraSetLocationOptions
|
|
5443
|
-
| CameraSetPosOptions
|
|
5444
|
-
| CameraSetRotOptions
|
|
5445
|
-
| CameraTargetOptions,
|
|
5446
|
-
): void;
|
|
5447
|
-
}
|
|
5448
|
-
|
|
5449
|
-
/**
|
|
5450
|
-
* @beta
|
|
5451
|
-
* An event that fires as players enter chat messages.
|
|
5452
|
-
*/
|
|
5453
|
-
export class ChatSendAfterEvent {
|
|
5454
|
-
private constructor();
|
|
5455
|
-
/**
|
|
5456
|
-
* @remarks
|
|
5457
|
-
* Message that is being broadcast.
|
|
5458
|
-
*
|
|
5459
|
-
*/
|
|
5460
|
-
readonly message: string;
|
|
5461
|
-
/**
|
|
5462
|
-
* @remarks
|
|
5463
|
-
* Player that sent the chat message.
|
|
5464
|
-
*
|
|
5465
|
-
*/
|
|
5466
|
-
readonly sender: Player;
|
|
5467
|
-
/**
|
|
5468
|
-
* @remarks
|
|
5469
|
-
* Optional list of players that will receive this message. If
|
|
5470
|
-
* defined, this message is directly targeted to one or more
|
|
5471
|
-
* players (i.e., is not broadcast.)
|
|
5472
|
-
*
|
|
5473
|
-
*/
|
|
5474
|
-
readonly targets?: Player[];
|
|
5475
|
-
}
|
|
5476
|
-
|
|
5477
|
-
/**
|
|
5478
|
-
* @beta
|
|
5479
|
-
* Manages callbacks that are connected to chat messages being
|
|
5480
|
-
* sent.
|
|
5481
|
-
*/
|
|
5482
|
-
export class ChatSendAfterEventSignal {
|
|
5483
|
-
private constructor();
|
|
5484
|
-
/**
|
|
5485
|
-
* @remarks
|
|
5486
|
-
* Adds a callback that will be called when new chat messages
|
|
5487
|
-
* are sent.
|
|
5488
|
-
*
|
|
5489
|
-
* This function can't be called in read-only mode.
|
|
5490
|
-
*
|
|
5491
|
-
* This function can be called in early-execution mode.
|
|
5492
|
-
*
|
|
5493
|
-
*/
|
|
5494
|
-
subscribe(callback: (arg0: ChatSendAfterEvent) => void): (arg0: ChatSendAfterEvent) => void;
|
|
5495
|
-
/**
|
|
5496
|
-
* @remarks
|
|
5497
|
-
* Removes a callback from being called when new chat messages
|
|
5498
|
-
* are sent.
|
|
5499
|
-
*
|
|
5500
|
-
* This function can't be called in read-only mode.
|
|
5501
|
-
*
|
|
5502
|
-
* This function can be called in early-execution mode.
|
|
5503
|
-
*
|
|
5504
|
-
*/
|
|
5505
|
-
unsubscribe(callback: (arg0: ChatSendAfterEvent) => void): void;
|
|
5506
|
-
}
|
|
5507
|
-
|
|
5508
|
-
/**
|
|
5509
|
-
* @beta
|
|
5510
|
-
* An event that fires as players enter chat messages.
|
|
5511
|
-
*/
|
|
5512
|
-
export class ChatSendBeforeEvent {
|
|
5513
|
-
private constructor();
|
|
5514
|
-
/**
|
|
5515
|
-
* @remarks
|
|
5516
|
-
* If set to true in a beforeChat event handler, this message
|
|
5517
|
-
* is not broadcast out.
|
|
5518
|
-
*
|
|
5519
|
-
*/
|
|
5520
|
-
cancel: boolean;
|
|
5521
|
-
/**
|
|
5522
|
-
* @remarks
|
|
5523
|
-
* Message that is being broadcast.
|
|
5524
|
-
*
|
|
5525
|
-
*/
|
|
5526
|
-
readonly message: string;
|
|
5527
|
-
/**
|
|
5528
|
-
* @remarks
|
|
5529
|
-
* Player that sent the chat message.
|
|
5530
|
-
*
|
|
5531
|
-
*/
|
|
5532
|
-
readonly sender: Player;
|
|
5533
|
-
/**
|
|
5534
|
-
* @remarks
|
|
5535
|
-
* Optional list of players that will receive this message. If
|
|
5536
|
-
* defined, this message is directly targeted to one or more
|
|
5537
|
-
* players (i.e., is not broadcast.)
|
|
5538
|
-
*
|
|
5539
|
-
*/
|
|
5540
|
-
readonly targets?: Player[];
|
|
5541
|
-
}
|
|
5542
|
-
|
|
5543
|
-
/**
|
|
5544
|
-
* @beta
|
|
5545
|
-
* Manages callbacks that are connected to an event that fires
|
|
5546
|
-
* before chat messages are sent.
|
|
5547
|
-
* @example customCommand.ts
|
|
5548
|
-
* ```typescript
|
|
5549
|
-
* import { world, DimensionLocation } from "@minecraft/server";
|
|
5550
|
-
*
|
|
5551
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
5552
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe((eventData) => {
|
|
5553
|
-
* if (eventData.message.includes("cancel")) {
|
|
5554
|
-
* // Cancel event if the message contains "cancel"
|
|
5555
|
-
* eventData.cancel = true;
|
|
5556
|
-
* } else {
|
|
5557
|
-
* const args = eventData.message.split(" ");
|
|
5558
|
-
*
|
|
5559
|
-
* if (args.length > 0) {
|
|
5560
|
-
* switch (args[0].toLowerCase()) {
|
|
5561
|
-
* case "echo":
|
|
5562
|
-
* // Send a modified version of chat message
|
|
5563
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
5564
|
-
* break;
|
|
5565
|
-
* case "help":
|
|
5566
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
5567
|
-
* break;
|
|
5568
|
-
* }
|
|
5569
|
-
* }
|
|
5570
|
-
* }
|
|
5571
|
-
* });
|
|
5572
|
-
* }
|
|
5573
|
-
* ```
|
|
5574
|
-
*/
|
|
5575
|
-
export class ChatSendBeforeEventSignal {
|
|
5576
|
-
private constructor();
|
|
5577
|
-
/**
|
|
5578
|
-
* @remarks
|
|
5579
|
-
* Adds a callback that will be called before new chat messages
|
|
5580
|
-
* are sent.
|
|
4495
|
+
* Sets the current active camera for the specified player.
|
|
5581
4496
|
*
|
|
5582
4497
|
* This function can't be called in read-only mode.
|
|
5583
4498
|
*
|
|
5584
|
-
*
|
|
5585
|
-
*
|
|
4499
|
+
* @param cameraPreset
|
|
4500
|
+
* Identifier of a camera preset file defined within JSON.
|
|
4501
|
+
* @param setOptions
|
|
4502
|
+
* Additional options for the camera.
|
|
4503
|
+
* @throws This function can throw errors.
|
|
5586
4504
|
*/
|
|
5587
|
-
|
|
4505
|
+
setCamera(
|
|
4506
|
+
cameraPreset: string,
|
|
4507
|
+
setOptions?:
|
|
4508
|
+
| CameraFixedBoomOptions
|
|
4509
|
+
| CameraSetFacingOptions
|
|
4510
|
+
| CameraSetLocationOptions
|
|
4511
|
+
| CameraSetPosOptions
|
|
4512
|
+
| CameraSetRotOptions
|
|
4513
|
+
| CameraTargetOptions,
|
|
4514
|
+
): void;
|
|
5588
4515
|
/**
|
|
4516
|
+
* @rc
|
|
5589
4517
|
* @remarks
|
|
5590
|
-
*
|
|
5591
|
-
*
|
|
4518
|
+
* Sets the current active camera for the specified player and
|
|
4519
|
+
* resets the position and rotation to the values defined in
|
|
4520
|
+
* the JSON.
|
|
5592
4521
|
*
|
|
5593
4522
|
* This function can't be called in read-only mode.
|
|
5594
4523
|
*
|
|
5595
|
-
*
|
|
5596
|
-
*
|
|
4524
|
+
* @param cameraPreset
|
|
4525
|
+
* Identifier of a camera preset file defined within JSON.
|
|
4526
|
+
* @param easeOptions
|
|
4527
|
+
* Options to ease the camera back to its original position and
|
|
4528
|
+
* rotation.
|
|
4529
|
+
* @throws This function can throw errors.
|
|
5597
4530
|
*/
|
|
5598
|
-
|
|
4531
|
+
setDefaultCamera(cameraPreset: string, easeOptions?: EaseOptions): void;
|
|
5599
4532
|
}
|
|
5600
4533
|
|
|
5601
4534
|
/**
|
|
@@ -5639,7 +4572,7 @@ export class CommandResult {
|
|
|
5639
4572
|
export class Component {
|
|
5640
4573
|
private constructor();
|
|
5641
4574
|
/**
|
|
5642
|
-
* @
|
|
4575
|
+
* @rc
|
|
5643
4576
|
* @remarks
|
|
5644
4577
|
* Returns whether the component is valid. A component is
|
|
5645
4578
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -5656,258 +4589,6 @@ export class Component {
|
|
|
5656
4589
|
readonly typeId: string;
|
|
5657
4590
|
}
|
|
5658
4591
|
|
|
5659
|
-
/**
|
|
5660
|
-
* @beta
|
|
5661
|
-
* The Compound Block Volume is a collection of individual
|
|
5662
|
-
* block volume definitions which, as a collection, define a
|
|
5663
|
-
* larger volume of (sometimes non-contiguous) irregular
|
|
5664
|
-
* shapes.
|
|
5665
|
-
* This class is loosely based on the concept of CSG
|
|
5666
|
-
* (Computational Solid Geometry) and allows a user to create
|
|
5667
|
-
* complex volumes by building a stack of volumes and voids to
|
|
5668
|
-
* make a larger single volume.
|
|
5669
|
-
* For example - normally a creator would create a hollow cube
|
|
5670
|
-
* by creating 6 "wall" surfaces for each face.
|
|
5671
|
-
* With a Compound Block Volume, a creator can define a hollow
|
|
5672
|
-
* cube by creating a single outer solid cube, and then
|
|
5673
|
-
* defining a further single 'void' cube inside the larger one.
|
|
5674
|
-
* Similarly, the Compound Block Volume can represent irregular
|
|
5675
|
-
* shaped volumes (e.g. a tree consists of a trunk and lots of
|
|
5676
|
-
* leaf cubes which are not necessarily contiguously placed).
|
|
5677
|
-
* Each of the volumes added to the CompoundBlockVolume are (by
|
|
5678
|
-
* default) relative to the origin set (either at construction
|
|
5679
|
-
* or via one of the set functions).
|
|
5680
|
-
* However, it is also possible to push volumes to the compound
|
|
5681
|
-
* collection which are absolute in nature and are not affected
|
|
5682
|
-
* by origin changes.
|
|
5683
|
-
*/
|
|
5684
|
-
export class CompoundBlockVolume {
|
|
5685
|
-
/**
|
|
5686
|
-
* @remarks
|
|
5687
|
-
* Return the 'capacity' of the bounding rectangle which
|
|
5688
|
-
* represents the collection of volumes in the stack
|
|
5689
|
-
*
|
|
5690
|
-
*/
|
|
5691
|
-
readonly capacity: number;
|
|
5692
|
-
readonly items: CompoundBlockVolumeItem[];
|
|
5693
|
-
readonly itemsAbsolute: CompoundBlockVolumeItem[];
|
|
5694
|
-
/**
|
|
5695
|
-
* @remarks
|
|
5696
|
-
* Return the number of volumes (positive and negative) in the
|
|
5697
|
-
* volume stack
|
|
5698
|
-
*
|
|
5699
|
-
*/
|
|
5700
|
-
readonly volumeCount: number;
|
|
5701
|
-
/**
|
|
5702
|
-
* @remarks
|
|
5703
|
-
* Create a CompoundBlockVolume object
|
|
5704
|
-
*
|
|
5705
|
-
* @param origin
|
|
5706
|
-
* An optional world space origin on which to center the
|
|
5707
|
-
* compound volume.
|
|
5708
|
-
* If not specified, the origin is set to (0,0,0)
|
|
5709
|
-
*/
|
|
5710
|
-
constructor(origin?: Vector3);
|
|
5711
|
-
/**
|
|
5712
|
-
* @remarks
|
|
5713
|
-
* Clear the contents of the volume stack
|
|
5714
|
-
*
|
|
5715
|
-
* This function can't be called in read-only mode.
|
|
5716
|
-
*
|
|
5717
|
-
*/
|
|
5718
|
-
clear(): void;
|
|
5719
|
-
/**
|
|
5720
|
-
* @remarks
|
|
5721
|
-
* Fetch a Block Location Iterator for the Compound Block
|
|
5722
|
-
* Volume. This iterator will allow a creator to iterate
|
|
5723
|
-
* across all of the selected volumes within the larger
|
|
5724
|
-
* bounding area.
|
|
5725
|
-
* Areas of a volume which have been overridden by a
|
|
5726
|
-
* subtractive volume will not be included in the iterator
|
|
5727
|
-
* step.
|
|
5728
|
-
* (i.e. if you push a cube to the stack, and then push a
|
|
5729
|
-
* subtractive volume to the same location, then the iterator
|
|
5730
|
-
* will step over the initial volume because it is considered
|
|
5731
|
-
* negative space)
|
|
5732
|
-
* Note that the Block Locations returned by this iterator are
|
|
5733
|
-
* in absolute world space (irrespective of whether the
|
|
5734
|
-
* compound volume items pushed are absolute or relative)
|
|
5735
|
-
*
|
|
5736
|
-
* This function can't be called in read-only mode.
|
|
5737
|
-
*
|
|
5738
|
-
*/
|
|
5739
|
-
getBlockLocationIterator(): BlockLocationIterator;
|
|
5740
|
-
/**
|
|
5741
|
-
* @remarks
|
|
5742
|
-
* Get the largest bounding box that represents a container for
|
|
5743
|
-
* all of the volumes on the stack
|
|
5744
|
-
* Note that the bounding box returned is represented in
|
|
5745
|
-
* absolute world space (irrespective of whether the compound
|
|
5746
|
-
* volume items pushed are absolute or relative)
|
|
5747
|
-
*
|
|
5748
|
-
* This function can't be called in read-only mode.
|
|
5749
|
-
*
|
|
5750
|
-
*/
|
|
5751
|
-
getBoundingBox(): BlockBoundingBox;
|
|
5752
|
-
/**
|
|
5753
|
-
* @remarks
|
|
5754
|
-
* Get the max block location of the outermost bounding
|
|
5755
|
-
* rectangle which represents the volumes on the stack.
|
|
5756
|
-
* Note that the max location returned is in absolute world
|
|
5757
|
-
* space (irrespective of whether the compound volume items
|
|
5758
|
-
* pushed are absolute or relative)
|
|
5759
|
-
*
|
|
5760
|
-
* This function can't be called in read-only mode.
|
|
5761
|
-
*
|
|
5762
|
-
*/
|
|
5763
|
-
getMax(): Vector3;
|
|
5764
|
-
/**
|
|
5765
|
-
* @remarks
|
|
5766
|
-
* Get the min block location of the outermost bounding
|
|
5767
|
-
* rectangle which represents the volumes on the stack.
|
|
5768
|
-
* Note that the min location returned is in absolute world
|
|
5769
|
-
* space (irrespective of whether the compound volume items
|
|
5770
|
-
* pushed are absolute or relative)
|
|
5771
|
-
*
|
|
5772
|
-
* This function can't be called in read-only mode.
|
|
5773
|
-
*
|
|
5774
|
-
*/
|
|
5775
|
-
getMin(): Vector3;
|
|
5776
|
-
/**
|
|
5777
|
-
* @remarks
|
|
5778
|
-
* Fetch the origin in world space of the compound volume
|
|
5779
|
-
*
|
|
5780
|
-
* This function can't be called in read-only mode.
|
|
5781
|
-
*
|
|
5782
|
-
*/
|
|
5783
|
-
getOrigin(): Vector3;
|
|
5784
|
-
/**
|
|
5785
|
-
* @remarks
|
|
5786
|
-
* Return a boolean which signals if there are any volume items
|
|
5787
|
-
* pushed to the volume
|
|
5788
|
-
*
|
|
5789
|
-
* This function can't be called in read-only mode.
|
|
5790
|
-
*
|
|
5791
|
-
*/
|
|
5792
|
-
isEmpty(): boolean;
|
|
5793
|
-
/**
|
|
5794
|
-
* @remarks
|
|
5795
|
-
* Return a boolean representing whether or not a given
|
|
5796
|
-
* absolute world space block location is inside a positive
|
|
5797
|
-
* block volume.
|
|
5798
|
-
* E.g. if the stack contains a large cube followed by a
|
|
5799
|
-
* slightly smaller negative cube, and the test location is
|
|
5800
|
-
* within the negative cube - the function will return false
|
|
5801
|
-
* because it's not 'inside' a volume (it IS inside the
|
|
5802
|
-
* bounding rectangle, but it is not inside a positively
|
|
5803
|
-
* defined location)
|
|
5804
|
-
*
|
|
5805
|
-
* This function can't be called in read-only mode.
|
|
5806
|
-
*
|
|
5807
|
-
*/
|
|
5808
|
-
isInside(worldLocation: Vector3): boolean;
|
|
5809
|
-
/**
|
|
5810
|
-
* @remarks
|
|
5811
|
-
* Inspect the last entry pushed to the volume stack without
|
|
5812
|
-
* affecting the stack contents.
|
|
5813
|
-
*
|
|
5814
|
-
* This function can't be called in read-only mode.
|
|
5815
|
-
*
|
|
5816
|
-
* @param forceRelativity
|
|
5817
|
-
* Determine whether the function returns a
|
|
5818
|
-
* CompoundBlockVolumeItem which is forced into either relative
|
|
5819
|
-
* or absolute coordinate system.
|
|
5820
|
-
* `true` = force returned item to be relative to volume origin
|
|
5821
|
-
* `false` = force returned item to be absolute world space
|
|
5822
|
-
* location
|
|
5823
|
-
*
|
|
5824
|
-
* If no flag is specified, the item returned retains whatever
|
|
5825
|
-
* relativity it had when it was pushed
|
|
5826
|
-
* @returns
|
|
5827
|
-
* Returns undefined if the stack is empty
|
|
5828
|
-
*/
|
|
5829
|
-
peekLastVolume(forceRelativity?: CompoundBlockVolumePositionRelativity): CompoundBlockVolumeItem | undefined;
|
|
5830
|
-
/**
|
|
5831
|
-
* @remarks
|
|
5832
|
-
* Remove the last entry from the volume stack. This will
|
|
5833
|
-
* reduce the stack size by one
|
|
5834
|
-
*
|
|
5835
|
-
* This function can't be called in read-only mode.
|
|
5836
|
-
*
|
|
5837
|
-
*/
|
|
5838
|
-
popVolume(): boolean;
|
|
5839
|
-
/**
|
|
5840
|
-
* @remarks
|
|
5841
|
-
* Push a volume item to the stack. The volume item contains
|
|
5842
|
-
* an 'action' parameter which determines whether this volume
|
|
5843
|
-
* is a positive or negative space.
|
|
5844
|
-
* The item also contains a `locationRelativity` which
|
|
5845
|
-
* determines whether it is relative or absolute to the
|
|
5846
|
-
* compound volume origin
|
|
5847
|
-
*
|
|
5848
|
-
* This function can't be called in read-only mode.
|
|
5849
|
-
*
|
|
5850
|
-
* @param item
|
|
5851
|
-
* Item to push to the end of the stack
|
|
5852
|
-
*/
|
|
5853
|
-
pushVolume(item: CompoundBlockVolumeItem): void;
|
|
5854
|
-
/**
|
|
5855
|
-
* @remarks
|
|
5856
|
-
* If the volume stack is empty, this function will push the
|
|
5857
|
-
* specified item to the stack.
|
|
5858
|
-
* If the volume stack is NOT empty, this function will replace
|
|
5859
|
-
* the last item on the stack with the new item.
|
|
5860
|
-
*
|
|
5861
|
-
* This function can't be called in read-only mode.
|
|
5862
|
-
*
|
|
5863
|
-
* @param item
|
|
5864
|
-
* Item to add or replace
|
|
5865
|
-
*/
|
|
5866
|
-
replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
|
|
5867
|
-
/**
|
|
5868
|
-
* @remarks
|
|
5869
|
-
* Set the origin of the compound volume to an absolute world
|
|
5870
|
-
* space location
|
|
5871
|
-
*
|
|
5872
|
-
* This function can't be called in read-only mode.
|
|
5873
|
-
*
|
|
5874
|
-
* @param preserveExistingVolumes
|
|
5875
|
-
* This optional boolean flag determines whether the relative
|
|
5876
|
-
* `CompoundBlockVolumeItem`'s are frozen in place, or are
|
|
5877
|
-
* affected by the new origin.
|
|
5878
|
-
* Imagine a scenario where you have a series of relative
|
|
5879
|
-
* locations around an origin which make up a sphere; all of
|
|
5880
|
-
* these locations are in the range of -2 to 2.
|
|
5881
|
-
* Push each of these locations to the compound volume as
|
|
5882
|
-
* relative items.
|
|
5883
|
-
* Now, move the origin and all of the locations representing
|
|
5884
|
-
* the sphere move accordingly.
|
|
5885
|
-
* However, let's say you want to add a 2nd sphere next to the
|
|
5886
|
-
* 1st.
|
|
5887
|
-
* In this case, set the new origin a few locations over, but
|
|
5888
|
-
* 'preserveExistingVolumes' = true.
|
|
5889
|
-
* This will set a new origin, but the existing sphere
|
|
5890
|
-
* locations will remain relative to the original origin.
|
|
5891
|
-
* Now, you can push the relative sphere locations again (this
|
|
5892
|
-
* time they will be relative to the new origin) - resulting in
|
|
5893
|
-
* 2 spheres next to each other.
|
|
5894
|
-
*/
|
|
5895
|
-
setOrigin(position: Vector3, preserveExistingVolumes?: boolean): void;
|
|
5896
|
-
/**
|
|
5897
|
-
* @remarks
|
|
5898
|
-
* Similar to {@link CompoundBlockVolume.setOrigin} - this
|
|
5899
|
-
* function will translate the origin by a given delta to a new
|
|
5900
|
-
* position
|
|
5901
|
-
*
|
|
5902
|
-
* This function can't be called in read-only mode.
|
|
5903
|
-
*
|
|
5904
|
-
* @param preserveExistingVolumes
|
|
5905
|
-
* See the description for the arguments to {@link
|
|
5906
|
-
* CompoundBlockVolume.setOrigin}
|
|
5907
|
-
*/
|
|
5908
|
-
translateOrigin(delta: Vector3, preserveExistingVolumes?: boolean): void;
|
|
5909
|
-
}
|
|
5910
|
-
|
|
5911
4592
|
/**
|
|
5912
4593
|
* Represents a container that can hold sets of items. Used
|
|
5913
4594
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
@@ -5999,7 +4680,7 @@ export class Container {
|
|
|
5999
4680
|
*/
|
|
6000
4681
|
readonly emptySlotsCount: number;
|
|
6001
4682
|
/**
|
|
6002
|
-
* @
|
|
4683
|
+
* @rc
|
|
6003
4684
|
* @remarks
|
|
6004
4685
|
* Returns whether a container object (or the entity or block
|
|
6005
4686
|
* that this container is associated with) is still available
|
|
@@ -6030,6 +4711,10 @@ export class Container {
|
|
|
6030
4711
|
* @param itemStack
|
|
6031
4712
|
* The stack of items to add.
|
|
6032
4713
|
* @throws This function can throw errors.
|
|
4714
|
+
*
|
|
4715
|
+
* {@link ContainerRulesError}
|
|
4716
|
+
*
|
|
4717
|
+
* {@link Error}
|
|
6033
4718
|
*/
|
|
6034
4719
|
addItem(itemStack: ItemStack): ItemStack | undefined;
|
|
6035
4720
|
/**
|
|
@@ -6042,51 +4727,6 @@ export class Container {
|
|
|
6042
4727
|
* Throws if the container is invalid.
|
|
6043
4728
|
*/
|
|
6044
4729
|
clearAll(): void;
|
|
6045
|
-
/**
|
|
6046
|
-
* @beta
|
|
6047
|
-
* @remarks
|
|
6048
|
-
* Attempts to find an item inside the container
|
|
6049
|
-
*
|
|
6050
|
-
* @param itemStack
|
|
6051
|
-
* The item to find.
|
|
6052
|
-
* @throws This function can throw errors.
|
|
6053
|
-
*
|
|
6054
|
-
* {@link InvalidContainerError}
|
|
6055
|
-
*/
|
|
6056
|
-
contains(itemStack: ItemStack): boolean;
|
|
6057
|
-
/**
|
|
6058
|
-
* @beta
|
|
6059
|
-
* @remarks
|
|
6060
|
-
* Find the index of the first instance of an item inside the
|
|
6061
|
-
* container
|
|
6062
|
-
*
|
|
6063
|
-
* @param itemStack
|
|
6064
|
-
* The item to find.
|
|
6065
|
-
* @throws This function can throw errors.
|
|
6066
|
-
*
|
|
6067
|
-
* {@link InvalidContainerError}
|
|
6068
|
-
*/
|
|
6069
|
-
find(itemStack: ItemStack): number;
|
|
6070
|
-
/**
|
|
6071
|
-
* @beta
|
|
6072
|
-
* @remarks
|
|
6073
|
-
* Finds the index of the first empty slot inside the container
|
|
6074
|
-
*
|
|
6075
|
-
* @throws This function can throw errors.
|
|
6076
|
-
*
|
|
6077
|
-
* {@link InvalidContainerError}
|
|
6078
|
-
*/
|
|
6079
|
-
firstEmptySlot(): number;
|
|
6080
|
-
/**
|
|
6081
|
-
* @beta
|
|
6082
|
-
* @remarks
|
|
6083
|
-
* Finds the index of the first item inside the container
|
|
6084
|
-
*
|
|
6085
|
-
* @throws This function can throw errors.
|
|
6086
|
-
*
|
|
6087
|
-
* {@link InvalidContainerError}
|
|
6088
|
-
*/
|
|
6089
|
-
firstItem(): number;
|
|
6090
4730
|
/**
|
|
6091
4731
|
* @remarks
|
|
6092
4732
|
* Gets an {@link ItemStack} of the item at the specified slot.
|
|
@@ -6154,6 +4794,10 @@ export class Container {
|
|
|
6154
4794
|
* @throws
|
|
6155
4795
|
* Throws if either this container or `toContainer` are invalid
|
|
6156
4796
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
4797
|
+
*
|
|
4798
|
+
* {@link ContainerRulesError}
|
|
4799
|
+
*
|
|
4800
|
+
* {@link Error}
|
|
6157
4801
|
* @example moveBetweenContainers.ts
|
|
6158
4802
|
* ```typescript
|
|
6159
4803
|
* import { world, EntityInventoryComponent, EntityComponentTypes, DimensionLocation } from "@minecraft/server";
|
|
@@ -6184,19 +4828,6 @@ export class Container {
|
|
|
6184
4828
|
* ```
|
|
6185
4829
|
*/
|
|
6186
4830
|
moveItem(fromSlot: number, toSlot: number, toContainer: Container): void;
|
|
6187
|
-
/**
|
|
6188
|
-
* @beta
|
|
6189
|
-
* @remarks
|
|
6190
|
-
* Find the index of the last instance of an item inside the
|
|
6191
|
-
* container
|
|
6192
|
-
*
|
|
6193
|
-
* @param itemStack
|
|
6194
|
-
* The item to find.
|
|
6195
|
-
* @throws This function can throw errors.
|
|
6196
|
-
*
|
|
6197
|
-
* {@link InvalidContainerError}
|
|
6198
|
-
*/
|
|
6199
|
-
reverseFind(itemStack: ItemStack): number;
|
|
6200
4831
|
/**
|
|
6201
4832
|
* @remarks
|
|
6202
4833
|
* Sets an item stack within a particular slot.
|
|
@@ -6211,6 +4842,10 @@ export class Container {
|
|
|
6211
4842
|
* @throws
|
|
6212
4843
|
* Throws if the container is invalid or if the `slot` index is
|
|
6213
4844
|
* out of bounds.
|
|
4845
|
+
*
|
|
4846
|
+
* {@link ContainerRulesError}
|
|
4847
|
+
*
|
|
4848
|
+
* {@link Error}
|
|
6214
4849
|
*/
|
|
6215
4850
|
setItem(slot: number, itemStack?: ItemStack): void;
|
|
6216
4851
|
/**
|
|
@@ -6229,6 +4864,10 @@ export class Container {
|
|
|
6229
4864
|
* @throws
|
|
6230
4865
|
* Throws if either this container or `otherContainer` are
|
|
6231
4866
|
* invalid or if the `slot` or `otherSlot` are out of bounds.
|
|
4867
|
+
*
|
|
4868
|
+
* {@link ContainerRulesError}
|
|
4869
|
+
*
|
|
4870
|
+
* {@link Error}
|
|
6232
4871
|
*/
|
|
6233
4872
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): void;
|
|
6234
4873
|
/**
|
|
@@ -6250,6 +4889,10 @@ export class Container {
|
|
|
6250
4889
|
* @throws
|
|
6251
4890
|
* Throws if either this container or `toContainer` are invalid
|
|
6252
4891
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
4892
|
+
*
|
|
4893
|
+
* {@link ContainerRulesError}
|
|
4894
|
+
*
|
|
4895
|
+
* {@link Error}
|
|
6253
4896
|
* @example transferBetweenContainers.ts
|
|
6254
4897
|
* ```typescript
|
|
6255
4898
|
* import { world, EntityInventoryComponent, EntityComponentTypes, DimensionLocation } from "@minecraft/server";
|
|
@@ -6313,7 +4956,7 @@ export class ContainerSlot {
|
|
|
6313
4956
|
*/
|
|
6314
4957
|
readonly isStackable: boolean;
|
|
6315
4958
|
/**
|
|
6316
|
-
* @
|
|
4959
|
+
* @rc
|
|
6317
4960
|
* @remarks
|
|
6318
4961
|
* Returns whether the ContainerSlot is valid. The container
|
|
6319
4962
|
* slot is valid if the container exists and is loaded, and the
|
|
@@ -6584,160 +5227,64 @@ export class ContainerSlot {
|
|
|
6584
5227
|
*
|
|
6585
5228
|
* {@link Error}
|
|
6586
5229
|
*
|
|
6587
|
-
* {@link InvalidContainerSlotError}
|
|
6588
|
-
*/
|
|
6589
|
-
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
6590
|
-
/**
|
|
6591
|
-
* @beta
|
|
6592
|
-
* @remarks
|
|
6593
|
-
* Sets multiple dynamic properties with specific values.
|
|
6594
|
-
*
|
|
6595
|
-
* @param values
|
|
6596
|
-
* A Record of key value pairs of the dynamic properties to
|
|
6597
|
-
* set.
|
|
6598
|
-
* @throws This function can throw errors.
|
|
6599
|
-
*
|
|
6600
|
-
* {@link Error}
|
|
6601
|
-
*
|
|
6602
|
-
* {@link InvalidContainerSlotError}
|
|
6603
|
-
*/
|
|
6604
|
-
setDynamicProperties(values: Record<string, boolean | number | string | Vector3>): void;
|
|
6605
|
-
/**
|
|
6606
|
-
* @remarks
|
|
6607
|
-
* Sets a specified property to a value.
|
|
6608
|
-
*
|
|
6609
|
-
* @param identifier
|
|
6610
|
-
* The property identifier.
|
|
6611
|
-
* @param value
|
|
6612
|
-
* Data value of the property to set.
|
|
6613
|
-
* @throws
|
|
6614
|
-
* Throws if the slot's container is invalid.
|
|
6615
|
-
*
|
|
6616
|
-
* {@link Error}
|
|
6617
|
-
*
|
|
6618
|
-
* {@link InvalidContainerSlotError}
|
|
6619
|
-
*/
|
|
6620
|
-
setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void;
|
|
6621
|
-
/**
|
|
6622
|
-
* @remarks
|
|
6623
|
-
* Sets the given ItemStack in the slot, replacing any existing
|
|
6624
|
-
* item.
|
|
6625
|
-
*
|
|
6626
|
-
* This function can't be called in read-only mode.
|
|
6627
|
-
*
|
|
6628
|
-
* @param itemStack
|
|
6629
|
-
* The ItemStack to be placed in the slot.
|
|
6630
|
-
* @throws
|
|
6631
|
-
* Throws if the slot's container is invalid.
|
|
6632
|
-
*
|
|
6633
|
-
* {@link InvalidContainerSlotError}
|
|
6634
|
-
*/
|
|
6635
|
-
setItem(itemStack?: ItemStack): void;
|
|
6636
|
-
/**
|
|
6637
|
-
* @remarks
|
|
6638
|
-
* Sets the lore value - a secondary display string - for an
|
|
6639
|
-
* ItemStack.
|
|
6640
|
-
*
|
|
6641
|
-
* This function can't be called in read-only mode.
|
|
6642
|
-
*
|
|
6643
|
-
* @param loreList
|
|
6644
|
-
* A list of lore strings. Setting this argument to undefined
|
|
6645
|
-
* will clear the lore.
|
|
6646
|
-
* @throws
|
|
6647
|
-
* Throws if the slot's container is invalid.
|
|
6648
|
-
*
|
|
6649
|
-
* {@link Error}
|
|
6650
|
-
*
|
|
6651
|
-
* {@link InvalidContainerSlotError}
|
|
6652
|
-
*/
|
|
6653
|
-
setLore(loreList?: string[]): void;
|
|
6654
|
-
}
|
|
6655
|
-
|
|
6656
|
-
/**
|
|
6657
|
-
* @beta
|
|
6658
|
-
* Details about the origins of the command.
|
|
6659
|
-
*/
|
|
6660
|
-
export class CustomCommandOrigin {
|
|
6661
|
-
private constructor();
|
|
6662
|
-
/**
|
|
6663
|
-
* @remarks
|
|
6664
|
-
* If this command was initiated via an NPC, returns the entity
|
|
6665
|
-
* that initiated the NPC dialogue.
|
|
6666
|
-
*
|
|
6667
|
-
*/
|
|
6668
|
-
readonly initiator?: Entity;
|
|
6669
|
-
/**
|
|
6670
|
-
* @remarks
|
|
6671
|
-
* Source block if this command was triggered via a block
|
|
6672
|
-
* (e.g., a commandblock.)
|
|
6673
|
-
*
|
|
5230
|
+
* {@link InvalidContainerSlotError}
|
|
6674
5231
|
*/
|
|
6675
|
-
|
|
5232
|
+
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
6676
5233
|
/**
|
|
6677
5234
|
* @remarks
|
|
6678
|
-
*
|
|
6679
|
-
* (e.g., a NPC).
|
|
5235
|
+
* Sets a specified property to a value.
|
|
6680
5236
|
*
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
*
|
|
6685
|
-
*
|
|
5237
|
+
* @param identifier
|
|
5238
|
+
* The property identifier.
|
|
5239
|
+
* @param value
|
|
5240
|
+
* Data value of the property to set.
|
|
5241
|
+
* @throws
|
|
5242
|
+
* Throws if the slot's container is invalid.
|
|
5243
|
+
*
|
|
5244
|
+
* {@link Error}
|
|
6686
5245
|
*
|
|
5246
|
+
* {@link InvalidContainerSlotError}
|
|
6687
5247
|
*/
|
|
6688
|
-
|
|
6689
|
-
}
|
|
6690
|
-
|
|
6691
|
-
/**
|
|
6692
|
-
* @beta
|
|
6693
|
-
* Provides the functionality for registering custom commands.
|
|
6694
|
-
*/
|
|
6695
|
-
export class CustomCommandRegistry {
|
|
6696
|
-
private constructor();
|
|
5248
|
+
setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void;
|
|
6697
5249
|
/**
|
|
6698
5250
|
* @remarks
|
|
6699
|
-
*
|
|
6700
|
-
*
|
|
5251
|
+
* Sets the given ItemStack in the slot, replacing any existing
|
|
5252
|
+
* item.
|
|
6701
5253
|
*
|
|
6702
5254
|
* This function can't be called in read-only mode.
|
|
6703
5255
|
*
|
|
6704
|
-
*
|
|
6705
|
-
*
|
|
6706
|
-
* @
|
|
6707
|
-
*
|
|
6708
|
-
* @throws This function can throw errors.
|
|
6709
|
-
*
|
|
6710
|
-
* {@link CustomCommandError}
|
|
5256
|
+
* @param itemStack
|
|
5257
|
+
* The ItemStack to be placed in the slot.
|
|
5258
|
+
* @throws
|
|
5259
|
+
* Throws if the slot's container is invalid.
|
|
6711
5260
|
*
|
|
6712
|
-
* {@link
|
|
5261
|
+
* {@link ContainerRulesError}
|
|
6713
5262
|
*
|
|
6714
|
-
* {@link
|
|
5263
|
+
* {@link InvalidContainerSlotError}
|
|
6715
5264
|
*/
|
|
6716
|
-
|
|
6717
|
-
customCommand: CustomCommand,
|
|
6718
|
-
callback: (origin: CustomCommandOrigin, ...args: any[]) => CustomCommandResult | undefined,
|
|
6719
|
-
): void;
|
|
5265
|
+
setItem(itemStack?: ItemStack): void;
|
|
6720
5266
|
/**
|
|
6721
5267
|
* @remarks
|
|
6722
|
-
*
|
|
5268
|
+
* Sets the lore value - a secondary display string - for an
|
|
5269
|
+
* ItemStack.
|
|
6723
5270
|
*
|
|
6724
5271
|
* This function can't be called in read-only mode.
|
|
6725
5272
|
*
|
|
6726
|
-
*
|
|
6727
|
-
*
|
|
6728
|
-
*
|
|
6729
|
-
*
|
|
6730
|
-
*
|
|
5273
|
+
* @param loreList
|
|
5274
|
+
* A list of lore strings. Setting this argument to undefined
|
|
5275
|
+
* will clear the lore.
|
|
5276
|
+
* @throws
|
|
5277
|
+
* Throws if the slot's container is invalid.
|
|
6731
5278
|
*
|
|
6732
|
-
* {@link minecraftcommon.
|
|
5279
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
6733
5280
|
*
|
|
6734
|
-
* {@link
|
|
5281
|
+
* {@link InvalidContainerSlotError}
|
|
6735
5282
|
*/
|
|
6736
|
-
|
|
5283
|
+
setLore(loreList?: string[]): void;
|
|
6737
5284
|
}
|
|
6738
5285
|
|
|
6739
5286
|
/**
|
|
6740
|
-
* @
|
|
5287
|
+
* @rc
|
|
6741
5288
|
* Contains the custom component's JSON parameters
|
|
6742
5289
|
*/
|
|
6743
5290
|
export class CustomComponentParameters {
|
|
@@ -6944,36 +5491,10 @@ export class Dimension {
|
|
|
6944
5491
|
* {@link UnloadedChunksError}
|
|
6945
5492
|
*/
|
|
6946
5493
|
fillBlocks(
|
|
6947
|
-
volume: BlockVolumeBase
|
|
5494
|
+
volume: BlockVolumeBase,
|
|
6948
5495
|
block: BlockPermutation | BlockType | string,
|
|
6949
5496
|
options?: BlockFillOptions,
|
|
6950
5497
|
): ListBlockVolume;
|
|
6951
|
-
/**
|
|
6952
|
-
* @beta
|
|
6953
|
-
* @remarks
|
|
6954
|
-
* Finds the location of the closest biome of a particular
|
|
6955
|
-
* type. Note that the findClosestBiome operation can take some
|
|
6956
|
-
* time to complete, so avoid using many of these calls within
|
|
6957
|
-
* a particular tick.
|
|
6958
|
-
*
|
|
6959
|
-
* This function can't be called in read-only mode.
|
|
6960
|
-
*
|
|
6961
|
-
* @param pos
|
|
6962
|
-
* Starting location to look for a biome to find.
|
|
6963
|
-
* @param biomeToFind
|
|
6964
|
-
* Identifier of the biome to look for.
|
|
6965
|
-
* @param options
|
|
6966
|
-
* Additional selection criteria for a biome search.
|
|
6967
|
-
* @returns
|
|
6968
|
-
* Returns a location of the biome, or undefined if a biome
|
|
6969
|
-
* could not be found.
|
|
6970
|
-
* @throws This function can throw errors.
|
|
6971
|
-
*
|
|
6972
|
-
* {@link minecraftcommon.EngineError}
|
|
6973
|
-
*
|
|
6974
|
-
* {@link Error}
|
|
6975
|
-
*/
|
|
6976
|
-
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
6977
5498
|
/**
|
|
6978
5499
|
* @remarks
|
|
6979
5500
|
* Returns a block instance at the given location.
|
|
@@ -6999,18 +5520,34 @@ export class Dimension {
|
|
|
6999
5520
|
*/
|
|
7000
5521
|
getBlock(location: Vector3): Block | undefined;
|
|
7001
5522
|
/**
|
|
7002
|
-
* @
|
|
5523
|
+
* @rc
|
|
7003
5524
|
* @remarks
|
|
5525
|
+
* Gets the first block found above a given block location
|
|
5526
|
+
* based on the given options (by default will find the first
|
|
5527
|
+
* solid block above).
|
|
5528
|
+
*
|
|
7004
5529
|
* This function can't be called in read-only mode.
|
|
7005
5530
|
*
|
|
5531
|
+
* @param location
|
|
5532
|
+
* Location to retrieve the block above from.
|
|
5533
|
+
* @param options
|
|
5534
|
+
* The options to decide if a block is a valid result.
|
|
7006
5535
|
* @throws This function can throw errors.
|
|
7007
5536
|
*/
|
|
7008
5537
|
getBlockAbove(location: Vector3, options?: BlockRaycastOptions): Block | undefined;
|
|
7009
5538
|
/**
|
|
7010
|
-
* @
|
|
5539
|
+
* @rc
|
|
7011
5540
|
* @remarks
|
|
5541
|
+
* Gets the first block found below a given block location
|
|
5542
|
+
* based on the given options (by default will find the first
|
|
5543
|
+
* solid block below).
|
|
5544
|
+
*
|
|
7012
5545
|
* This function can't be called in read-only mode.
|
|
7013
5546
|
*
|
|
5547
|
+
* @param location
|
|
5548
|
+
* Location to retrieve the block below from.
|
|
5549
|
+
* @param options
|
|
5550
|
+
* The options to decide if a block is a valid result.
|
|
7014
5551
|
* @throws This function can throw errors.
|
|
7015
5552
|
*/
|
|
7016
5553
|
getBlockBelow(location: Vector3, options?: BlockRaycastOptions): Block | undefined;
|
|
@@ -7181,18 +5718,6 @@ export class Dimension {
|
|
|
7181
5718
|
* @throws This function can throw errors.
|
|
7182
5719
|
*/
|
|
7183
5720
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
7184
|
-
/**
|
|
7185
|
-
* @beta
|
|
7186
|
-
* @remarks
|
|
7187
|
-
* Returns the current weather.
|
|
7188
|
-
*
|
|
7189
|
-
* This function can't be called in read-only mode.
|
|
7190
|
-
*
|
|
7191
|
-
* @returns
|
|
7192
|
-
* Returns a WeatherType that explains the broad category of
|
|
7193
|
-
* weather that is currently going on.
|
|
7194
|
-
*/
|
|
7195
|
-
getWeather(): WeatherType;
|
|
7196
5721
|
/**
|
|
7197
5722
|
* @remarks
|
|
7198
5723
|
* Places the given feature into the dimension at the specified
|
|
@@ -7422,11 +5947,7 @@ export class Dimension {
|
|
|
7422
5947
|
* }
|
|
7423
5948
|
* ```
|
|
7424
5949
|
*/
|
|
7425
|
-
spawnEntity
|
|
7426
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
7427
|
-
location: Vector3,
|
|
7428
|
-
options?: SpawnEntityOptions,
|
|
7429
|
-
): Entity;
|
|
5950
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
7430
5951
|
/**
|
|
7431
5952
|
* @remarks
|
|
7432
5953
|
* Creates a new item stack as an entity at the specified
|
|
@@ -7592,7 +6113,7 @@ export class Effect {
|
|
|
7592
6113
|
*/
|
|
7593
6114
|
readonly duration: number;
|
|
7594
6115
|
/**
|
|
7595
|
-
* @
|
|
6116
|
+
* @rc
|
|
7596
6117
|
* @remarks
|
|
7597
6118
|
* Returns whether an effect instance is available for use in
|
|
7598
6119
|
* this context.
|
|
@@ -7910,7 +6431,7 @@ export class Entity {
|
|
|
7910
6431
|
*/
|
|
7911
6432
|
readonly isSwimming: boolean;
|
|
7912
6433
|
/**
|
|
7913
|
-
* @
|
|
6434
|
+
* @rc
|
|
7914
6435
|
* @remarks
|
|
7915
6436
|
* Returns whether the entity can be manipulated by script. A
|
|
7916
6437
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -7918,17 +6439,6 @@ export class Entity {
|
|
|
7918
6439
|
*
|
|
7919
6440
|
*/
|
|
7920
6441
|
readonly isValid: boolean;
|
|
7921
|
-
/**
|
|
7922
|
-
* @beta
|
|
7923
|
-
* @remarks
|
|
7924
|
-
* key for the localization of this entity's name used in .lang
|
|
7925
|
-
* files.
|
|
7926
|
-
*
|
|
7927
|
-
* @throws This property can throw when used.
|
|
7928
|
-
*
|
|
7929
|
-
* {@link InvalidEntityError}
|
|
7930
|
-
*/
|
|
7931
|
-
readonly localizationKey: string;
|
|
7932
6442
|
/**
|
|
7933
6443
|
* @remarks
|
|
7934
6444
|
* Current location of the entity.
|
|
@@ -7951,16 +6461,6 @@ export class Entity {
|
|
|
7951
6461
|
*
|
|
7952
6462
|
*/
|
|
7953
6463
|
readonly scoreboardIdentity?: ScoreboardIdentity;
|
|
7954
|
-
/**
|
|
7955
|
-
* @beta
|
|
7956
|
-
* @remarks
|
|
7957
|
-
* Retrieves or sets an entity that is used as the target of
|
|
7958
|
-
* AI-related behaviors, like attacking. If the entity
|
|
7959
|
-
* currently has no target returns undefined.
|
|
7960
|
-
*
|
|
7961
|
-
* @throws This property can throw when used.
|
|
7962
|
-
*/
|
|
7963
|
-
readonly target?: Entity;
|
|
7964
6464
|
/**
|
|
7965
6465
|
* @remarks
|
|
7966
6466
|
* Identifier of the type of the entity - for example,
|
|
@@ -8117,13 +6617,18 @@ export class Entity {
|
|
|
8117
6617
|
/**
|
|
8118
6618
|
* @remarks
|
|
8119
6619
|
* Applies impulse vector to the current velocity of the
|
|
8120
|
-
* entity.
|
|
6620
|
+
* entity. Note that this method throws an error if called on
|
|
6621
|
+
* Players and will have no impact.
|
|
8121
6622
|
*
|
|
8122
6623
|
* This function can't be called in read-only mode.
|
|
8123
6624
|
*
|
|
8124
6625
|
* @param vector
|
|
8125
6626
|
* Impulse vector.
|
|
8126
6627
|
* @throws This function can throw errors.
|
|
6628
|
+
*
|
|
6629
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
6630
|
+
*
|
|
6631
|
+
* {@link Error}
|
|
8127
6632
|
* @example applyImpulse.ts
|
|
8128
6633
|
* ```typescript
|
|
8129
6634
|
* import { DimensionLocation } from "@minecraft/server";
|
|
@@ -8184,7 +6689,8 @@ export class Entity {
|
|
|
8184
6689
|
/**
|
|
8185
6690
|
* @remarks
|
|
8186
6691
|
* Sets the current velocity of the Entity to zero. Note that
|
|
8187
|
-
* this method
|
|
6692
|
+
* this method throws an error if called on Players and will
|
|
6693
|
+
* have no impact.
|
|
8188
6694
|
*
|
|
8189
6695
|
* This function can't be called in read-only mode.
|
|
8190
6696
|
*
|
|
@@ -8503,7 +7009,7 @@ export class Entity {
|
|
|
8503
7009
|
*/
|
|
8504
7010
|
kill(): boolean;
|
|
8505
7011
|
/**
|
|
8506
|
-
* @
|
|
7012
|
+
* @rc
|
|
8507
7013
|
* @remarks
|
|
8508
7014
|
* Sets the rotation of the entity to face a target location.
|
|
8509
7015
|
* Both pitch and yaw will be set, if applicable, such as for
|
|
@@ -8628,17 +7134,6 @@ export class Entity {
|
|
|
8628
7134
|
* {@link InvalidEntityError}
|
|
8629
7135
|
*/
|
|
8630
7136
|
runCommand(commandString: string): CommandResult;
|
|
8631
|
-
/**
|
|
8632
|
-
* @beta
|
|
8633
|
-
* @remarks
|
|
8634
|
-
* Sets multiple dynamic properties with specific values.
|
|
8635
|
-
*
|
|
8636
|
-
* @param values
|
|
8637
|
-
* A Record of key value pairs of the dynamic properties to
|
|
8638
|
-
* set.
|
|
8639
|
-
* @throws This function can throw errors.
|
|
8640
|
-
*/
|
|
8641
|
-
setDynamicProperties(values: Record<string, boolean | number | string | Vector3>): void;
|
|
8642
7137
|
/**
|
|
8643
7138
|
* @remarks
|
|
8644
7139
|
* Sets a specified property to a value.
|
|
@@ -8989,12 +7484,17 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
8989
7484
|
resetToMinValue(): void;
|
|
8990
7485
|
/**
|
|
8991
7486
|
* @remarks
|
|
8992
|
-
* Sets the current value of this attribute.
|
|
8993
|
-
* will be clamped to the range of this attribute.
|
|
7487
|
+
* Sets the current value of this attribute.
|
|
8994
7488
|
*
|
|
8995
7489
|
* This function can't be called in read-only mode.
|
|
8996
7490
|
*
|
|
8997
|
-
* @throws
|
|
7491
|
+
* @throws
|
|
7492
|
+
* If the value is out of bounds, an ArgumentOutOfBounds Error
|
|
7493
|
+
* is thrown.
|
|
7494
|
+
*
|
|
7495
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
7496
|
+
*
|
|
7497
|
+
* {@link InvalidEntityError}
|
|
8998
7498
|
*/
|
|
8999
7499
|
setCurrentValue(value: number): boolean;
|
|
9000
7500
|
}
|
|
@@ -9021,18 +7521,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
9021
7521
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9022
7522
|
export class EntityBreathableComponent extends EntityComponent {
|
|
9023
7523
|
private constructor();
|
|
9024
|
-
/**
|
|
9025
|
-
* @beta
|
|
9026
|
-
* @remarks
|
|
9027
|
-
* The current air supply of the entity.
|
|
9028
|
-
*
|
|
9029
|
-
* This property can't be edited in read-only mode.
|
|
9030
|
-
*
|
|
9031
|
-
* @throws
|
|
9032
|
-
* Will throw an error if the air supply is out of bounds
|
|
9033
|
-
* [suffocationTime, maxAirSupply].
|
|
9034
|
-
*/
|
|
9035
|
-
airSupply: number;
|
|
9036
7524
|
/**
|
|
9037
7525
|
* @remarks
|
|
9038
7526
|
* If true, this entity can breathe in air.
|
|
@@ -9061,14 +7549,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
9061
7549
|
* @throws This property can throw when used.
|
|
9062
7550
|
*/
|
|
9063
7551
|
readonly breathesWater: boolean;
|
|
9064
|
-
/**
|
|
9065
|
-
* @beta
|
|
9066
|
-
* @remarks
|
|
9067
|
-
* If true, the entity is able to breathe.
|
|
9068
|
-
*
|
|
9069
|
-
* @throws This property can throw when used.
|
|
9070
|
-
*/
|
|
9071
|
-
readonly canBreathe: boolean;
|
|
9072
7552
|
/**
|
|
9073
7553
|
* @remarks
|
|
9074
7554
|
* If true, this entity will have visible bubbles while in
|
|
@@ -9928,32 +8408,6 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
9928
8408
|
static readonly componentId = 'minecraft:item';
|
|
9929
8409
|
}
|
|
9930
8410
|
|
|
9931
|
-
/**
|
|
9932
|
-
* @beta
|
|
9933
|
-
* This type is usable for iterating over a set of entities.
|
|
9934
|
-
* This means it can be used in statements like for...of
|
|
9935
|
-
* statements, Array.from(iterator), and more.
|
|
9936
|
-
*/
|
|
9937
|
-
export class EntityIterator implements Iterable<Entity> {
|
|
9938
|
-
private constructor();
|
|
9939
|
-
/**
|
|
9940
|
-
* @remarks
|
|
9941
|
-
* This function can't be called in read-only mode.
|
|
9942
|
-
*
|
|
9943
|
-
*/
|
|
9944
|
-
[Symbol.iterator](): Iterator<Entity>;
|
|
9945
|
-
/**
|
|
9946
|
-
* @remarks
|
|
9947
|
-
* Retrieves the next item in this iteration. The resulting
|
|
9948
|
-
* IteratorResult contains .done and .value properties which
|
|
9949
|
-
* can be used to see the next Entity in the iteration.
|
|
9950
|
-
*
|
|
9951
|
-
* This function can't be called in read-only mode.
|
|
9952
|
-
*
|
|
9953
|
-
*/
|
|
9954
|
-
next(): IteratorResult<Entity>;
|
|
9955
|
-
}
|
|
9956
|
-
|
|
9957
8411
|
/**
|
|
9958
8412
|
* Defines the base movement speed in lava of this entity.
|
|
9959
8413
|
*/
|
|
@@ -10459,42 +8913,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
10459
8913
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
10460
8914
|
}
|
|
10461
8915
|
|
|
10462
|
-
/**
|
|
10463
|
-
* @beta
|
|
10464
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
10465
|
-
* name, and dialogue interactions.
|
|
10466
|
-
*/
|
|
10467
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10468
|
-
export class EntityNpcComponent extends EntityComponent {
|
|
10469
|
-
private constructor();
|
|
10470
|
-
/**
|
|
10471
|
-
* @remarks
|
|
10472
|
-
* The DialogueScene that is opened when players first interact
|
|
10473
|
-
* with the NPC.
|
|
10474
|
-
*
|
|
10475
|
-
* This property can't be edited in read-only mode.
|
|
10476
|
-
*
|
|
10477
|
-
*/
|
|
10478
|
-
defaultScene: string;
|
|
10479
|
-
/**
|
|
10480
|
-
* @remarks
|
|
10481
|
-
* The name of the NPC as it is displayed to players.
|
|
10482
|
-
*
|
|
10483
|
-
* This property can't be edited in read-only mode.
|
|
10484
|
-
*
|
|
10485
|
-
*/
|
|
10486
|
-
name: string;
|
|
10487
|
-
/**
|
|
10488
|
-
* @remarks
|
|
10489
|
-
* The index of the skin the NPC will use.
|
|
10490
|
-
*
|
|
10491
|
-
* This property can't be edited in read-only mode.
|
|
10492
|
-
*
|
|
10493
|
-
*/
|
|
10494
|
-
skinIndex: number;
|
|
10495
|
-
static readonly componentId = 'minecraft:npc';
|
|
10496
|
-
}
|
|
10497
|
-
|
|
10498
8916
|
/**
|
|
10499
8917
|
* When present on an entity, this entity is on fire.
|
|
10500
8918
|
* @example setOnFire.ts
|
|
@@ -11340,26 +9758,6 @@ export class EntityTypeFamilyComponent extends EntityComponent {
|
|
|
11340
9758
|
hasTypeFamily(typeFamily: string): boolean;
|
|
11341
9759
|
}
|
|
11342
9760
|
|
|
11343
|
-
/**
|
|
11344
|
-
* @beta
|
|
11345
|
-
* An iterator that loops through available entity types.
|
|
11346
|
-
*/
|
|
11347
|
-
export class EntityTypeIterator implements Iterable<EntityType> {
|
|
11348
|
-
private constructor();
|
|
11349
|
-
/**
|
|
11350
|
-
* @remarks
|
|
11351
|
-
* This function can't be called in read-only mode.
|
|
11352
|
-
*
|
|
11353
|
-
*/
|
|
11354
|
-
[Symbol.iterator](): Iterator<EntityType>;
|
|
11355
|
-
/**
|
|
11356
|
-
* @remarks
|
|
11357
|
-
* This function can't be called in read-only mode.
|
|
11358
|
-
*
|
|
11359
|
-
*/
|
|
11360
|
-
next(): IteratorResult<EntityType>;
|
|
11361
|
-
}
|
|
11362
|
-
|
|
11363
9761
|
/**
|
|
11364
9762
|
* Used for accessing all entity types currently available for
|
|
11365
9763
|
* use within the world.
|
|
@@ -11371,7 +9769,7 @@ export class EntityTypes {
|
|
|
11371
9769
|
* Retrieves an entity type using a string-based identifier.
|
|
11372
9770
|
*
|
|
11373
9771
|
*/
|
|
11374
|
-
static get
|
|
9772
|
+
static get(identifier: string): EntityType | undefined;
|
|
11375
9773
|
/**
|
|
11376
9774
|
* @remarks
|
|
11377
9775
|
* Retrieves a set of all entity types within this world.
|
|
@@ -11596,14 +9994,6 @@ export class FeedItemEffect {
|
|
|
11596
9994
|
readonly name: string;
|
|
11597
9995
|
}
|
|
11598
9996
|
|
|
11599
|
-
/**
|
|
11600
|
-
* @beta
|
|
11601
|
-
* Represents a set of filters for when an event should occur.
|
|
11602
|
-
*/
|
|
11603
|
-
export class FilterGroup {
|
|
11604
|
-
private constructor();
|
|
11605
|
-
}
|
|
11606
|
-
|
|
11607
9997
|
/**
|
|
11608
9998
|
* Represents constants related to fluid containers.
|
|
11609
9999
|
*/
|
|
@@ -11790,13 +10180,6 @@ export class GameRules {
|
|
|
11790
10180
|
*
|
|
11791
10181
|
*/
|
|
11792
10182
|
keepInventory: boolean;
|
|
11793
|
-
/**
|
|
11794
|
-
* @beta
|
|
11795
|
-
* @remarks
|
|
11796
|
-
* This property can't be edited in read-only mode.
|
|
11797
|
-
*
|
|
11798
|
-
*/
|
|
11799
|
-
locatorBar: boolean;
|
|
11800
10183
|
/**
|
|
11801
10184
|
* @remarks
|
|
11802
10185
|
* This property can't be edited in read-only mode.
|
|
@@ -12325,12 +10708,13 @@ export class ItemCooldownComponent extends ItemComponent {
|
|
|
12325
10708
|
}
|
|
12326
10709
|
|
|
12327
10710
|
/**
|
|
12328
|
-
* @
|
|
10711
|
+
* @rc
|
|
12329
10712
|
* An instance of a custom component on an item.
|
|
12330
10713
|
*/
|
|
12331
10714
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12332
10715
|
export class ItemCustomComponentInstance extends ItemComponent {
|
|
12333
10716
|
private constructor();
|
|
10717
|
+
readonly customComponentParameters: CustomComponentParameters;
|
|
12334
10718
|
}
|
|
12335
10719
|
|
|
12336
10720
|
/**
|
|
@@ -12412,7 +10796,7 @@ export class ItemDurabilityComponent extends ItemComponent {
|
|
|
12412
10796
|
}
|
|
12413
10797
|
|
|
12414
10798
|
/**
|
|
12415
|
-
* @
|
|
10799
|
+
* @rc
|
|
12416
10800
|
* When present on an item, this item can be dyed.
|
|
12417
10801
|
*/
|
|
12418
10802
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -12646,37 +11030,6 @@ export class ItemFoodComponent extends ItemComponent {
|
|
|
12646
11030
|
static readonly componentId = 'minecraft:food';
|
|
12647
11031
|
}
|
|
12648
11032
|
|
|
12649
|
-
/**
|
|
12650
|
-
* @beta
|
|
12651
|
-
* When present on an item, this item is a potion item.
|
|
12652
|
-
*/
|
|
12653
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12654
|
-
export class ItemPotionComponent extends ItemComponent {
|
|
12655
|
-
private constructor();
|
|
12656
|
-
/**
|
|
12657
|
-
* @remarks
|
|
12658
|
-
* The PotionEffectType associated with the potion item.
|
|
12659
|
-
*
|
|
12660
|
-
* @throws This property can throw when used.
|
|
12661
|
-
*/
|
|
12662
|
-
readonly potionEffectType: PotionEffectType;
|
|
12663
|
-
/**
|
|
12664
|
-
* @remarks
|
|
12665
|
-
* The PotionLiquidType associated with the potion item.
|
|
12666
|
-
*
|
|
12667
|
-
* @throws This property can throw when used.
|
|
12668
|
-
*/
|
|
12669
|
-
readonly potionLiquidType: PotionLiquidType;
|
|
12670
|
-
/**
|
|
12671
|
-
* @remarks
|
|
12672
|
-
* The PotionModifierType associated with the potion item.
|
|
12673
|
-
*
|
|
12674
|
-
* @throws This property can throw when used.
|
|
12675
|
-
*/
|
|
12676
|
-
readonly potionModifierType: PotionModifierType;
|
|
12677
|
-
static readonly componentId = 'minecraft:potion';
|
|
12678
|
-
}
|
|
12679
|
-
|
|
12680
11033
|
/**
|
|
12681
11034
|
* Contains information related to a chargeable item when the
|
|
12682
11035
|
* player has finished using the item and released the build
|
|
@@ -12837,17 +11190,6 @@ export class ItemStack {
|
|
|
12837
11190
|
*
|
|
12838
11191
|
*/
|
|
12839
11192
|
keepOnDeath: boolean;
|
|
12840
|
-
/**
|
|
12841
|
-
* @beta
|
|
12842
|
-
* @remarks
|
|
12843
|
-
* key for the localization of this items's name used in .lang
|
|
12844
|
-
* files.
|
|
12845
|
-
*
|
|
12846
|
-
* @throws This property can throw when used.
|
|
12847
|
-
*
|
|
12848
|
-
* {@link minecraftcommon.EngineError}
|
|
12849
|
-
*/
|
|
12850
|
-
readonly localizationKey: string;
|
|
12851
11193
|
/**
|
|
12852
11194
|
* @remarks
|
|
12853
11195
|
* Gets or sets the item's lock mode. The default value is
|
|
@@ -13163,17 +11505,6 @@ export class ItemStack {
|
|
|
13163
11505
|
* ```
|
|
13164
11506
|
*/
|
|
13165
11507
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
13166
|
-
/**
|
|
13167
|
-
* @beta
|
|
13168
|
-
* @remarks
|
|
13169
|
-
* Sets multiple dynamic properties with specific values.
|
|
13170
|
-
*
|
|
13171
|
-
* @param values
|
|
13172
|
-
* A Record of key value pairs of the dynamic properties to
|
|
13173
|
-
* set.
|
|
13174
|
-
* @throws This function can throw errors.
|
|
13175
|
-
*/
|
|
13176
|
-
setDynamicProperties(values: Record<string, boolean | number | string | Vector3>): void;
|
|
13177
11508
|
/**
|
|
13178
11509
|
* @remarks
|
|
13179
11510
|
* Sets a specified property to a value. Note: This function
|
|
@@ -13200,6 +11531,8 @@ export class ItemStack {
|
|
|
13200
11531
|
* new line. The maximum lore line count is 20. The maximum
|
|
13201
11532
|
* lore line length is 50 characters.
|
|
13202
11533
|
* @throws This function can throw errors.
|
|
11534
|
+
*
|
|
11535
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
13203
11536
|
* @example diamondAwesomeSword.ts
|
|
13204
11537
|
* ```typescript
|
|
13205
11538
|
* import { EntityComponentTypes, ItemStack, Player } from '@minecraft/server';
|
|
@@ -13223,16 +11556,6 @@ export class ItemStack {
|
|
|
13223
11556
|
* ```
|
|
13224
11557
|
*/
|
|
13225
11558
|
setLore(loreList?: string[]): void;
|
|
13226
|
-
/**
|
|
13227
|
-
* @beta
|
|
13228
|
-
* @remarks
|
|
13229
|
-
* Helper function for creating potion items.
|
|
13230
|
-
*
|
|
13231
|
-
* This function can't be called in read-only mode.
|
|
13232
|
-
*
|
|
13233
|
-
* @throws This function can throw errors.
|
|
13234
|
-
*/
|
|
13235
|
-
static createPotion(options: PotionOptions): ItemStack;
|
|
13236
11559
|
}
|
|
13237
11560
|
|
|
13238
11561
|
/**
|
|
@@ -13733,7 +12056,7 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
13733
12056
|
export class LeverActionAfterEventSignal {
|
|
13734
12057
|
private constructor();
|
|
13735
12058
|
/**
|
|
13736
|
-
* @
|
|
12059
|
+
* @rc
|
|
13737
12060
|
* @remarks
|
|
13738
12061
|
* Adds a callback that will be called when a lever is moved
|
|
13739
12062
|
* (activates or deactivates).
|
|
@@ -13745,7 +12068,7 @@ export class LeverActionAfterEventSignal {
|
|
|
13745
12068
|
*/
|
|
13746
12069
|
subscribe(callback: (arg0: LeverActionAfterEvent) => void): (arg0: LeverActionAfterEvent) => void;
|
|
13747
12070
|
/**
|
|
13748
|
-
* @
|
|
12071
|
+
* @rc
|
|
13749
12072
|
* @remarks
|
|
13750
12073
|
* Removes a callback from being called when a lever is moved
|
|
13751
12074
|
* (activates or deactivates).
|
|
@@ -13788,34 +12111,7 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
13788
12111
|
* @param locations
|
|
13789
12112
|
* Array of block locations to be removed from container.
|
|
13790
12113
|
*/
|
|
13791
|
-
remove(locations: Vector3[]): void;
|
|
13792
|
-
}
|
|
13793
|
-
|
|
13794
|
-
/**
|
|
13795
|
-
* @beta
|
|
13796
|
-
* A specific currently-internal event used for passing
|
|
13797
|
-
* messages from client to server.
|
|
13798
|
-
*/
|
|
13799
|
-
export class MessageReceiveAfterEvent {
|
|
13800
|
-
private constructor();
|
|
13801
|
-
/**
|
|
13802
|
-
* @remarks
|
|
13803
|
-
* The message identifier.
|
|
13804
|
-
*
|
|
13805
|
-
*/
|
|
13806
|
-
readonly id: string;
|
|
13807
|
-
/**
|
|
13808
|
-
* @remarks
|
|
13809
|
-
* The message.
|
|
13810
|
-
*
|
|
13811
|
-
*/
|
|
13812
|
-
readonly message: string;
|
|
13813
|
-
/**
|
|
13814
|
-
* @remarks
|
|
13815
|
-
* The player who sent the message.
|
|
13816
|
-
*
|
|
13817
|
-
*/
|
|
13818
|
-
readonly player: Player;
|
|
12114
|
+
remove(locations: Vector3[]): void;
|
|
13819
12115
|
}
|
|
13820
12116
|
|
|
13821
12117
|
/**
|
|
@@ -14032,7 +12328,7 @@ export class Player extends Entity {
|
|
|
14032
12328
|
*/
|
|
14033
12329
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
14034
12330
|
/**
|
|
14035
|
-
* @
|
|
12331
|
+
* @rc
|
|
14036
12332
|
* @remarks
|
|
14037
12333
|
* Gets the current graphics mode of the player's client. This
|
|
14038
12334
|
* can be changed in the Video section of the settings menu
|
|
@@ -14173,27 +12469,6 @@ export class Player extends Entity {
|
|
|
14173
12469
|
* Throws if the entity is invalid.
|
|
14174
12470
|
*/
|
|
14175
12471
|
clearPropertyOverridesForEntity(targetEntity: Entity): void;
|
|
14176
|
-
/**
|
|
14177
|
-
* @beta
|
|
14178
|
-
* @remarks
|
|
14179
|
-
* Eats an item, providing the item's hunger and saturation
|
|
14180
|
-
* effects to the player. Can only be used on food items.
|
|
14181
|
-
*
|
|
14182
|
-
* This function can't be called in read-only mode.
|
|
14183
|
-
*
|
|
14184
|
-
* @param itemStack
|
|
14185
|
-
* The item to eat.
|
|
14186
|
-
* @throws
|
|
14187
|
-
* Throws if the item is not a food item.
|
|
14188
|
-
*/
|
|
14189
|
-
eatItem(itemStack: ItemStack): void;
|
|
14190
|
-
/**
|
|
14191
|
-
* @beta
|
|
14192
|
-
* @remarks
|
|
14193
|
-
* The player's aim-assist settings.
|
|
14194
|
-
*
|
|
14195
|
-
*/
|
|
14196
|
-
getAimAssist(): PlayerAimAssist;
|
|
14197
12472
|
/**
|
|
14198
12473
|
* @remarks
|
|
14199
12474
|
* Retrieves the active gamemode for this player, if specified.
|
|
@@ -14226,14 +12501,6 @@ export class Player extends Entity {
|
|
|
14226
12501
|
* @throws This function can throw errors.
|
|
14227
12502
|
*/
|
|
14228
12503
|
getTotalXp(): number;
|
|
14229
|
-
/**
|
|
14230
|
-
* @beta
|
|
14231
|
-
* @remarks
|
|
14232
|
-
* Returns true if this player has operator-level permissions.
|
|
14233
|
-
*
|
|
14234
|
-
* @throws This function can throw errors.
|
|
14235
|
-
*/
|
|
14236
|
-
isOp(): boolean;
|
|
14237
12504
|
/**
|
|
14238
12505
|
* @remarks
|
|
14239
12506
|
* Plays a music track that only this particular player can
|
|
@@ -14287,17 +12554,6 @@ export class Player extends Entity {
|
|
|
14287
12554
|
* ```
|
|
14288
12555
|
*/
|
|
14289
12556
|
playSound(soundId: string, soundOptions?: PlayerSoundOptions): void;
|
|
14290
|
-
/**
|
|
14291
|
-
* @beta
|
|
14292
|
-
* @remarks
|
|
14293
|
-
* This is an internal-facing method for posting a system
|
|
14294
|
-
* message to downstream clients.
|
|
14295
|
-
*
|
|
14296
|
-
* This function can't be called in read-only mode.
|
|
14297
|
-
*
|
|
14298
|
-
* @throws This function can throw errors.
|
|
14299
|
-
*/
|
|
14300
|
-
postClientMessage(id: string, value: string): void;
|
|
14301
12557
|
/**
|
|
14302
12558
|
* @remarks
|
|
14303
12559
|
* Queues an additional music track that only this particular
|
|
@@ -14445,17 +12701,6 @@ export class Player extends Entity {
|
|
|
14445
12701
|
* @throws This function can throw errors.
|
|
14446
12702
|
*/
|
|
14447
12703
|
setGameMode(gameMode?: GameMode): void;
|
|
14448
|
-
/**
|
|
14449
|
-
* @beta
|
|
14450
|
-
* @remarks
|
|
14451
|
-
* Will change the specified players permissions, and whether
|
|
14452
|
-
* they are operator or not.
|
|
14453
|
-
*
|
|
14454
|
-
* This function can't be called in read-only mode.
|
|
14455
|
-
*
|
|
14456
|
-
* @throws This function can throw errors.
|
|
14457
|
-
*/
|
|
14458
|
-
setOp(isOp: boolean): void;
|
|
14459
12704
|
/**
|
|
14460
12705
|
* @remarks
|
|
14461
12706
|
* For this player, overrides an Entity Property on the target
|
|
@@ -14571,45 +12816,6 @@ export class Player extends Entity {
|
|
|
14571
12816
|
stopMusic(): void;
|
|
14572
12817
|
}
|
|
14573
12818
|
|
|
14574
|
-
/**
|
|
14575
|
-
* @beta
|
|
14576
|
-
* A container for APIs related to player aim-assist.
|
|
14577
|
-
*/
|
|
14578
|
-
export class PlayerAimAssist {
|
|
14579
|
-
private constructor();
|
|
14580
|
-
/**
|
|
14581
|
-
* @remarks
|
|
14582
|
-
* The player's currently active aim-assist settings, or
|
|
14583
|
-
* undefined if not active.
|
|
14584
|
-
*
|
|
14585
|
-
*/
|
|
14586
|
-
readonly settings?: PlayerAimAssistSettings;
|
|
14587
|
-
/**
|
|
14588
|
-
* @remarks
|
|
14589
|
-
* Sets the player's aim-assist settings.
|
|
14590
|
-
*
|
|
14591
|
-
* This function can't be called in read-only mode.
|
|
14592
|
-
*
|
|
14593
|
-
* @param settings
|
|
14594
|
-
* Aim-assist settings to activate for the player, if undefined
|
|
14595
|
-
* aim-assist will be disabled.
|
|
14596
|
-
* @throws This function can throw errors.
|
|
14597
|
-
*
|
|
14598
|
-
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
14599
|
-
*
|
|
14600
|
-
* {@link minecraftcommon.EngineError}
|
|
14601
|
-
*
|
|
14602
|
-
* {@link Error}
|
|
14603
|
-
*
|
|
14604
|
-
* {@link minecraftcommon.InvalidArgumentError}
|
|
14605
|
-
*
|
|
14606
|
-
* {@link InvalidEntityError}
|
|
14607
|
-
*
|
|
14608
|
-
* {@link NamespaceNameError}
|
|
14609
|
-
*/
|
|
14610
|
-
set(settings?: PlayerAimAssistSettings): void;
|
|
14611
|
-
}
|
|
14612
|
-
|
|
14613
12819
|
/**
|
|
14614
12820
|
* Contains information regarding an event after a player
|
|
14615
12821
|
* breaks a block.
|
|
@@ -15485,32 +13691,6 @@ export class PlayerInteractWithEntityBeforeEventSignal {
|
|
|
15485
13691
|
unsubscribe(callback: (arg0: PlayerInteractWithEntityBeforeEvent) => void): void;
|
|
15486
13692
|
}
|
|
15487
13693
|
|
|
15488
|
-
/**
|
|
15489
|
-
* @beta
|
|
15490
|
-
* This type is usable for iterating over a set of players.
|
|
15491
|
-
* This means it can be used in statements like for...of
|
|
15492
|
-
* statements, Array.from(iterator), and more.
|
|
15493
|
-
*/
|
|
15494
|
-
export class PlayerIterator implements Iterable<Player> {
|
|
15495
|
-
private constructor();
|
|
15496
|
-
/**
|
|
15497
|
-
* @remarks
|
|
15498
|
-
* This function can't be called in read-only mode.
|
|
15499
|
-
*
|
|
15500
|
-
*/
|
|
15501
|
-
[Symbol.iterator](): Iterator<Player>;
|
|
15502
|
-
/**
|
|
15503
|
-
* @remarks
|
|
15504
|
-
* Retrieves the next item in this iteration. The resulting
|
|
15505
|
-
* IteratorResult contains .done and .value properties which
|
|
15506
|
-
* can be used to see the next Player in the iteration.
|
|
15507
|
-
*
|
|
15508
|
-
* This function can't be called in read-only mode.
|
|
15509
|
-
*
|
|
15510
|
-
*/
|
|
15511
|
-
next(): IteratorResult<Player>;
|
|
15512
|
-
}
|
|
15513
|
-
|
|
15514
13694
|
/**
|
|
15515
13695
|
* Contains information regarding a player that has joined.
|
|
15516
13696
|
* See the playerSpawn event for more detailed information that
|
|
@@ -15540,7 +13720,7 @@ export class PlayerJoinAfterEvent {
|
|
|
15540
13720
|
export class PlayerJoinAfterEventSignal {
|
|
15541
13721
|
private constructor();
|
|
15542
13722
|
/**
|
|
15543
|
-
* @
|
|
13723
|
+
* @rc
|
|
15544
13724
|
* @remarks
|
|
15545
13725
|
* Adds a callback that will be called when a player joins the
|
|
15546
13726
|
* world.
|
|
@@ -15552,7 +13732,7 @@ export class PlayerJoinAfterEventSignal {
|
|
|
15552
13732
|
*/
|
|
15553
13733
|
subscribe(callback: (arg0: PlayerJoinAfterEvent) => void): (arg0: PlayerJoinAfterEvent) => void;
|
|
15554
13734
|
/**
|
|
15555
|
-
* @
|
|
13735
|
+
* @rc
|
|
15556
13736
|
* @remarks
|
|
15557
13737
|
* Removes a callback from being called when a player joins the
|
|
15558
13738
|
* world.
|
|
@@ -15593,7 +13773,7 @@ export class PlayerLeaveAfterEvent {
|
|
|
15593
13773
|
export class PlayerLeaveAfterEventSignal {
|
|
15594
13774
|
private constructor();
|
|
15595
13775
|
/**
|
|
15596
|
-
* @
|
|
13776
|
+
* @rc
|
|
15597
13777
|
* @remarks
|
|
15598
13778
|
* Adds a callback that will be called when a player leaves the
|
|
15599
13779
|
* world.
|
|
@@ -15605,7 +13785,7 @@ export class PlayerLeaveAfterEventSignal {
|
|
|
15605
13785
|
*/
|
|
15606
13786
|
subscribe(callback: (arg0: PlayerLeaveAfterEvent) => void): (arg0: PlayerLeaveAfterEvent) => void;
|
|
15607
13787
|
/**
|
|
15608
|
-
* @
|
|
13788
|
+
* @rc
|
|
15609
13789
|
* @remarks
|
|
15610
13790
|
* Removes a callback from being called when a player leaves
|
|
15611
13791
|
* the world.
|
|
@@ -15710,81 +13890,6 @@ export class PlayerPlaceBlockAfterEventSignal {
|
|
|
15710
13890
|
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
15711
13891
|
}
|
|
15712
13892
|
|
|
15713
|
-
/**
|
|
15714
|
-
* @beta
|
|
15715
|
-
* Contains information regarding an event before a player
|
|
15716
|
-
* places a block.
|
|
15717
|
-
*/
|
|
15718
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15719
|
-
export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
|
|
15720
|
-
private constructor();
|
|
15721
|
-
/**
|
|
15722
|
-
* @remarks
|
|
15723
|
-
* If set to true, cancels the block place event.
|
|
15724
|
-
*
|
|
15725
|
-
*/
|
|
15726
|
-
cancel: boolean;
|
|
15727
|
-
/**
|
|
15728
|
-
* @remarks
|
|
15729
|
-
* The face of the block that the new block is being placed on.
|
|
15730
|
-
*
|
|
15731
|
-
*/
|
|
15732
|
-
readonly face: Direction;
|
|
15733
|
-
/**
|
|
15734
|
-
* @remarks
|
|
15735
|
-
* Location relative to the bottom north-west corner of the
|
|
15736
|
-
* block where the new block is being placed onto.
|
|
15737
|
-
*
|
|
15738
|
-
*/
|
|
15739
|
-
readonly faceLocation: Vector3;
|
|
15740
|
-
/**
|
|
15741
|
-
* @remarks
|
|
15742
|
-
* The block permutation that is being placed.
|
|
15743
|
-
*
|
|
15744
|
-
*/
|
|
15745
|
-
readonly permutationBeingPlaced: BlockPermutation;
|
|
15746
|
-
/**
|
|
15747
|
-
* @remarks
|
|
15748
|
-
* Player that is placing the block for this event.
|
|
15749
|
-
*
|
|
15750
|
-
*/
|
|
15751
|
-
readonly player: Player;
|
|
15752
|
-
}
|
|
15753
|
-
|
|
15754
|
-
/**
|
|
15755
|
-
* @beta
|
|
15756
|
-
* Manages callbacks that are connected to before a block is
|
|
15757
|
-
* placed by a player.
|
|
15758
|
-
*/
|
|
15759
|
-
export class PlayerPlaceBlockBeforeEventSignal {
|
|
15760
|
-
private constructor();
|
|
15761
|
-
/**
|
|
15762
|
-
* @remarks
|
|
15763
|
-
* Adds a callback that will be called before a block is placed
|
|
15764
|
-
* by a player.
|
|
15765
|
-
*
|
|
15766
|
-
* This function can't be called in read-only mode.
|
|
15767
|
-
*
|
|
15768
|
-
* This function can be called in early-execution mode.
|
|
15769
|
-
*
|
|
15770
|
-
*/
|
|
15771
|
-
subscribe(
|
|
15772
|
-
callback: (arg0: PlayerPlaceBlockBeforeEvent) => void,
|
|
15773
|
-
options?: BlockEventOptions,
|
|
15774
|
-
): (arg0: PlayerPlaceBlockBeforeEvent) => void;
|
|
15775
|
-
/**
|
|
15776
|
-
* @remarks
|
|
15777
|
-
* Removes a callback from being called before an block is
|
|
15778
|
-
* placed by a player.
|
|
15779
|
-
*
|
|
15780
|
-
* This function can't be called in read-only mode.
|
|
15781
|
-
*
|
|
15782
|
-
* This function can be called in early-execution mode.
|
|
15783
|
-
*
|
|
15784
|
-
*/
|
|
15785
|
-
unsubscribe(callback: (arg0: PlayerPlaceBlockBeforeEvent) => void): void;
|
|
15786
|
-
}
|
|
15787
|
-
|
|
15788
13893
|
/**
|
|
15789
13894
|
* An event that contains more information about a player
|
|
15790
13895
|
* spawning.
|
|
@@ -15817,7 +13922,7 @@ export class PlayerSpawnAfterEvent {
|
|
|
15817
13922
|
export class PlayerSpawnAfterEventSignal {
|
|
15818
13923
|
private constructor();
|
|
15819
13924
|
/**
|
|
15820
|
-
* @
|
|
13925
|
+
* @rc
|
|
15821
13926
|
* @remarks
|
|
15822
13927
|
* Registers a new event receiver for this particular type of
|
|
15823
13928
|
* event.
|
|
@@ -15829,7 +13934,7 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
15829
13934
|
*/
|
|
15830
13935
|
subscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): (arg0: PlayerSpawnAfterEvent) => void;
|
|
15831
13936
|
/**
|
|
15832
|
-
* @
|
|
13937
|
+
* @rc
|
|
15833
13938
|
* @remarks
|
|
15834
13939
|
* De-registers an event receiver for the player spawn event.
|
|
15835
13940
|
*
|
|
@@ -15841,75 +13946,6 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
15841
13946
|
unsubscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): void;
|
|
15842
13947
|
}
|
|
15843
13948
|
|
|
15844
|
-
/**
|
|
15845
|
-
* @beta
|
|
15846
|
-
* Represents a type of potion effect - like healing or leaping
|
|
15847
|
-
* - that can be used with PotionOptions.
|
|
15848
|
-
*/
|
|
15849
|
-
export class PotionEffectType {
|
|
15850
|
-
private constructor();
|
|
15851
|
-
readonly id: string;
|
|
15852
|
-
}
|
|
15853
|
-
|
|
15854
|
-
/**
|
|
15855
|
-
* @beta
|
|
15856
|
-
* Represents a type of potion liquid - like splash, or
|
|
15857
|
-
* lingering - that can be used with PotionOptions.
|
|
15858
|
-
*/
|
|
15859
|
-
export class PotionLiquidType {
|
|
15860
|
-
private constructor();
|
|
15861
|
-
readonly id: string;
|
|
15862
|
-
}
|
|
15863
|
-
|
|
15864
|
-
/**
|
|
15865
|
-
* @beta
|
|
15866
|
-
* Represents a type of potion modifier - like strong, or long
|
|
15867
|
-
* - that can be used with PotionOptions.
|
|
15868
|
-
*/
|
|
15869
|
-
export class PotionModifierType {
|
|
15870
|
-
private constructor();
|
|
15871
|
-
readonly id: string;
|
|
15872
|
-
}
|
|
15873
|
-
|
|
15874
|
-
/**
|
|
15875
|
-
* @beta
|
|
15876
|
-
* Used for accessing all potion effects, liquids, and
|
|
15877
|
-
* modifiers currently available for use within the world.
|
|
15878
|
-
*/
|
|
15879
|
-
export class Potions {
|
|
15880
|
-
private constructor();
|
|
15881
|
-
/**
|
|
15882
|
-
* @remarks
|
|
15883
|
-
* Retrieves a type handle for a specified potion effect id.
|
|
15884
|
-
*
|
|
15885
|
-
* @param potionEffectId
|
|
15886
|
-
* A valid potion effect id. See
|
|
15887
|
-
* @minecraft/vanilla-data.MinecraftPotionEffectTypes
|
|
15888
|
-
* @returns
|
|
15889
|
-
* A type handle wrapping the valid effect id, or undefined for
|
|
15890
|
-
* an invalid effect id.
|
|
15891
|
-
*/
|
|
15892
|
-
static getPotionEffectType(potionEffectId: string): PotionEffectType | undefined;
|
|
15893
|
-
/**
|
|
15894
|
-
* @remarks
|
|
15895
|
-
* Retrieves a type handle for a specified potion liquid id.
|
|
15896
|
-
*
|
|
15897
|
-
* @returns
|
|
15898
|
-
* A type handle wrapping the valid liquid id, or undefined for
|
|
15899
|
-
* an invalid liquid id.
|
|
15900
|
-
*/
|
|
15901
|
-
static getPotionLiquidType(potionLiquidId: string): PotionLiquidType | undefined;
|
|
15902
|
-
/**
|
|
15903
|
-
* @remarks
|
|
15904
|
-
* Retrieves a type handle for a specified potion modifier id.
|
|
15905
|
-
*
|
|
15906
|
-
* @returns
|
|
15907
|
-
* A type handle wrapping the valid modifier id, or undefined
|
|
15908
|
-
* for an invalid modifier id.
|
|
15909
|
-
*/
|
|
15910
|
-
static getPotionModifierType(potionModifierId: string): PotionModifierType | undefined;
|
|
15911
|
-
}
|
|
15912
|
-
|
|
15913
13949
|
/**
|
|
15914
13950
|
* Contains information related to changes to a pressure plate
|
|
15915
13951
|
* pop.
|
|
@@ -16349,7 +14385,7 @@ export class ScoreboardIdentity {
|
|
|
16349
14385
|
*/
|
|
16350
14386
|
readonly id: number;
|
|
16351
14387
|
/**
|
|
16352
|
-
* @
|
|
14388
|
+
* @rc
|
|
16353
14389
|
* @remarks
|
|
16354
14390
|
* Returns true if the ScoreboardIdentity reference is still
|
|
16355
14391
|
* valid.
|
|
@@ -16393,7 +14429,7 @@ export class ScoreboardObjective {
|
|
|
16393
14429
|
*/
|
|
16394
14430
|
readonly id: string;
|
|
16395
14431
|
/**
|
|
16396
|
-
* @
|
|
14432
|
+
* @rc
|
|
16397
14433
|
* @remarks
|
|
16398
14434
|
* Returns true if the ScoreboardObjective reference is still
|
|
16399
14435
|
* valid.
|
|
@@ -16552,7 +14588,7 @@ export class ScoreboardScoreInfo {
|
|
|
16552
14588
|
export class ScreenDisplay {
|
|
16553
14589
|
private constructor();
|
|
16554
14590
|
/**
|
|
16555
|
-
* @
|
|
14591
|
+
* @rc
|
|
16556
14592
|
* @remarks
|
|
16557
14593
|
* Returns true if the current reference to this screen display
|
|
16558
14594
|
* manager object is valid and functional.
|
|
@@ -16587,7 +14623,7 @@ export class ScreenDisplay {
|
|
|
16587
14623
|
*/
|
|
16588
14624
|
isForcedHidden(hudElement: HudElement): boolean;
|
|
16589
14625
|
/**
|
|
16590
|
-
* @
|
|
14626
|
+
* @rc
|
|
16591
14627
|
* @remarks
|
|
16592
14628
|
* This function can't be called in read-only mode.
|
|
16593
14629
|
*
|
|
@@ -16865,69 +14901,53 @@ export class Seat {
|
|
|
16865
14901
|
}
|
|
16866
14902
|
|
|
16867
14903
|
/**
|
|
16868
|
-
* @
|
|
16869
|
-
*
|
|
16870
|
-
* event
|
|
16871
|
-
*
|
|
16872
|
-
|
|
16873
|
-
export class ServerMessageAfterEventSignal {
|
|
16874
|
-
private constructor();
|
|
16875
|
-
/**
|
|
16876
|
-
* @remarks
|
|
16877
|
-
* Adds a callback that will be called when an internal message
|
|
16878
|
-
* is passed.
|
|
16879
|
-
*
|
|
16880
|
-
* This function can't be called in read-only mode.
|
|
16881
|
-
*
|
|
16882
|
-
* This function can be called in early-execution mode.
|
|
16883
|
-
*
|
|
16884
|
-
*/
|
|
16885
|
-
subscribe(callback: (arg0: MessageReceiveAfterEvent) => void): (arg0: MessageReceiveAfterEvent) => void;
|
|
16886
|
-
/**
|
|
16887
|
-
* @remarks
|
|
16888
|
-
* Removes a callback from being called when an internal
|
|
16889
|
-
* message is passed.
|
|
16890
|
-
*
|
|
16891
|
-
* This function can't be called in read-only mode.
|
|
16892
|
-
*
|
|
16893
|
-
* This function can be called in early-execution mode.
|
|
16894
|
-
*
|
|
16895
|
-
*/
|
|
16896
|
-
unsubscribe(callback: (arg0: MessageReceiveAfterEvent) => void): void;
|
|
16897
|
-
}
|
|
16898
|
-
|
|
16899
|
-
/**
|
|
16900
|
-
* @beta
|
|
14904
|
+
* @rc
|
|
14905
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
14906
|
+
* an event that fires before the game world shuts down. This
|
|
14907
|
+
* event occurs after players have left, but before the world
|
|
14908
|
+
* has closed.
|
|
16901
14909
|
*/
|
|
16902
14910
|
export class ShutdownBeforeEventSignal {
|
|
16903
14911
|
private constructor();
|
|
16904
14912
|
/**
|
|
16905
14913
|
* @remarks
|
|
14914
|
+
* Adds a new subscriber callback to this event.
|
|
14915
|
+
*
|
|
16906
14916
|
* This function can't be called in read-only mode.
|
|
16907
14917
|
*
|
|
16908
14918
|
* This function can be called in early-execution mode.
|
|
16909
14919
|
*
|
|
14920
|
+
* @param callback
|
|
14921
|
+
* Function callback that is called when this event fires.
|
|
16910
14922
|
*/
|
|
16911
14923
|
subscribe(callback: (arg0: ShutdownEvent) => void): (arg0: ShutdownEvent) => void;
|
|
16912
14924
|
/**
|
|
16913
14925
|
* @remarks
|
|
14926
|
+
* Removes a subscriber callback previously subscribed to via
|
|
14927
|
+
* the subscribe method.
|
|
14928
|
+
*
|
|
16914
14929
|
* This function can't be called in read-only mode.
|
|
16915
14930
|
*
|
|
16916
14931
|
* This function can be called in early-execution mode.
|
|
16917
14932
|
*
|
|
14933
|
+
* @param callback
|
|
14934
|
+
* Function closure that was previously passed to the subscribe
|
|
14935
|
+
* method.
|
|
16918
14936
|
*/
|
|
16919
14937
|
unsubscribe(callback: (arg0: ShutdownEvent) => void): void;
|
|
16920
14938
|
}
|
|
16921
14939
|
|
|
16922
14940
|
/**
|
|
16923
|
-
* @
|
|
14941
|
+
* @rc
|
|
14942
|
+
* The event object that gets dispatched when the game world is
|
|
14943
|
+
* shutting down.
|
|
16924
14944
|
*/
|
|
16925
14945
|
export class ShutdownEvent {
|
|
16926
14946
|
private constructor();
|
|
16927
14947
|
}
|
|
16928
14948
|
|
|
16929
14949
|
/**
|
|
16930
|
-
* @
|
|
14950
|
+
* @rc
|
|
16931
14951
|
*/
|
|
16932
14952
|
export class StartupBeforeEventSignal {
|
|
16933
14953
|
private constructor();
|
|
@@ -16950,7 +14970,7 @@ export class StartupBeforeEventSignal {
|
|
|
16950
14970
|
}
|
|
16951
14971
|
|
|
16952
14972
|
/**
|
|
16953
|
-
* @
|
|
14973
|
+
* @rc
|
|
16954
14974
|
*/
|
|
16955
14975
|
export class StartupEvent {
|
|
16956
14976
|
private constructor();
|
|
@@ -16960,12 +14980,6 @@ export class StartupEvent {
|
|
|
16960
14980
|
*
|
|
16961
14981
|
*/
|
|
16962
14982
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
16963
|
-
/**
|
|
16964
|
-
* @remarks
|
|
16965
|
-
* This property can be read in early-execution mode.
|
|
16966
|
-
*
|
|
16967
|
-
*/
|
|
16968
|
-
readonly customCommandRegistry: CustomCommandRegistry;
|
|
16969
14983
|
/**
|
|
16970
14984
|
* @remarks
|
|
16971
14985
|
* This property can be read in early-execution mode.
|
|
@@ -16991,7 +15005,7 @@ export class Structure {
|
|
|
16991
15005
|
*/
|
|
16992
15006
|
readonly id: string;
|
|
16993
15007
|
/**
|
|
16994
|
-
* @
|
|
15008
|
+
* @rc
|
|
16995
15009
|
* @remarks
|
|
16996
15010
|
* Returns whether the Structure is valid. The Structure may
|
|
16997
15011
|
* become invalid if it is deleted.
|
|
@@ -17351,7 +15365,7 @@ export class System {
|
|
|
17351
15365
|
*/
|
|
17352
15366
|
readonly afterEvents: SystemAfterEvents;
|
|
17353
15367
|
/**
|
|
17354
|
-
* @
|
|
15368
|
+
* @rc
|
|
17355
15369
|
* @remarks
|
|
17356
15370
|
* Returns a collection of before-events for system-level
|
|
17357
15371
|
* operations.
|
|
@@ -17369,7 +15383,7 @@ export class System {
|
|
|
17369
15383
|
*/
|
|
17370
15384
|
readonly currentTick: number;
|
|
17371
15385
|
/**
|
|
17372
|
-
* @
|
|
15386
|
+
* @rc
|
|
17373
15387
|
* @remarks
|
|
17374
15388
|
* Returns true if this is a world where the editor is
|
|
17375
15389
|
* currently loaded, returns false otherwise.
|
|
@@ -17589,7 +15603,7 @@ export class SystemAfterEvents {
|
|
|
17589
15603
|
}
|
|
17590
15604
|
|
|
17591
15605
|
/**
|
|
17592
|
-
* @
|
|
15606
|
+
* @rc
|
|
17593
15607
|
* A set of events that fire before an actual action occurs. In
|
|
17594
15608
|
* most cases, you can potentially cancel or modify the
|
|
17595
15609
|
* impending event. Note that in before events any APIs that
|
|
@@ -17610,18 +15624,6 @@ export class SystemBeforeEvents {
|
|
|
17610
15624
|
*
|
|
17611
15625
|
*/
|
|
17612
15626
|
readonly startup: StartupBeforeEventSignal;
|
|
17613
|
-
/**
|
|
17614
|
-
* @remarks
|
|
17615
|
-
* Fires when the scripting watchdog shuts down the server. The
|
|
17616
|
-
* can be due to using too much memory, or by causing
|
|
17617
|
-
* significant slowdown or hang.
|
|
17618
|
-
* To prevent shutdown, set the event's cancel property to
|
|
17619
|
-
* true.
|
|
17620
|
-
*
|
|
17621
|
-
* This property can be read in early-execution mode.
|
|
17622
|
-
*
|
|
17623
|
-
*/
|
|
17624
|
-
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
17625
15627
|
}
|
|
17626
15628
|
|
|
17627
15629
|
/**
|
|
@@ -17807,94 +15809,35 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
17807
15809
|
* system.currentTick +
|
|
17808
15810
|
* (tripWireTripEvent.sources.length > 0 ? " by entity " + tripWireTripEvent.sources[0].id : "")
|
|
17809
15811
|
* );
|
|
17810
|
-
* }
|
|
17811
|
-
* });
|
|
17812
|
-
* }
|
|
17813
|
-
* ```
|
|
17814
|
-
*/
|
|
17815
|
-
export class TripWireTripAfterEventSignal {
|
|
17816
|
-
private constructor();
|
|
17817
|
-
/**
|
|
17818
|
-
* @remarks
|
|
17819
|
-
* Adds a callback that will be called when a trip wire is
|
|
17820
|
-
* tripped.
|
|
17821
|
-
*
|
|
17822
|
-
* This function can't be called in read-only mode.
|
|
17823
|
-
*
|
|
17824
|
-
* This function can be called in early-execution mode.
|
|
17825
|
-
*
|
|
17826
|
-
*/
|
|
17827
|
-
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
17828
|
-
/**
|
|
17829
|
-
* @remarks
|
|
17830
|
-
* Removes a callback from being called when a trip wire is
|
|
17831
|
-
* tripped.
|
|
17832
|
-
*
|
|
17833
|
-
* This function can't be called in read-only mode.
|
|
17834
|
-
*
|
|
17835
|
-
* This function can be called in early-execution mode.
|
|
17836
|
-
*
|
|
17837
|
-
*/
|
|
17838
|
-
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
17839
|
-
}
|
|
17840
|
-
|
|
17841
|
-
/**
|
|
17842
|
-
* @beta
|
|
17843
|
-
* Contains information related to a script watchdog
|
|
17844
|
-
* termination.
|
|
17845
|
-
*/
|
|
17846
|
-
export class WatchdogTerminateBeforeEvent {
|
|
17847
|
-
private constructor();
|
|
17848
|
-
/**
|
|
17849
|
-
* @remarks
|
|
17850
|
-
* If set to true, cancels the termination of the script
|
|
17851
|
-
* runtime. Note that depending on server configuration
|
|
17852
|
-
* settings, cancellation of the termination may not be
|
|
17853
|
-
* allowed.
|
|
17854
|
-
*
|
|
17855
|
-
*/
|
|
17856
|
-
cancel: boolean;
|
|
17857
|
-
/**
|
|
17858
|
-
* @remarks
|
|
17859
|
-
* Contains the reason why a script runtime is to be
|
|
17860
|
-
* terminated.
|
|
17861
|
-
*
|
|
17862
|
-
*/
|
|
17863
|
-
readonly terminateReason: WatchdogTerminateReason;
|
|
17864
|
-
}
|
|
17865
|
-
|
|
17866
|
-
/**
|
|
17867
|
-
* @beta
|
|
17868
|
-
* Manages callbacks that are connected to a callback that will
|
|
17869
|
-
* be called when a script runtime is being terminated due to a
|
|
17870
|
-
* violation of the performance watchdog system.
|
|
15812
|
+
* }
|
|
15813
|
+
* });
|
|
15814
|
+
* }
|
|
15815
|
+
* ```
|
|
17871
15816
|
*/
|
|
17872
|
-
export class
|
|
15817
|
+
export class TripWireTripAfterEventSignal {
|
|
17873
15818
|
private constructor();
|
|
17874
15819
|
/**
|
|
17875
15820
|
* @remarks
|
|
17876
|
-
* Adds a callback that will be called when a
|
|
17877
|
-
*
|
|
17878
|
-
* watchdog system.
|
|
15821
|
+
* Adds a callback that will be called when a trip wire is
|
|
15822
|
+
* tripped.
|
|
17879
15823
|
*
|
|
17880
15824
|
* This function can't be called in read-only mode.
|
|
17881
15825
|
*
|
|
17882
15826
|
* This function can be called in early-execution mode.
|
|
17883
15827
|
*
|
|
17884
15828
|
*/
|
|
17885
|
-
subscribe(callback: (arg0:
|
|
15829
|
+
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
17886
15830
|
/**
|
|
17887
15831
|
* @remarks
|
|
17888
|
-
* Removes a callback from being called when a
|
|
17889
|
-
*
|
|
17890
|
-
* watchdog system.
|
|
15832
|
+
* Removes a callback from being called when a trip wire is
|
|
15833
|
+
* tripped.
|
|
17891
15834
|
*
|
|
17892
15835
|
* This function can't be called in read-only mode.
|
|
17893
15836
|
*
|
|
17894
15837
|
* This function can be called in early-execution mode.
|
|
17895
15838
|
*
|
|
17896
15839
|
*/
|
|
17897
|
-
unsubscribe(callback: (arg0:
|
|
15840
|
+
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
17898
15841
|
}
|
|
17899
15842
|
|
|
17900
15843
|
/**
|
|
@@ -18084,20 +16027,6 @@ export class World {
|
|
|
18084
16027
|
*
|
|
18085
16028
|
*/
|
|
18086
16029
|
readonly structureManager: StructureManager;
|
|
18087
|
-
/**
|
|
18088
|
-
* @beta
|
|
18089
|
-
* @remarks
|
|
18090
|
-
* A method that is internal-only, used for broadcasting
|
|
18091
|
-
* specific messages between client and server.
|
|
18092
|
-
*
|
|
18093
|
-
* This function can't be called in read-only mode.
|
|
18094
|
-
*
|
|
18095
|
-
* @param id
|
|
18096
|
-
* The message identifier.
|
|
18097
|
-
* @param value
|
|
18098
|
-
* The message.
|
|
18099
|
-
*/
|
|
18100
|
-
broadcastClientMessage(id: string, value: string): void;
|
|
18101
16030
|
/**
|
|
18102
16031
|
* @remarks
|
|
18103
16032
|
* Clears the set of dynamic properties declared for this
|
|
@@ -18111,14 +16040,6 @@ export class World {
|
|
|
18111
16040
|
*
|
|
18112
16041
|
*/
|
|
18113
16042
|
getAbsoluteTime(): number;
|
|
18114
|
-
/**
|
|
18115
|
-
* @beta
|
|
18116
|
-
* @remarks
|
|
18117
|
-
* The aim-assist presets and categories that can be used in
|
|
18118
|
-
* the world.
|
|
18119
|
-
*
|
|
18120
|
-
*/
|
|
18121
|
-
getAimAssist(): AimAssistRegistry;
|
|
18122
16043
|
/**
|
|
18123
16044
|
* @remarks
|
|
18124
16045
|
* Returns an array of all active players within the world.
|
|
@@ -18406,17 +16327,6 @@ export class World {
|
|
|
18406
16327
|
* The difficulty we want to set the world to.
|
|
18407
16328
|
*/
|
|
18408
16329
|
setDifficulty(difficulty: Difficulty): void;
|
|
18409
|
-
/**
|
|
18410
|
-
* @beta
|
|
18411
|
-
* @remarks
|
|
18412
|
-
* Sets multiple dynamic properties with specific values.
|
|
18413
|
-
*
|
|
18414
|
-
* @param values
|
|
18415
|
-
* A Record of key value pairs of the dynamic properties to
|
|
18416
|
-
* set.
|
|
18417
|
-
* @throws This function can throw errors.
|
|
18418
|
-
*/
|
|
18419
|
-
setDynamicProperties(values: Record<string, boolean | number | string | Vector3>): void;
|
|
18420
16330
|
/**
|
|
18421
16331
|
* @remarks
|
|
18422
16332
|
* Sets a specified property to a value.
|
|
@@ -18543,16 +16453,6 @@ export class WorldAfterEvents {
|
|
|
18543
16453
|
*
|
|
18544
16454
|
*/
|
|
18545
16455
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
18546
|
-
/**
|
|
18547
|
-
* @beta
|
|
18548
|
-
* @remarks
|
|
18549
|
-
* This event is triggered after a chat message has been
|
|
18550
|
-
* broadcast or sent to players.
|
|
18551
|
-
*
|
|
18552
|
-
* This property can be read in early-execution mode.
|
|
18553
|
-
*
|
|
18554
|
-
*/
|
|
18555
|
-
readonly chatSend: ChatSendAfterEventSignal;
|
|
18556
16456
|
/**
|
|
18557
16457
|
* @remarks
|
|
18558
16458
|
* This event is fired when an entity event has been triggered
|
|
@@ -18728,16 +16628,6 @@ export class WorldAfterEvents {
|
|
|
18728
16628
|
*
|
|
18729
16629
|
*/
|
|
18730
16630
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
18731
|
-
/**
|
|
18732
|
-
* @beta
|
|
18733
|
-
* @remarks
|
|
18734
|
-
* This event is an internal implementation detail, and is
|
|
18735
|
-
* otherwise not currently functional.
|
|
18736
|
-
*
|
|
18737
|
-
* This property can be read in early-execution mode.
|
|
18738
|
-
*
|
|
18739
|
-
*/
|
|
18740
|
-
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
18741
16631
|
/**
|
|
18742
16632
|
* @remarks
|
|
18743
16633
|
* This event fires when a piston expands or retracts.
|
|
@@ -18911,7 +16801,7 @@ export class WorldAfterEvents {
|
|
|
18911
16801
|
*/
|
|
18912
16802
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
18913
16803
|
/**
|
|
18914
|
-
* @
|
|
16804
|
+
* @rc
|
|
18915
16805
|
* @remarks
|
|
18916
16806
|
* This property can be read in early-execution mode.
|
|
18917
16807
|
*
|
|
@@ -18928,43 +16818,6 @@ export class WorldAfterEvents {
|
|
|
18928
16818
|
*/
|
|
18929
16819
|
export class WorldBeforeEvents {
|
|
18930
16820
|
private constructor();
|
|
18931
|
-
/**
|
|
18932
|
-
* @beta
|
|
18933
|
-
* @remarks
|
|
18934
|
-
* This event is triggered after a chat message has been
|
|
18935
|
-
* broadcast or sent to players.
|
|
18936
|
-
*
|
|
18937
|
-
* This property can be read in early-execution mode.
|
|
18938
|
-
*
|
|
18939
|
-
* @example customCommand.ts
|
|
18940
|
-
* ```typescript
|
|
18941
|
-
* import { world, DimensionLocation } from "@minecraft/server";
|
|
18942
|
-
*
|
|
18943
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
18944
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe((eventData) => {
|
|
18945
|
-
* if (eventData.message.includes("cancel")) {
|
|
18946
|
-
* // Cancel event if the message contains "cancel"
|
|
18947
|
-
* eventData.cancel = true;
|
|
18948
|
-
* } else {
|
|
18949
|
-
* const args = eventData.message.split(" ");
|
|
18950
|
-
*
|
|
18951
|
-
* if (args.length > 0) {
|
|
18952
|
-
* switch (args[0].toLowerCase()) {
|
|
18953
|
-
* case "echo":
|
|
18954
|
-
* // Send a modified version of chat message
|
|
18955
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
18956
|
-
* break;
|
|
18957
|
-
* case "help":
|
|
18958
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
18959
|
-
* break;
|
|
18960
|
-
* }
|
|
18961
|
-
* }
|
|
18962
|
-
* }
|
|
18963
|
-
* });
|
|
18964
|
-
* }
|
|
18965
|
-
* ```
|
|
18966
|
-
*/
|
|
18967
|
-
readonly chatSend: ChatSendBeforeEventSignal;
|
|
18968
16821
|
/**
|
|
18969
16822
|
* @remarks
|
|
18970
16823
|
* This event is triggered after an event has been added to an
|
|
@@ -19038,15 +16891,6 @@ export class WorldBeforeEvents {
|
|
|
19038
16891
|
*
|
|
19039
16892
|
*/
|
|
19040
16893
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
19041
|
-
/**
|
|
19042
|
-
* @beta
|
|
19043
|
-
* @remarks
|
|
19044
|
-
* This event fires before a block is placed by a player.
|
|
19045
|
-
*
|
|
19046
|
-
* This property can be read in early-execution mode.
|
|
19047
|
-
*
|
|
19048
|
-
*/
|
|
19049
|
-
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
19050
16894
|
/**
|
|
19051
16895
|
* @remarks
|
|
19052
16896
|
* This property can be read in early-execution mode.
|
|
@@ -19056,14 +16900,14 @@ export class WorldBeforeEvents {
|
|
|
19056
16900
|
}
|
|
19057
16901
|
|
|
19058
16902
|
/**
|
|
19059
|
-
* @
|
|
16903
|
+
* @rc
|
|
19060
16904
|
*/
|
|
19061
16905
|
export class WorldLoadAfterEvent {
|
|
19062
16906
|
private constructor();
|
|
19063
16907
|
}
|
|
19064
16908
|
|
|
19065
16909
|
/**
|
|
19066
|
-
* @
|
|
16910
|
+
* @rc
|
|
19067
16911
|
*/
|
|
19068
16912
|
export class WorldLoadAfterEventSignal {
|
|
19069
16913
|
private constructor();
|
|
@@ -19085,27 +16929,13 @@ export class WorldLoadAfterEventSignal {
|
|
|
19085
16929
|
unsubscribe(callback: (arg0: WorldLoadAfterEvent) => void): void;
|
|
19086
16930
|
}
|
|
19087
16931
|
|
|
19088
|
-
/**
|
|
19089
|
-
* @beta
|
|
19090
|
-
* Contains additional options for searches for the
|
|
19091
|
-
* dimension.findNearestBiome API.
|
|
19092
|
-
*/
|
|
19093
|
-
export interface BiomeSearchOptions {
|
|
19094
|
-
/**
|
|
19095
|
-
* @remarks
|
|
19096
|
-
* Bounding volume size to look within.
|
|
19097
|
-
*
|
|
19098
|
-
*/
|
|
19099
|
-
boundingSize?: Vector3;
|
|
19100
|
-
}
|
|
19101
|
-
|
|
19102
16932
|
/**
|
|
19103
16933
|
* A BlockBoundingBox is an interface to an object which
|
|
19104
16934
|
* represents an AABB aligned rectangle.
|
|
19105
16935
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
19106
16936
|
* state (min <= max) but cannot guarantee it (unless it was
|
|
19107
|
-
* created using the associated {@link
|
|
19108
|
-
* utility functions.
|
|
16937
|
+
* created using the associated {@link
|
|
16938
|
+
* @minecraft/server.BlockBoundingBoxUtils} utility functions.
|
|
19109
16939
|
* The min/max coordinates represent the diametrically opposite
|
|
19110
16940
|
* corners of the rectangle.
|
|
19111
16941
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -19159,12 +16989,9 @@ export interface BlockCustomComponent {
|
|
|
19159
16989
|
*/
|
|
19160
16990
|
onPlace?: (arg0: BlockComponentOnPlaceEvent, arg1: CustomComponentParameters) => void;
|
|
19161
16991
|
/**
|
|
19162
|
-
* @
|
|
19163
|
-
* This function will be called when a player destroys a
|
|
19164
|
-
* specific block.
|
|
19165
|
-
*
|
|
16992
|
+
* @rc
|
|
19166
16993
|
*/
|
|
19167
|
-
|
|
16994
|
+
onPlayerBreak?: (arg0: BlockComponentPlayerBreakEvent, arg1: CustomComponentParameters) => void;
|
|
19168
16995
|
/**
|
|
19169
16996
|
* @remarks
|
|
19170
16997
|
* This function will be called when a player sucessfully
|
|
@@ -19373,33 +17200,6 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
19373
17200
|
maxDistance?: number;
|
|
19374
17201
|
}
|
|
19375
17202
|
|
|
19376
|
-
export interface CameraDefaultOptions {
|
|
19377
|
-
/**
|
|
19378
|
-
* @remarks
|
|
19379
|
-
* Sets a set of easing options for the camera.
|
|
19380
|
-
*
|
|
19381
|
-
*/
|
|
19382
|
-
easeOptions: CameraEaseOptions;
|
|
19383
|
-
}
|
|
19384
|
-
|
|
19385
|
-
/**
|
|
19386
|
-
* Contains options associated with a camera ease operation.
|
|
19387
|
-
*/
|
|
19388
|
-
export interface CameraEaseOptions {
|
|
19389
|
-
/**
|
|
19390
|
-
* @remarks
|
|
19391
|
-
* Time for the ease operation.
|
|
19392
|
-
*
|
|
19393
|
-
*/
|
|
19394
|
-
easeTime?: number;
|
|
19395
|
-
/**
|
|
19396
|
-
* @remarks
|
|
19397
|
-
* Type of ease operation to use.
|
|
19398
|
-
*
|
|
19399
|
-
*/
|
|
19400
|
-
easeType?: EasingType;
|
|
19401
|
-
}
|
|
19402
|
-
|
|
19403
17203
|
/**
|
|
19404
17204
|
* Used to initiate a full-screen color fade.
|
|
19405
17205
|
*/
|
|
@@ -19463,24 +17263,24 @@ export interface CameraFixedBoomOptions {
|
|
|
19463
17263
|
}
|
|
19464
17264
|
|
|
19465
17265
|
export interface CameraSetFacingOptions {
|
|
19466
|
-
easeOptions?:
|
|
17266
|
+
easeOptions?: EaseOptions;
|
|
19467
17267
|
facingEntity: Entity;
|
|
19468
17268
|
location?: Vector3;
|
|
19469
17269
|
}
|
|
19470
17270
|
|
|
19471
17271
|
export interface CameraSetLocationOptions {
|
|
19472
|
-
easeOptions?:
|
|
17272
|
+
easeOptions?: EaseOptions;
|
|
19473
17273
|
location: Vector3;
|
|
19474
17274
|
}
|
|
19475
17275
|
|
|
19476
17276
|
export interface CameraSetPosOptions {
|
|
19477
|
-
easeOptions?:
|
|
17277
|
+
easeOptions?: EaseOptions;
|
|
19478
17278
|
facingLocation: Vector3;
|
|
19479
17279
|
location?: Vector3;
|
|
19480
17280
|
}
|
|
19481
17281
|
|
|
19482
17282
|
export interface CameraSetRotOptions {
|
|
19483
|
-
easeOptions?:
|
|
17283
|
+
easeOptions?: EaseOptions;
|
|
19484
17284
|
location?: Vector3;
|
|
19485
17285
|
rotation: Vector2;
|
|
19486
17286
|
}
|
|
@@ -19503,118 +17303,6 @@ export interface CameraTargetOptions {
|
|
|
19503
17303
|
targetEntity: Entity;
|
|
19504
17304
|
}
|
|
19505
17305
|
|
|
19506
|
-
/**
|
|
19507
|
-
* @beta
|
|
19508
|
-
* This interface defines an entry into the {@link
|
|
19509
|
-
* CompoundBlockVolume} which represents a volume of positive
|
|
19510
|
-
* or negative space.
|
|
19511
|
-
*
|
|
19512
|
-
*/
|
|
19513
|
-
export interface CompoundBlockVolumeItem {
|
|
19514
|
-
/**
|
|
19515
|
-
* @remarks
|
|
19516
|
-
* The 'action' defines how the block volume is represented in
|
|
19517
|
-
* the compound block volume stack.
|
|
19518
|
-
* 'Add' creates a block volume which is positively selected
|
|
19519
|
-
* 'Subtract' creates a block volume which represents a hole or
|
|
19520
|
-
* negative space in the overall compound block volume.
|
|
19521
|
-
*
|
|
19522
|
-
*/
|
|
19523
|
-
action?: CompoundBlockVolumeAction;
|
|
19524
|
-
/**
|
|
19525
|
-
* @remarks
|
|
19526
|
-
* The relativity enumeration determines whether the
|
|
19527
|
-
* BlockVolume specified is positioned relative to the parent
|
|
19528
|
-
* compound block volume origin, or in absolute world space.
|
|
19529
|
-
*
|
|
19530
|
-
*/
|
|
19531
|
-
locationRelativity?: CompoundBlockVolumePositionRelativity;
|
|
19532
|
-
/**
|
|
19533
|
-
* @remarks
|
|
19534
|
-
* The volume of space
|
|
19535
|
-
*
|
|
19536
|
-
*/
|
|
19537
|
-
volume: BlockVolume;
|
|
19538
|
-
}
|
|
19539
|
-
|
|
19540
|
-
/**
|
|
19541
|
-
* @beta
|
|
19542
|
-
* Define the custom command, including name, permissions, and
|
|
19543
|
-
* parameters.
|
|
19544
|
-
*/
|
|
19545
|
-
export interface CustomCommand {
|
|
19546
|
-
/**
|
|
19547
|
-
* @remarks
|
|
19548
|
-
* Command description as seen on the command line.
|
|
19549
|
-
*
|
|
19550
|
-
*/
|
|
19551
|
-
description: string;
|
|
19552
|
-
/**
|
|
19553
|
-
* @remarks
|
|
19554
|
-
* List of mandatory command parameters.
|
|
19555
|
-
*
|
|
19556
|
-
*/
|
|
19557
|
-
mandatoryParameters?: CustomCommandParameter[];
|
|
19558
|
-
/**
|
|
19559
|
-
* @remarks
|
|
19560
|
-
* The name of the command. A namespace is required.
|
|
19561
|
-
*
|
|
19562
|
-
*/
|
|
19563
|
-
name: string;
|
|
19564
|
-
/**
|
|
19565
|
-
* @remarks
|
|
19566
|
-
* List of optional command parameters.
|
|
19567
|
-
*
|
|
19568
|
-
*/
|
|
19569
|
-
optionalParameters?: CustomCommandParameter[];
|
|
19570
|
-
/**
|
|
19571
|
-
* @remarks
|
|
19572
|
-
* The permission level required to execute the command.
|
|
19573
|
-
*
|
|
19574
|
-
*/
|
|
19575
|
-
permissionLevel: CommandPermissionLevel;
|
|
19576
|
-
}
|
|
19577
|
-
|
|
19578
|
-
/**
|
|
19579
|
-
* @beta
|
|
19580
|
-
* Definition for each parameter expected by the custom
|
|
19581
|
-
* command.
|
|
19582
|
-
*/
|
|
19583
|
-
export interface CustomCommandParameter {
|
|
19584
|
-
/**
|
|
19585
|
-
* @remarks
|
|
19586
|
-
* The name of parameter as it appears on the command line.
|
|
19587
|
-
*
|
|
19588
|
-
*/
|
|
19589
|
-
name: string;
|
|
19590
|
-
/**
|
|
19591
|
-
* @remarks
|
|
19592
|
-
* The data type of the parameter.
|
|
19593
|
-
*
|
|
19594
|
-
*/
|
|
19595
|
-
type: CustomCommandParamType;
|
|
19596
|
-
}
|
|
19597
|
-
|
|
19598
|
-
/**
|
|
19599
|
-
* @beta
|
|
19600
|
-
* Interface returned from custom command callback function.
|
|
19601
|
-
*/
|
|
19602
|
-
export interface CustomCommandResult {
|
|
19603
|
-
/**
|
|
19604
|
-
* @remarks
|
|
19605
|
-
* Message displayed to chat after command execution.
|
|
19606
|
-
*
|
|
19607
|
-
*/
|
|
19608
|
-
message?: string;
|
|
19609
|
-
/**
|
|
19610
|
-
* @remarks
|
|
19611
|
-
* Command execution Success or Failure. Determines how the
|
|
19612
|
-
* status message is displayed.
|
|
19613
|
-
*
|
|
19614
|
-
*/
|
|
19615
|
-
status: CustomCommandStatus;
|
|
19616
|
-
}
|
|
19617
|
-
|
|
19618
17306
|
/**
|
|
19619
17307
|
* Contains a set of updates to the component definition state
|
|
19620
17308
|
* of an entity.
|
|
@@ -19634,14 +17322,6 @@ export interface DefinitionModifier {
|
|
|
19634
17322
|
*
|
|
19635
17323
|
*/
|
|
19636
17324
|
removedComponentGroups: string[];
|
|
19637
|
-
/**
|
|
19638
|
-
* @beta
|
|
19639
|
-
* @remarks
|
|
19640
|
-
* The list of entity definition events that will be fired via
|
|
19641
|
-
* this update.
|
|
19642
|
-
*
|
|
19643
|
-
*/
|
|
19644
|
-
triggers: Trigger[];
|
|
19645
17325
|
}
|
|
19646
17326
|
|
|
19647
17327
|
/**
|
|
@@ -19675,6 +17355,26 @@ export interface DimensionLocation {
|
|
|
19675
17355
|
z: number;
|
|
19676
17356
|
}
|
|
19677
17357
|
|
|
17358
|
+
/**
|
|
17359
|
+
* @rc
|
|
17360
|
+
* Contains options associated with easing between positions
|
|
17361
|
+
* and/or rotations.
|
|
17362
|
+
*/
|
|
17363
|
+
export interface EaseOptions {
|
|
17364
|
+
/**
|
|
17365
|
+
* @remarks
|
|
17366
|
+
* Time for the ease operation.
|
|
17367
|
+
*
|
|
17368
|
+
*/
|
|
17369
|
+
easeTime?: number;
|
|
17370
|
+
/**
|
|
17371
|
+
* @remarks
|
|
17372
|
+
* Type of ease operation to use.
|
|
17373
|
+
*
|
|
17374
|
+
*/
|
|
17375
|
+
easeType?: EasingType;
|
|
17376
|
+
}
|
|
17377
|
+
|
|
19678
17378
|
/**
|
|
19679
17379
|
* This interface represents a specific leveled enchantment
|
|
19680
17380
|
* that is applied to an item.
|
|
@@ -20608,7 +18308,7 @@ export interface PlayAnimationOptions {
|
|
|
20608
18308
|
* A list of players the animation will be visible to.
|
|
20609
18309
|
*
|
|
20610
18310
|
*/
|
|
20611
|
-
players?:
|
|
18311
|
+
players?: Player[];
|
|
20612
18312
|
/**
|
|
20613
18313
|
* @remarks
|
|
20614
18314
|
* Specifies a Molang expression for when this animation should
|
|
@@ -20618,38 +18318,6 @@ export interface PlayAnimationOptions {
|
|
|
20618
18318
|
stopExpression?: string;
|
|
20619
18319
|
}
|
|
20620
18320
|
|
|
20621
|
-
/**
|
|
20622
|
-
* @beta
|
|
20623
|
-
* Settings relating to a player's aim-assist targeting.
|
|
20624
|
-
*/
|
|
20625
|
-
export interface PlayerAimAssistSettings {
|
|
20626
|
-
/**
|
|
20627
|
-
* @remarks
|
|
20628
|
-
* The view distance limit to use for aim-assist targeting.
|
|
20629
|
-
*
|
|
20630
|
-
*/
|
|
20631
|
-
distance?: number;
|
|
20632
|
-
/**
|
|
20633
|
-
* @remarks
|
|
20634
|
-
* The Id of the aim-assist preset to activate. Must have a
|
|
20635
|
-
* namespace.
|
|
20636
|
-
*
|
|
20637
|
-
*/
|
|
20638
|
-
presetId: string;
|
|
20639
|
-
/**
|
|
20640
|
-
* @remarks
|
|
20641
|
-
* The mode to use for aim-assist targeting.
|
|
20642
|
-
*
|
|
20643
|
-
*/
|
|
20644
|
-
targetMode?: AimAssistTargetMode;
|
|
20645
|
-
/**
|
|
20646
|
-
* @remarks
|
|
20647
|
-
* The view angle limit to use for aim-assist targeting.
|
|
20648
|
-
*
|
|
20649
|
-
*/
|
|
20650
|
-
viewAngle?: Vector2;
|
|
20651
|
-
}
|
|
20652
|
-
|
|
20653
18321
|
/**
|
|
20654
18322
|
* Additional options for how a sound plays for a player.
|
|
20655
18323
|
*/
|
|
@@ -20675,35 +18343,6 @@ export interface PlayerSoundOptions {
|
|
|
20675
18343
|
volume?: number;
|
|
20676
18344
|
}
|
|
20677
18345
|
|
|
20678
|
-
/**
|
|
20679
|
-
* @beta
|
|
20680
|
-
* Options for use in creating potions. See
|
|
20681
|
-
* ItemStack.createPotion.
|
|
20682
|
-
*/
|
|
20683
|
-
export interface PotionOptions {
|
|
20684
|
-
/**
|
|
20685
|
-
* @remarks
|
|
20686
|
-
* The type of potion effect to create. See
|
|
20687
|
-
* @minecraft/vanilla-data.MinecraftPotionEffectTypes.
|
|
20688
|
-
*
|
|
20689
|
-
*/
|
|
20690
|
-
effect: PotionEffectType | string;
|
|
20691
|
-
/**
|
|
20692
|
-
* @remarks
|
|
20693
|
-
* Optional potion liquid, defaults to 'Regular'. See
|
|
20694
|
-
* @minecraft/vanilla-data.MinecraftPotionLiquidTypes.
|
|
20695
|
-
*
|
|
20696
|
-
*/
|
|
20697
|
-
liquid?: PotionLiquidType | string;
|
|
20698
|
-
/**
|
|
20699
|
-
* @remarks
|
|
20700
|
-
* Optional potion modifier, defaults to 'Normal'. See
|
|
20701
|
-
* @minecraft/vanilla-data.MinecraftPotionModifierTypes.
|
|
20702
|
-
*
|
|
20703
|
-
*/
|
|
20704
|
-
modifier?: PotionModifierType | string;
|
|
20705
|
-
}
|
|
20706
|
-
|
|
20707
18346
|
/**
|
|
20708
18347
|
* Optional arguments for
|
|
20709
18348
|
* @minecraft/server.EntityProjectileComponent.shoot.
|
|
@@ -20978,25 +18617,10 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
20978
18617
|
}
|
|
20979
18618
|
|
|
20980
18619
|
/**
|
|
20981
|
-
* @
|
|
18620
|
+
* @rc
|
|
20982
18621
|
* Contains additional options for spawning an Entity.
|
|
20983
18622
|
*/
|
|
20984
18623
|
export interface SpawnEntityOptions {
|
|
20985
|
-
/**
|
|
20986
|
-
* @remarks
|
|
20987
|
-
* Optional boolean which determines if this entity should
|
|
20988
|
-
* persist in the game world. Persistence prevents the entity
|
|
20989
|
-
* from automatically despawning.
|
|
20990
|
-
*
|
|
20991
|
-
*/
|
|
20992
|
-
initialPersistence?: boolean;
|
|
20993
|
-
/**
|
|
20994
|
-
* @remarks
|
|
20995
|
-
* Optional initial rotation, in degrees, to set on the entity
|
|
20996
|
-
* when it spawns.
|
|
20997
|
-
*
|
|
20998
|
-
*/
|
|
20999
|
-
initialRotation?: number;
|
|
21000
18624
|
/**
|
|
21001
18625
|
* @remarks
|
|
21002
18626
|
* Optional spawn event to send to the entity after it is
|
|
@@ -21315,20 +18939,12 @@ export class CommandError extends Error {
|
|
|
21315
18939
|
}
|
|
21316
18940
|
|
|
21317
18941
|
/**
|
|
21318
|
-
* @
|
|
21319
|
-
*
|
|
18942
|
+
* Error thrown if {@link @minecraft/server.ContainerRules} are
|
|
18943
|
+
* broken on container operations.
|
|
21320
18944
|
*/
|
|
21321
18945
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21322
|
-
export class
|
|
18946
|
+
export class ContainerRulesError extends Error {
|
|
21323
18947
|
private constructor();
|
|
21324
|
-
/**
|
|
21325
|
-
* @remarks
|
|
21326
|
-
* Reason for the error.
|
|
21327
|
-
*
|
|
21328
|
-
* This property can be read in early-execution mode.
|
|
21329
|
-
*
|
|
21330
|
-
*/
|
|
21331
|
-
reason: CustomCommandErrorReason;
|
|
21332
18948
|
}
|
|
21333
18949
|
|
|
21334
18950
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -21362,14 +18978,6 @@ export class EnchantmentTypeUnknownIdError extends Error {
|
|
|
21362
18978
|
private constructor();
|
|
21363
18979
|
}
|
|
21364
18980
|
|
|
21365
|
-
/**
|
|
21366
|
-
* @beta
|
|
21367
|
-
*/
|
|
21368
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21369
|
-
export class InvalidContainerError extends Error {
|
|
21370
|
-
private constructor();
|
|
21371
|
-
}
|
|
21372
|
-
|
|
21373
18981
|
/**
|
|
21374
18982
|
* The container slot is invalid. This can occur when the
|
|
21375
18983
|
* owning container is destroyed or unloaded.
|
|
@@ -21517,7 +19125,10 @@ export const HudVisibilityCount = 2;
|
|
|
21517
19125
|
*/
|
|
21518
19126
|
export const MoonPhaseCount = 8;
|
|
21519
19127
|
/**
|
|
21520
|
-
* @
|
|
19128
|
+
* @rc
|
|
19129
|
+
* @remarks
|
|
19130
|
+
* How many times the server ticks in one in-game day.
|
|
19131
|
+
*
|
|
21521
19132
|
*/
|
|
21522
19133
|
export const TicksPerDay = 24000;
|
|
21523
19134
|
/**
|