@minecraft/server 2.0.0-beta.1.21.80-preview.22 → 2.0.0-beta.1.21.80-preview.27
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 +539 -366
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -141,6 +141,43 @@ export enum ButtonState {
|
|
|
141
141
|
Released = 'Released',
|
|
142
142
|
}
|
|
143
143
|
|
|
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
|
+
|
|
144
181
|
/**
|
|
145
182
|
* @beta
|
|
146
183
|
* The Action enum determines how the CompoundBlockVolume
|
|
@@ -201,6 +238,20 @@ export enum CustomCommandErrorReason {
|
|
|
201
238
|
*
|
|
202
239
|
*/
|
|
203
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',
|
|
204
255
|
/**
|
|
205
256
|
* @remarks
|
|
206
257
|
* Too many command parameters defined in CustomCommand.
|
|
@@ -225,54 +276,95 @@ export enum CustomCommandErrorReason {
|
|
|
225
276
|
|
|
226
277
|
/**
|
|
227
278
|
* @beta
|
|
279
|
+
* The types of paramaters accepted by a custom command.
|
|
228
280
|
*/
|
|
229
281
|
export enum CustomCommandParamType {
|
|
282
|
+
/**
|
|
283
|
+
* @remarks
|
|
284
|
+
* Command boolean parameter expecting true or false as input.
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
230
287
|
Boolean = 0,
|
|
288
|
+
/**
|
|
289
|
+
* @remarks
|
|
290
|
+
* Command integer parameter.
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
231
293
|
Integer = 1,
|
|
294
|
+
/**
|
|
295
|
+
* @remarks
|
|
296
|
+
* Command float parameter.
|
|
297
|
+
*
|
|
298
|
+
*/
|
|
232
299
|
Float = 2,
|
|
300
|
+
/**
|
|
301
|
+
* @remarks
|
|
302
|
+
* Command string parameter.
|
|
303
|
+
*
|
|
304
|
+
*/
|
|
233
305
|
String = 3,
|
|
306
|
+
/**
|
|
307
|
+
* @remarks
|
|
308
|
+
* Command entity selector parameter.
|
|
309
|
+
*
|
|
310
|
+
*/
|
|
234
311
|
EntitySelector = 4,
|
|
312
|
+
/**
|
|
313
|
+
* @remarks
|
|
314
|
+
* Command player selector parameter.
|
|
315
|
+
*
|
|
316
|
+
*/
|
|
235
317
|
PlayerSelector = 5,
|
|
236
|
-
|
|
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
|
+
*/
|
|
237
329
|
BlockType = 7,
|
|
238
|
-
ItemType = 8,
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* @beta
|
|
243
|
-
* The required permission level to execute the custom command.
|
|
244
|
-
*/
|
|
245
|
-
export enum CustomCommandPermissionLevel {
|
|
246
330
|
/**
|
|
247
331
|
* @remarks
|
|
248
|
-
*
|
|
332
|
+
* Command item name parameter.
|
|
249
333
|
*
|
|
250
334
|
*/
|
|
251
|
-
|
|
335
|
+
ItemType = 8,
|
|
252
336
|
/**
|
|
253
337
|
* @remarks
|
|
254
|
-
*
|
|
338
|
+
* Command enum parameter.
|
|
255
339
|
*
|
|
256
340
|
*/
|
|
257
|
-
|
|
341
|
+
Enum = 9,
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @beta
|
|
346
|
+
* Who executed the command.
|
|
347
|
+
*/
|
|
348
|
+
export enum CustomCommandSource {
|
|
258
349
|
/**
|
|
259
350
|
* @remarks
|
|
260
|
-
*
|
|
351
|
+
* Command originated from a command block.
|
|
261
352
|
*
|
|
262
353
|
*/
|
|
263
|
-
|
|
354
|
+
Block = 'Block',
|
|
264
355
|
/**
|
|
265
356
|
* @remarks
|
|
266
|
-
*
|
|
357
|
+
* Command originated from an entity or player.
|
|
267
358
|
*
|
|
268
359
|
*/
|
|
269
|
-
|
|
360
|
+
Entity = 'Entity',
|
|
361
|
+
NPCDialogue = 'NPCDialogue',
|
|
270
362
|
/**
|
|
271
363
|
* @remarks
|
|
272
|
-
*
|
|
364
|
+
* Command originated from the server.
|
|
273
365
|
*
|
|
274
366
|
*/
|
|
275
|
-
|
|
367
|
+
Server = 'Server',
|
|
276
368
|
}
|
|
277
369
|
|
|
278
370
|
/**
|
|
@@ -289,35 +381,35 @@ export enum CustomComponentNameErrorReason {
|
|
|
289
381
|
}
|
|
290
382
|
|
|
291
383
|
/**
|
|
292
|
-
* @
|
|
384
|
+
* @rc
|
|
293
385
|
* An enumeration for the various difficulty levels of
|
|
294
386
|
* Minecraft.
|
|
295
387
|
*/
|
|
296
388
|
export enum Difficulty {
|
|
297
389
|
/**
|
|
298
390
|
* @remarks
|
|
299
|
-
*
|
|
391
|
+
* Easy difficulty level.
|
|
300
392
|
*
|
|
301
393
|
*/
|
|
302
|
-
|
|
394
|
+
Easy = 'Easy',
|
|
303
395
|
/**
|
|
304
396
|
* @remarks
|
|
305
|
-
*
|
|
397
|
+
* Hard difficulty level.
|
|
306
398
|
*
|
|
307
399
|
*/
|
|
308
|
-
|
|
400
|
+
Hard = 'Hard',
|
|
309
401
|
/**
|
|
310
402
|
* @remarks
|
|
311
403
|
* Normal difficulty level.
|
|
312
404
|
*
|
|
313
405
|
*/
|
|
314
|
-
Normal =
|
|
406
|
+
Normal = 'Normal',
|
|
315
407
|
/**
|
|
316
408
|
* @remarks
|
|
317
|
-
*
|
|
409
|
+
* Peaceful difficulty level.
|
|
318
410
|
*
|
|
319
411
|
*/
|
|
320
|
-
|
|
412
|
+
Peaceful = 'Peaceful',
|
|
321
413
|
}
|
|
322
414
|
|
|
323
415
|
/**
|
|
@@ -644,13 +736,6 @@ export enum EntityComponentTypes {
|
|
|
644
736
|
*
|
|
645
737
|
*/
|
|
646
738
|
FrictionModifier = 'minecraft:friction_modifier',
|
|
647
|
-
/**
|
|
648
|
-
* @remarks
|
|
649
|
-
* Sets the offset from the ground that the entity is actually
|
|
650
|
-
* at.
|
|
651
|
-
*
|
|
652
|
-
*/
|
|
653
|
-
GroundOffset = 'minecraft:ground_offset',
|
|
654
739
|
/**
|
|
655
740
|
* @remarks
|
|
656
741
|
* Defines the interactions with this entity for healing it.
|
|
@@ -1528,6 +1613,10 @@ export enum GameRule {
|
|
|
1528
1613
|
*
|
|
1529
1614
|
*/
|
|
1530
1615
|
KeepInventory = 'keepInventory',
|
|
1616
|
+
/**
|
|
1617
|
+
* @beta
|
|
1618
|
+
*/
|
|
1619
|
+
LocatorBar = 'locatorBar',
|
|
1531
1620
|
/**
|
|
1532
1621
|
* @remarks
|
|
1533
1622
|
* The maximum number of chained commands that can execute per
|
|
@@ -2525,7 +2614,7 @@ export enum WeatherType {
|
|
|
2525
2614
|
|
|
2526
2615
|
export type BlockComponentReturnType<T extends string> = T extends keyof BlockComponentTypeMap
|
|
2527
2616
|
? BlockComponentTypeMap[T]
|
|
2528
|
-
:
|
|
2617
|
+
: BlockCustomComponentInstance;
|
|
2529
2618
|
|
|
2530
2619
|
export type BlockComponentTypeMap = {
|
|
2531
2620
|
destruction_particles: BlockDestructionParticlesComponent;
|
|
@@ -2575,7 +2664,6 @@ export type EntityComponentTypeMap = {
|
|
|
2575
2664
|
floats_in_liquid: EntityFloatsInLiquidComponent;
|
|
2576
2665
|
flying_speed: EntityFlyingSpeedComponent;
|
|
2577
2666
|
friction_modifier: EntityFrictionModifierComponent;
|
|
2578
|
-
ground_offset: EntityGroundOffsetComponent;
|
|
2579
2667
|
healable: EntityHealableComponent;
|
|
2580
2668
|
health: EntityHealthComponent;
|
|
2581
2669
|
inventory: EntityInventoryComponent;
|
|
@@ -2610,7 +2698,6 @@ export type EntityComponentTypeMap = {
|
|
|
2610
2698
|
'minecraft:floats_in_liquid': EntityFloatsInLiquidComponent;
|
|
2611
2699
|
'minecraft:flying_speed': EntityFlyingSpeedComponent;
|
|
2612
2700
|
'minecraft:friction_modifier': EntityFrictionModifierComponent;
|
|
2613
|
-
'minecraft:ground_offset': EntityGroundOffsetComponent;
|
|
2614
2701
|
'minecraft:healable': EntityHealableComponent;
|
|
2615
2702
|
'minecraft:health': EntityHealthComponent;
|
|
2616
2703
|
'minecraft:inventory': EntityInventoryComponent;
|
|
@@ -2747,8 +2834,6 @@ export class AimAssistCategory {
|
|
|
2747
2834
|
* getBlockPriorities.
|
|
2748
2835
|
*
|
|
2749
2836
|
* @throws This property can throw when used.
|
|
2750
|
-
*
|
|
2751
|
-
* {@link Error}
|
|
2752
2837
|
*/
|
|
2753
2838
|
readonly defaultBlockPriority: number;
|
|
2754
2839
|
/**
|
|
@@ -2757,8 +2842,6 @@ export class AimAssistCategory {
|
|
|
2757
2842
|
* in getEntityPriorities.
|
|
2758
2843
|
*
|
|
2759
2844
|
* @throws This property can throw when used.
|
|
2760
|
-
*
|
|
2761
|
-
* {@link Error}
|
|
2762
2845
|
*/
|
|
2763
2846
|
readonly defaultEntityPriority: number;
|
|
2764
2847
|
/**
|
|
@@ -2775,8 +2858,6 @@ export class AimAssistCategory {
|
|
|
2775
2858
|
* The record mapping block Ids to their priority settings.
|
|
2776
2859
|
* Larger numbers have greater priority.
|
|
2777
2860
|
* @throws This function can throw errors.
|
|
2778
|
-
*
|
|
2779
|
-
* {@link Error}
|
|
2780
2861
|
*/
|
|
2781
2862
|
getBlockPriorities(): Record<string, number>;
|
|
2782
2863
|
/**
|
|
@@ -2787,8 +2868,6 @@ export class AimAssistCategory {
|
|
|
2787
2868
|
* The record mapping entity Ids to their priority settings.
|
|
2788
2869
|
* Larger numbers have greater priority.
|
|
2789
2870
|
* @throws This function can throw errors.
|
|
2790
|
-
*
|
|
2791
|
-
* {@link Error}
|
|
2792
2871
|
*/
|
|
2793
2872
|
getEntityPriorities(): Record<string, number>;
|
|
2794
2873
|
}
|
|
@@ -2890,8 +2969,6 @@ export class AimAssistPreset {
|
|
|
2890
2969
|
* provided to setItemSettings.
|
|
2891
2970
|
*
|
|
2892
2971
|
* @throws This property can throw when used.
|
|
2893
|
-
*
|
|
2894
|
-
* {@link Error}
|
|
2895
2972
|
*/
|
|
2896
2973
|
readonly defaultItemSettings?: string;
|
|
2897
2974
|
/**
|
|
@@ -2899,8 +2976,6 @@ export class AimAssistPreset {
|
|
|
2899
2976
|
* Optional. Aim-assist category Id used for an empty hand.
|
|
2900
2977
|
*
|
|
2901
2978
|
* @throws This property can throw when used.
|
|
2902
|
-
*
|
|
2903
|
-
* {@link Error}
|
|
2904
2979
|
*/
|
|
2905
2980
|
readonly handSettings?: string;
|
|
2906
2981
|
/**
|
|
@@ -2917,8 +2992,6 @@ export class AimAssistPreset {
|
|
|
2917
2992
|
* @returns
|
|
2918
2993
|
* The array of block/entity Ids.
|
|
2919
2994
|
* @throws This function can throw errors.
|
|
2920
|
-
*
|
|
2921
|
-
* {@link Error}
|
|
2922
2995
|
*/
|
|
2923
2996
|
getExcludedTargets(): string[];
|
|
2924
2997
|
/**
|
|
@@ -2928,8 +3001,6 @@ export class AimAssistPreset {
|
|
|
2928
3001
|
* @returns
|
|
2929
3002
|
* The record mapping item Ids to aim-assist category Ids.
|
|
2930
3003
|
* @throws This function can throw errors.
|
|
2931
|
-
*
|
|
2932
|
-
* {@link Error}
|
|
2933
3004
|
*/
|
|
2934
3005
|
getItemSettings(): Record<string, string>;
|
|
2935
3006
|
/**
|
|
@@ -2940,8 +3011,6 @@ export class AimAssistPreset {
|
|
|
2940
3011
|
* @returns
|
|
2941
3012
|
* The array of item Ids.
|
|
2942
3013
|
* @throws This function can throw errors.
|
|
2943
|
-
*
|
|
2944
|
-
* {@link Error}
|
|
2945
3014
|
*/
|
|
2946
3015
|
getLiquidTargetingItems(): string[];
|
|
2947
3016
|
}
|
|
@@ -3343,6 +3412,7 @@ export class Block {
|
|
|
3343
3412
|
*
|
|
3344
3413
|
* @param steps
|
|
3345
3414
|
* Number of steps above to step before returning.
|
|
3415
|
+
* Defaults to: 1
|
|
3346
3416
|
* @throws This function can throw errors.
|
|
3347
3417
|
*
|
|
3348
3418
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3357,6 +3427,7 @@ export class Block {
|
|
|
3357
3427
|
*
|
|
3358
3428
|
* @param steps
|
|
3359
3429
|
* Number of steps below to step before returning.
|
|
3430
|
+
* Defaults to: 1
|
|
3360
3431
|
* @throws This function can throw errors.
|
|
3361
3432
|
*
|
|
3362
3433
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3445,6 +3516,7 @@ export class Block {
|
|
|
3445
3516
|
*
|
|
3446
3517
|
* @param steps
|
|
3447
3518
|
* Number of steps to the east to step before returning.
|
|
3519
|
+
* Defaults to: 1
|
|
3448
3520
|
* @throws This function can throw errors.
|
|
3449
3521
|
*
|
|
3450
3522
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3461,8 +3533,9 @@ export class Block {
|
|
|
3461
3533
|
* @param componentId
|
|
3462
3534
|
* The identifier of the component (e.g.,
|
|
3463
3535
|
* 'minecraft:inventory'). If no namespace prefix is specified,
|
|
3464
|
-
* 'minecraft:' is assumed. Available component IDs
|
|
3465
|
-
*
|
|
3536
|
+
* 'minecraft:' is assumed. Available component IDs are those
|
|
3537
|
+
* in the {@link BlockComponentTypes} enum and custom component
|
|
3538
|
+
* IDs registered with the {@link BlockComponentRegistry}.
|
|
3466
3539
|
* @returns
|
|
3467
3540
|
* Returns the component if it exists on the block, otherwise
|
|
3468
3541
|
* undefined.
|
|
@@ -3481,9 +3554,11 @@ export class Block {
|
|
|
3481
3554
|
* @param amount
|
|
3482
3555
|
* Number of instances of this block to place in the item
|
|
3483
3556
|
* stack.
|
|
3557
|
+
* Defaults to: 1
|
|
3484
3558
|
* @param withData
|
|
3485
3559
|
* Whether additional data facets of the item stack are
|
|
3486
3560
|
* included.
|
|
3561
|
+
* Defaults to: false
|
|
3487
3562
|
* @returns
|
|
3488
3563
|
* An itemStack with the specified amount of items and data.
|
|
3489
3564
|
* Returns undefined if block type is incompatible.
|
|
@@ -3644,6 +3719,7 @@ export class Block {
|
|
|
3644
3719
|
*
|
|
3645
3720
|
* @param steps
|
|
3646
3721
|
* Number of steps to the north to step before returning.
|
|
3722
|
+
* Defaults to: 1
|
|
3647
3723
|
* @throws This function can throw errors.
|
|
3648
3724
|
*
|
|
3649
3725
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3729,6 +3805,7 @@ export class Block {
|
|
|
3729
3805
|
*
|
|
3730
3806
|
* @param steps
|
|
3731
3807
|
* Number of steps to the south to step before returning.
|
|
3808
|
+
* Defaults to: 1
|
|
3732
3809
|
* @throws This function can throw errors.
|
|
3733
3810
|
*
|
|
3734
3811
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3764,6 +3841,7 @@ export class Block {
|
|
|
3764
3841
|
*
|
|
3765
3842
|
* @param steps
|
|
3766
3843
|
* Number of steps to the west to step before returning.
|
|
3844
|
+
* Defaults to: 1
|
|
3767
3845
|
* @throws This function can throw errors.
|
|
3768
3846
|
*
|
|
3769
3847
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -3773,6 +3851,137 @@ export class Block {
|
|
|
3773
3851
|
west(steps?: number): Block | undefined;
|
|
3774
3852
|
}
|
|
3775
3853
|
|
|
3854
|
+
/**
|
|
3855
|
+
* @beta
|
|
3856
|
+
* Bounding Box Utils is a utility class that provides a number
|
|
3857
|
+
* of useful functions for the creation and utility of {@link
|
|
3858
|
+
* BlockBoundingBox} objects
|
|
3859
|
+
*/
|
|
3860
|
+
export class BlockBoundingBoxUtils {
|
|
3861
|
+
private constructor();
|
|
3862
|
+
/**
|
|
3863
|
+
* @remarks
|
|
3864
|
+
* Create a validated instance of a {@link BlockBoundingBox}
|
|
3865
|
+
* where the min and max components are guaranteed to be (min
|
|
3866
|
+
* <= max)
|
|
3867
|
+
*
|
|
3868
|
+
* This function can't be called in read-only mode.
|
|
3869
|
+
*
|
|
3870
|
+
* @param min
|
|
3871
|
+
* A corner world location
|
|
3872
|
+
* @param max
|
|
3873
|
+
* A corner world location diametrically opposite
|
|
3874
|
+
*/
|
|
3875
|
+
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
3876
|
+
/**
|
|
3877
|
+
* @remarks
|
|
3878
|
+
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
3879
|
+
* each axis.
|
|
3880
|
+
* Sizes can be negative to perform contraction.
|
|
3881
|
+
* Note: corners can be inverted if the contraction size is
|
|
3882
|
+
* greater than the span, but the min/max relationship will
|
|
3883
|
+
* remain correct
|
|
3884
|
+
*
|
|
3885
|
+
* This function can't be called in read-only mode.
|
|
3886
|
+
*
|
|
3887
|
+
* @returns
|
|
3888
|
+
* Return a new {@link BlockBoundingBox} object representing
|
|
3889
|
+
* the changes
|
|
3890
|
+
*/
|
|
3891
|
+
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
3892
|
+
/**
|
|
3893
|
+
* @remarks
|
|
3894
|
+
* Check if two {@link BlockBoundingBox} objects are identical
|
|
3895
|
+
*
|
|
3896
|
+
* This function can't be called in read-only mode.
|
|
3897
|
+
*
|
|
3898
|
+
*/
|
|
3899
|
+
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3900
|
+
/**
|
|
3901
|
+
* @remarks
|
|
3902
|
+
* Expand the initial box object bounds to include the 2nd box
|
|
3903
|
+
* argument. The resultant {@link BlockBoundingBox} object
|
|
3904
|
+
* will be a BlockBoundingBox which exactly encompasses the two
|
|
3905
|
+
* boxes.
|
|
3906
|
+
*
|
|
3907
|
+
* This function can't be called in read-only mode.
|
|
3908
|
+
*
|
|
3909
|
+
* @returns
|
|
3910
|
+
* A new {@link BlockBoundingBox} instance representing the
|
|
3911
|
+
* smallest possible bounding box which can encompass both
|
|
3912
|
+
*/
|
|
3913
|
+
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
3914
|
+
/**
|
|
3915
|
+
* @remarks
|
|
3916
|
+
* Calculate the center block of a given {@link
|
|
3917
|
+
* BlockBoundingBox} object.
|
|
3918
|
+
*
|
|
3919
|
+
* This function can't be called in read-only mode.
|
|
3920
|
+
*
|
|
3921
|
+
* @returns
|
|
3922
|
+
* Note that {@link BlockBoundingBox} objects represent whole
|
|
3923
|
+
* blocks, so the center of boxes which have odd numbered
|
|
3924
|
+
* bounds are not mathematically centered...
|
|
3925
|
+
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
3926
|
+
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
3927
|
+
*/
|
|
3928
|
+
static getCenter(box: BlockBoundingBox): Vector3;
|
|
3929
|
+
/**
|
|
3930
|
+
* @remarks
|
|
3931
|
+
* Calculate the BlockBoundingBox which represents the union
|
|
3932
|
+
* area of two intersecting BlockBoundingBoxes
|
|
3933
|
+
*
|
|
3934
|
+
* This function can't be called in read-only mode.
|
|
3935
|
+
*
|
|
3936
|
+
*/
|
|
3937
|
+
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
3938
|
+
/**
|
|
3939
|
+
* @remarks
|
|
3940
|
+
* Get the Span of each of the BlockBoundingBox Axis components
|
|
3941
|
+
*
|
|
3942
|
+
* This function can't be called in read-only mode.
|
|
3943
|
+
*
|
|
3944
|
+
*/
|
|
3945
|
+
static getSpan(box: BlockBoundingBox): Vector3;
|
|
3946
|
+
/**
|
|
3947
|
+
* @remarks
|
|
3948
|
+
* Check to see if two BlockBoundingBox objects intersect
|
|
3949
|
+
*
|
|
3950
|
+
* This function can't be called in read-only mode.
|
|
3951
|
+
*
|
|
3952
|
+
*/
|
|
3953
|
+
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3954
|
+
/**
|
|
3955
|
+
* @remarks
|
|
3956
|
+
* Check to see if a given coordinate is inside a
|
|
3957
|
+
* BlockBoundingBox
|
|
3958
|
+
*
|
|
3959
|
+
* This function can't be called in read-only mode.
|
|
3960
|
+
*
|
|
3961
|
+
*/
|
|
3962
|
+
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
3963
|
+
/**
|
|
3964
|
+
* @remarks
|
|
3965
|
+
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
3966
|
+
* max))
|
|
3967
|
+
*
|
|
3968
|
+
* This function can't be called in read-only mode.
|
|
3969
|
+
*
|
|
3970
|
+
*/
|
|
3971
|
+
static isValid(box: BlockBoundingBox): boolean;
|
|
3972
|
+
/**
|
|
3973
|
+
* @remarks
|
|
3974
|
+
* Move a BlockBoundingBox by a given amount
|
|
3975
|
+
*
|
|
3976
|
+
* This function can't be called in read-only mode.
|
|
3977
|
+
*
|
|
3978
|
+
* @returns
|
|
3979
|
+
* Return a new BlockBoundingBox object which represents the
|
|
3980
|
+
* change
|
|
3981
|
+
*/
|
|
3982
|
+
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3776
3985
|
/**
|
|
3777
3986
|
* Base type for components associated with blocks.
|
|
3778
3987
|
*/
|
|
@@ -3980,6 +4189,15 @@ export class BlockComponentTickEvent extends BlockEvent {
|
|
|
3980
4189
|
private constructor();
|
|
3981
4190
|
}
|
|
3982
4191
|
|
|
4192
|
+
/**
|
|
4193
|
+
* @beta
|
|
4194
|
+
* An instance of a custom component on a block.
|
|
4195
|
+
*/
|
|
4196
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4197
|
+
export class BlockCustomComponentInstance extends BlockComponent {
|
|
4198
|
+
private constructor();
|
|
4199
|
+
}
|
|
4200
|
+
|
|
3983
4201
|
/**
|
|
3984
4202
|
* @beta
|
|
3985
4203
|
* Represents the particles that appear when the block is
|
|
@@ -3993,8 +4211,6 @@ export class BlockDestructionParticlesComponent extends BlockComponent {
|
|
|
3993
4211
|
* Name of the texture used for the particles.
|
|
3994
4212
|
*
|
|
3995
4213
|
* @throws This property can throw when used.
|
|
3996
|
-
*
|
|
3997
|
-
* {@link Error}
|
|
3998
4214
|
*/
|
|
3999
4215
|
readonly texture: string;
|
|
4000
4216
|
/**
|
|
@@ -4002,8 +4218,6 @@ export class BlockDestructionParticlesComponent extends BlockComponent {
|
|
|
4002
4218
|
* Type of tint applied to the particles.
|
|
4003
4219
|
*
|
|
4004
4220
|
* @throws This property can throw when used.
|
|
4005
|
-
*
|
|
4006
|
-
* {@link Error}
|
|
4007
4221
|
*/
|
|
4008
4222
|
readonly tintMethod: TintMethod;
|
|
4009
4223
|
static readonly componentId = 'minecraft:destruction_particles';
|
|
@@ -4113,8 +4327,6 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
4113
4327
|
* This function can't be called in read-only mode.
|
|
4114
4328
|
*
|
|
4115
4329
|
* @throws This function can throw errors.
|
|
4116
|
-
*
|
|
4117
|
-
* {@link Error}
|
|
4118
4330
|
*/
|
|
4119
4331
|
addDye(dye: ItemType): void;
|
|
4120
4332
|
/**
|
|
@@ -4124,8 +4336,6 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
4124
4336
|
* This function can't be called in read-only mode.
|
|
4125
4337
|
*
|
|
4126
4338
|
* @throws This function can throw errors.
|
|
4127
|
-
*
|
|
4128
|
-
* {@link Error}
|
|
4129
4339
|
*/
|
|
4130
4340
|
getFluidType(): FluidType;
|
|
4131
4341
|
/**
|
|
@@ -4135,8 +4345,6 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
4135
4345
|
* This function can't be called in read-only mode.
|
|
4136
4346
|
*
|
|
4137
4347
|
* @throws This function can throw errors.
|
|
4138
|
-
*
|
|
4139
|
-
* {@link Error}
|
|
4140
4348
|
*/
|
|
4141
4349
|
setFluidType(fluidType: FluidType): void;
|
|
4142
4350
|
/**
|
|
@@ -4147,8 +4355,6 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
4147
4355
|
* This function can't be called in read-only mode.
|
|
4148
4356
|
*
|
|
4149
4357
|
* @throws This function can throw errors.
|
|
4150
|
-
*
|
|
4151
|
-
* {@link Error}
|
|
4152
4358
|
*/
|
|
4153
4359
|
setPotion(itemStack: ItemStack): void;
|
|
4154
4360
|
}
|
|
@@ -4258,8 +4464,6 @@ export class BlockMapColorComponent extends BlockComponent {
|
|
|
4258
4464
|
* Base map color defined for that block.
|
|
4259
4465
|
*
|
|
4260
4466
|
* @throws This property can throw when used.
|
|
4261
|
-
*
|
|
4262
|
-
* {@link Error}
|
|
4263
4467
|
*/
|
|
4264
4468
|
readonly color: RGBA;
|
|
4265
4469
|
/**
|
|
@@ -4274,8 +4478,6 @@ export class BlockMapColorComponent extends BlockComponent {
|
|
|
4274
4478
|
* Type of tint applied to the color.
|
|
4275
4479
|
*
|
|
4276
4480
|
* @throws This property can throw when used.
|
|
4277
|
-
*
|
|
4278
|
-
* {@link Error}
|
|
4279
4481
|
*/
|
|
4280
4482
|
readonly tintMethod: TintMethod;
|
|
4281
4483
|
static readonly componentId = 'minecraft:map_color';
|
|
@@ -4330,8 +4532,6 @@ export class BlockPermutation {
|
|
|
4330
4532
|
* @returns
|
|
4331
4533
|
* Whether this block is removed when touched by liquid.
|
|
4332
4534
|
* @throws This function can throw errors.
|
|
4333
|
-
*
|
|
4334
|
-
* {@link Error}
|
|
4335
4535
|
*/
|
|
4336
4536
|
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
4337
4537
|
/**
|
|
@@ -4344,8 +4544,6 @@ export class BlockPermutation {
|
|
|
4344
4544
|
* @returns
|
|
4345
4545
|
* Whether this block can have a liquid placed over it.
|
|
4346
4546
|
* @throws This function can throw errors.
|
|
4347
|
-
*
|
|
4348
|
-
* {@link Error}
|
|
4349
4547
|
*/
|
|
4350
4548
|
canContainLiquid(liquidType: LiquidType): boolean;
|
|
4351
4549
|
/**
|
|
@@ -4367,6 +4565,7 @@ export class BlockPermutation {
|
|
|
4367
4565
|
* @param amount
|
|
4368
4566
|
* Number of instances of this block to place in the prototype
|
|
4369
4567
|
* item stack.
|
|
4568
|
+
* Defaults to: 1
|
|
4370
4569
|
*/
|
|
4371
4570
|
getItemStack(amount?: number): ItemStack | undefined;
|
|
4372
4571
|
/**
|
|
@@ -4421,8 +4620,6 @@ export class BlockPermutation {
|
|
|
4421
4620
|
* @returns
|
|
4422
4621
|
* Whether this block stops liquid from flowing.
|
|
4423
4622
|
* @throws This function can throw errors.
|
|
4424
|
-
*
|
|
4425
|
-
* {@link Error}
|
|
4426
4623
|
*/
|
|
4427
4624
|
isLiquidBlocking(liquidType: LiquidType): boolean;
|
|
4428
4625
|
/**
|
|
@@ -4436,8 +4633,6 @@ export class BlockPermutation {
|
|
|
4436
4633
|
* Whether this block is removed and spawns its item when
|
|
4437
4634
|
* touched by liquid.
|
|
4438
4635
|
* @throws This function can throw errors.
|
|
4439
|
-
*
|
|
4440
|
-
* {@link Error}
|
|
4441
4636
|
*/
|
|
4442
4637
|
liquidSpreadCausesSpawn(liquidType: LiquidType): boolean;
|
|
4443
4638
|
/**
|
|
@@ -4624,6 +4819,8 @@ export class BlockRecordPlayerComponent extends BlockComponent {
|
|
|
4624
4819
|
*
|
|
4625
4820
|
* This function can't be called in read-only mode.
|
|
4626
4821
|
*
|
|
4822
|
+
* @param startPlaying
|
|
4823
|
+
* Defaults to: true
|
|
4627
4824
|
* @throws This function can throw errors.
|
|
4628
4825
|
*/
|
|
4629
4826
|
setRecord(recordItemType?: ItemType | string, startPlaying?: boolean): void;
|
|
@@ -4764,6 +4961,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4764
4961
|
* The side of the sign to read the message from. If not
|
|
4765
4962
|
* provided, this will return the message from the front side
|
|
4766
4963
|
* of the sign.
|
|
4964
|
+
* Defaults to: 0
|
|
4767
4965
|
* @throws This function can throw errors.
|
|
4768
4966
|
*/
|
|
4769
4967
|
getRawText(side?: SignSide): RawText | undefined;
|
|
@@ -4776,6 +4974,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4776
4974
|
* The side of the sign to read the message from. If not
|
|
4777
4975
|
* provided, this will return the message from the front side
|
|
4778
4976
|
* of the sign.
|
|
4977
|
+
* Defaults to: 0
|
|
4779
4978
|
* @throws This function can throw errors.
|
|
4780
4979
|
*/
|
|
4781
4980
|
getText(side?: SignSide): string | undefined;
|
|
@@ -4787,6 +4986,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4787
4986
|
* @param side
|
|
4788
4987
|
* The side of the sign to read the dye from. If not provided,
|
|
4789
4988
|
* this will return the dye on the front side of the sign.
|
|
4989
|
+
* Defaults to: 0
|
|
4790
4990
|
* @throws This function can throw errors.
|
|
4791
4991
|
*/
|
|
4792
4992
|
getTextDyeColor(side?: SignSide): DyeColor | undefined;
|
|
@@ -4806,6 +5006,7 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4806
5006
|
* The side of the sign the message will be set on. If not
|
|
4807
5007
|
* provided, the message will be set on the front side of the
|
|
4808
5008
|
* sign.
|
|
5009
|
+
* Defaults to: 0
|
|
4809
5010
|
* @throws
|
|
4810
5011
|
* Throws if the provided message is greater than 512
|
|
4811
5012
|
* characters in length.
|
|
@@ -4820,10 +5021,12 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
4820
5021
|
* @param color
|
|
4821
5022
|
* The dye color to apply to the sign or undefined to clear the
|
|
4822
5023
|
* dye on the sign.
|
|
5024
|
+
* Defaults to: null
|
|
4823
5025
|
* @param side
|
|
4824
5026
|
* The side of the sign the color will be set on. If not
|
|
4825
5027
|
* provided, the color will be set on the front side of the
|
|
4826
5028
|
* sign.
|
|
5029
|
+
* Defaults to: 0
|
|
4827
5030
|
* @throws This function can throw errors.
|
|
4828
5031
|
*/
|
|
4829
5032
|
setTextDyeColor(color?: DyeColor, side?: SignSide): void;
|
|
@@ -4977,226 +5180,100 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
4977
5180
|
*
|
|
4978
5181
|
*
|
|
4979
5182
|
* @param pos
|
|
4980
|
-
* The world block location to test
|
|
4981
|
-
* @returns
|
|
4982
|
-
* If the location is either inside or more than 0 blocks away,
|
|
4983
|
-
* the function will return false.
|
|
4984
|
-
* If the location is directly contacting the outer surface of
|
|
4985
|
-
* the BlockVolume, the function will return true.
|
|
4986
|
-
*/
|
|
4987
|
-
doesLocationTouchFaces(pos: Vector3): boolean;
|
|
4988
|
-
/**
|
|
4989
|
-
* @remarks
|
|
4990
|
-
* Check to see if a two block volumes are directly adjacent
|
|
4991
|
-
* and two faces touch.
|
|
4992
|
-
*
|
|
4993
|
-
* @param other
|
|
4994
|
-
* The volume to test
|
|
4995
|
-
* @returns
|
|
4996
|
-
* If the outer faces of both block volumes touch and are
|
|
4997
|
-
* directly adjacent at any point, return true.
|
|
4998
|
-
*/
|
|
4999
|
-
doesVolumeTouchFaces(other: BlockVolume): boolean;
|
|
5000
|
-
/**
|
|
5001
|
-
* @remarks
|
|
5002
|
-
* Return an enumeration which represents the intersection
|
|
5003
|
-
* between two BlockVolume objects
|
|
5004
|
-
*
|
|
5005
|
-
*/
|
|
5006
|
-
intersects(other: BlockVolume): BlockVolumeIntersection;
|
|
5007
|
-
}
|
|
5008
|
-
|
|
5009
|
-
/**
|
|
5010
|
-
* Base type for BlockVolumes.
|
|
5011
|
-
*/
|
|
5012
|
-
export class BlockVolumeBase {
|
|
5013
|
-
private constructor();
|
|
5014
|
-
/**
|
|
5015
|
-
* @remarks
|
|
5016
|
-
* Fetch a {@link BlockLocationIterator} that represents all of
|
|
5017
|
-
* the block world locations within the specified volume
|
|
5018
|
-
*
|
|
5019
|
-
*/
|
|
5020
|
-
getBlockLocationIterator(): BlockLocationIterator;
|
|
5021
|
-
/**
|
|
5022
|
-
* @beta
|
|
5023
|
-
* @remarks
|
|
5024
|
-
* Return a {@link BoundingBox} object which represents the
|
|
5025
|
-
* validated min and max coordinates of the volume
|
|
5026
|
-
*
|
|
5027
|
-
* @throws This function can throw errors.
|
|
5028
|
-
*/
|
|
5029
|
-
getBoundingBox(): BoundingBox;
|
|
5030
|
-
/**
|
|
5031
|
-
* @remarks
|
|
5032
|
-
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
5033
|
-
*
|
|
5034
|
-
*/
|
|
5035
|
-
getCapacity(): number;
|
|
5036
|
-
/**
|
|
5037
|
-
* @remarks
|
|
5038
|
-
* Get the largest corner position of the volume (guaranteed to
|
|
5039
|
-
* be >= min)
|
|
5040
|
-
*
|
|
5041
|
-
* @throws This function can throw errors.
|
|
5042
|
-
*/
|
|
5043
|
-
getMax(): Vector3;
|
|
5044
|
-
/**
|
|
5045
|
-
* @remarks
|
|
5046
|
-
* Get the smallest corner position of the volume (guaranteed
|
|
5047
|
-
* to be <= max)
|
|
5048
|
-
*
|
|
5049
|
-
* @throws This function can throw errors.
|
|
5050
|
-
*/
|
|
5051
|
-
getMin(): Vector3;
|
|
5052
|
-
/**
|
|
5053
|
-
* @remarks
|
|
5054
|
-
* Get a {@link Vector3} object where each component represents
|
|
5055
|
-
* the number of blocks along that axis
|
|
5056
|
-
*
|
|
5057
|
-
*/
|
|
5058
|
-
getSpan(): Vector3;
|
|
5059
|
-
/**
|
|
5060
|
-
* @remarks
|
|
5061
|
-
* Check to see if a given world block location is inside a
|
|
5062
|
-
* BlockVolume
|
|
5063
|
-
*
|
|
5064
|
-
*/
|
|
5065
|
-
isInside(location: Vector3): boolean;
|
|
5066
|
-
/**
|
|
5067
|
-
* @remarks
|
|
5068
|
-
* Move a BlockVolume by a specified amount
|
|
5069
|
-
*
|
|
5070
|
-
* @param delta
|
|
5071
|
-
* Amount of blocks to move by
|
|
5072
|
-
*/
|
|
5073
|
-
translate(delta: Vector3): void;
|
|
5074
|
-
}
|
|
5075
|
-
|
|
5076
|
-
/**
|
|
5077
|
-
* @beta
|
|
5078
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
5079
|
-
* of useful functions for the creation and utility of {@link
|
|
5080
|
-
* BoundingBox} objects
|
|
5081
|
-
*/
|
|
5082
|
-
export class BoundingBoxUtils {
|
|
5083
|
-
private constructor();
|
|
5084
|
-
/**
|
|
5085
|
-
* @remarks
|
|
5086
|
-
* Create a validated instance of a {@link BoundingBox} where
|
|
5087
|
-
* the min and max components are guaranteed to be (min <= max)
|
|
5088
|
-
*
|
|
5089
|
-
* This function can't be called in read-only mode.
|
|
5090
|
-
*
|
|
5091
|
-
* @param min
|
|
5092
|
-
* A corner world location
|
|
5093
|
-
* @param max
|
|
5094
|
-
* A corner world location diametrically opposite
|
|
5183
|
+
* The world block location to test
|
|
5184
|
+
* @returns
|
|
5185
|
+
* If the location is either inside or more than 0 blocks away,
|
|
5186
|
+
* the function will return false.
|
|
5187
|
+
* If the location is directly contacting the outer surface of
|
|
5188
|
+
* the BlockVolume, the function will return true.
|
|
5095
5189
|
*/
|
|
5096
|
-
|
|
5190
|
+
doesLocationTouchFaces(pos: Vector3): boolean;
|
|
5097
5191
|
/**
|
|
5098
5192
|
* @remarks
|
|
5099
|
-
*
|
|
5100
|
-
*
|
|
5101
|
-
* Sizes can be negative to perform contraction.
|
|
5102
|
-
* Note: corners can be inverted if the contraction size is
|
|
5103
|
-
* greater than the span, but the min/max relationship will
|
|
5104
|
-
* remain correct
|
|
5105
|
-
*
|
|
5106
|
-
* This function can't be called in read-only mode.
|
|
5193
|
+
* Check to see if a two block volumes are directly adjacent
|
|
5194
|
+
* and two faces touch.
|
|
5107
5195
|
*
|
|
5196
|
+
* @param other
|
|
5197
|
+
* The volume to test
|
|
5108
5198
|
* @returns
|
|
5109
|
-
*
|
|
5110
|
-
*
|
|
5199
|
+
* If the outer faces of both block volumes touch and are
|
|
5200
|
+
* directly adjacent at any point, return true.
|
|
5111
5201
|
*/
|
|
5112
|
-
|
|
5202
|
+
doesVolumeTouchFaces(other: BlockVolume): boolean;
|
|
5113
5203
|
/**
|
|
5114
5204
|
* @remarks
|
|
5115
|
-
*
|
|
5116
|
-
*
|
|
5117
|
-
* This function can't be called in read-only mode.
|
|
5205
|
+
* Return an enumeration which represents the intersection
|
|
5206
|
+
* between two BlockVolume objects
|
|
5118
5207
|
*
|
|
5119
5208
|
*/
|
|
5120
|
-
|
|
5209
|
+
intersects(other: BlockVolume): BlockVolumeIntersection;
|
|
5210
|
+
}
|
|
5211
|
+
|
|
5212
|
+
/**
|
|
5213
|
+
* Base type for BlockVolumes.
|
|
5214
|
+
*/
|
|
5215
|
+
export class BlockVolumeBase {
|
|
5216
|
+
private constructor();
|
|
5121
5217
|
/**
|
|
5122
5218
|
* @remarks
|
|
5123
|
-
*
|
|
5124
|
-
*
|
|
5125
|
-
* a BoundingBox which exactly encompasses the two boxes.
|
|
5126
|
-
*
|
|
5127
|
-
* This function can't be called in read-only mode.
|
|
5219
|
+
* Fetch a {@link BlockLocationIterator} that represents all of
|
|
5220
|
+
* the block world locations within the specified volume
|
|
5128
5221
|
*
|
|
5129
|
-
* @returns
|
|
5130
|
-
* A new {@link BoundingBox} instance representing the smallest
|
|
5131
|
-
* possible bounding box which can encompass both
|
|
5132
5222
|
*/
|
|
5133
|
-
|
|
5223
|
+
getBlockLocationIterator(): BlockLocationIterator;
|
|
5134
5224
|
/**
|
|
5225
|
+
* @beta
|
|
5135
5226
|
* @remarks
|
|
5136
|
-
*
|
|
5137
|
-
*
|
|
5138
|
-
*
|
|
5139
|
-
* This function can't be called in read-only mode.
|
|
5227
|
+
* Return a {@link BlockBoundingBox} object which represents
|
|
5228
|
+
* the validated min and max coordinates of the volume
|
|
5140
5229
|
*
|
|
5141
|
-
* @
|
|
5142
|
-
* Note that {@link BoundingBox} objects represent whole
|
|
5143
|
-
* blocks, so the center of boxes which have odd numbered
|
|
5144
|
-
* bounds are not mathematically centered...
|
|
5145
|
-
* i.e. a BoundingBox( 0,0,0 -> 3,3,3 ) would have a center of
|
|
5146
|
-
* (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
5230
|
+
* @throws This function can throw errors.
|
|
5147
5231
|
*/
|
|
5148
|
-
|
|
5232
|
+
getBoundingBox(): BlockBoundingBox;
|
|
5149
5233
|
/**
|
|
5150
5234
|
* @remarks
|
|
5151
|
-
*
|
|
5152
|
-
* two intersecting BoundingBoxes
|
|
5153
|
-
*
|
|
5154
|
-
* This function can't be called in read-only mode.
|
|
5235
|
+
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
5155
5236
|
*
|
|
5156
5237
|
*/
|
|
5157
|
-
|
|
5238
|
+
getCapacity(): number;
|
|
5158
5239
|
/**
|
|
5159
5240
|
* @remarks
|
|
5160
|
-
* Get the
|
|
5161
|
-
*
|
|
5162
|
-
* This function can't be called in read-only mode.
|
|
5241
|
+
* Get the largest corner position of the volume (guaranteed to
|
|
5242
|
+
* be >= min)
|
|
5163
5243
|
*
|
|
5244
|
+
* @throws This function can throw errors.
|
|
5164
5245
|
*/
|
|
5165
|
-
|
|
5246
|
+
getMax(): Vector3;
|
|
5166
5247
|
/**
|
|
5167
5248
|
* @remarks
|
|
5168
|
-
*
|
|
5169
|
-
*
|
|
5170
|
-
* This function can't be called in read-only mode.
|
|
5249
|
+
* Get the smallest corner position of the volume (guaranteed
|
|
5250
|
+
* to be <= max)
|
|
5171
5251
|
*
|
|
5252
|
+
* @throws This function can throw errors.
|
|
5172
5253
|
*/
|
|
5173
|
-
|
|
5254
|
+
getMin(): Vector3;
|
|
5174
5255
|
/**
|
|
5175
5256
|
* @remarks
|
|
5176
|
-
*
|
|
5177
|
-
*
|
|
5178
|
-
* This function can't be called in read-only mode.
|
|
5257
|
+
* Get a {@link Vector3} object where each component represents
|
|
5258
|
+
* the number of blocks along that axis
|
|
5179
5259
|
*
|
|
5180
5260
|
*/
|
|
5181
|
-
|
|
5261
|
+
getSpan(): Vector3;
|
|
5182
5262
|
/**
|
|
5183
5263
|
* @remarks
|
|
5184
|
-
* Check to see if a
|
|
5185
|
-
*
|
|
5186
|
-
* This function can't be called in read-only mode.
|
|
5264
|
+
* Check to see if a given world block location is inside a
|
|
5265
|
+
* BlockVolume
|
|
5187
5266
|
*
|
|
5188
5267
|
*/
|
|
5189
|
-
|
|
5268
|
+
isInside(location: Vector3): boolean;
|
|
5190
5269
|
/**
|
|
5191
5270
|
* @remarks
|
|
5192
|
-
* Move a
|
|
5193
|
-
*
|
|
5194
|
-
* This function can't be called in read-only mode.
|
|
5271
|
+
* Move a BlockVolume by a specified amount
|
|
5195
5272
|
*
|
|
5196
|
-
* @
|
|
5197
|
-
*
|
|
5273
|
+
* @param delta
|
|
5274
|
+
* Amount of blocks to move by
|
|
5198
5275
|
*/
|
|
5199
|
-
|
|
5276
|
+
translate(delta: Vector3): void;
|
|
5200
5277
|
}
|
|
5201
5278
|
|
|
5202
5279
|
/**
|
|
@@ -5672,7 +5749,7 @@ export class CompoundBlockVolume {
|
|
|
5672
5749
|
* This function can't be called in read-only mode.
|
|
5673
5750
|
*
|
|
5674
5751
|
*/
|
|
5675
|
-
getBoundingBox():
|
|
5752
|
+
getBoundingBox(): BlockBoundingBox;
|
|
5676
5753
|
/**
|
|
5677
5754
|
* @remarks
|
|
5678
5755
|
* Get the max block location of the outermost bounding
|
|
@@ -6110,6 +6187,12 @@ export class Container {
|
|
|
6110
6187
|
moveItem(fromSlot: number, toSlot: number, toContainer: Container): void;
|
|
6111
6188
|
/**
|
|
6112
6189
|
* @beta
|
|
6190
|
+
* @remarks
|
|
6191
|
+
* Find the index of the last instance of an item inside the
|
|
6192
|
+
* container
|
|
6193
|
+
*
|
|
6194
|
+
* @param itemStack
|
|
6195
|
+
* The item to find.
|
|
6113
6196
|
* @throws This function can throw errors.
|
|
6114
6197
|
*
|
|
6115
6198
|
* {@link InvalidContainerError}
|
|
@@ -6571,6 +6654,41 @@ export class ContainerSlot {
|
|
|
6571
6654
|
setLore(loreList?: string[]): void;
|
|
6572
6655
|
}
|
|
6573
6656
|
|
|
6657
|
+
/**
|
|
6658
|
+
* @beta
|
|
6659
|
+
* Details about the origins of the command.
|
|
6660
|
+
*/
|
|
6661
|
+
export class CustomCommandOrigin {
|
|
6662
|
+
private constructor();
|
|
6663
|
+
/**
|
|
6664
|
+
* @remarks
|
|
6665
|
+
* If this command was initiated via an NPC, returns the entity
|
|
6666
|
+
* that initiated the NPC dialogue.
|
|
6667
|
+
*
|
|
6668
|
+
*/
|
|
6669
|
+
readonly initiator?: Entity;
|
|
6670
|
+
/**
|
|
6671
|
+
* @remarks
|
|
6672
|
+
* Source block if this command was triggered via a block
|
|
6673
|
+
* (e.g., a commandblock.)
|
|
6674
|
+
*
|
|
6675
|
+
*/
|
|
6676
|
+
readonly sourceBlock?: Block;
|
|
6677
|
+
/**
|
|
6678
|
+
* @remarks
|
|
6679
|
+
* Source entity if this command was triggered by an entity
|
|
6680
|
+
* (e.g., a NPC).
|
|
6681
|
+
*
|
|
6682
|
+
*/
|
|
6683
|
+
readonly sourceEntity?: Entity;
|
|
6684
|
+
/**
|
|
6685
|
+
* @remarks
|
|
6686
|
+
* Returns the type of source that fired this command.
|
|
6687
|
+
*
|
|
6688
|
+
*/
|
|
6689
|
+
readonly sourceType: CustomCommandSource;
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6574
6692
|
/**
|
|
6575
6693
|
* @beta
|
|
6576
6694
|
* Provides the functionality for registering custom commands.
|
|
@@ -6596,7 +6714,42 @@ export class CustomCommandRegistry {
|
|
|
6596
6714
|
*
|
|
6597
6715
|
* {@link NamespaceNameError}
|
|
6598
6716
|
*/
|
|
6599
|
-
registerCommand(
|
|
6717
|
+
registerCommand(
|
|
6718
|
+
customCommand: CustomCommand,
|
|
6719
|
+
callback: (origin: CustomCommandOrigin, ...args: any[]) => CustomCommandResult | undefined,
|
|
6720
|
+
): void;
|
|
6721
|
+
/**
|
|
6722
|
+
* @remarks
|
|
6723
|
+
* Registers a custom command enum.
|
|
6724
|
+
*
|
|
6725
|
+
* This function can't be called in read-only mode.
|
|
6726
|
+
*
|
|
6727
|
+
* This function can be called in early-execution mode.
|
|
6728
|
+
*
|
|
6729
|
+
* @throws This function can throw errors.
|
|
6730
|
+
*
|
|
6731
|
+
* {@link CustomCommandError}
|
|
6732
|
+
*
|
|
6733
|
+
* {@link minecraftcommon.EngineError}
|
|
6734
|
+
*
|
|
6735
|
+
* {@link NamespaceNameError}
|
|
6736
|
+
*/
|
|
6737
|
+
registerEnum(name: string, values: string[]): void;
|
|
6738
|
+
}
|
|
6739
|
+
|
|
6740
|
+
/**
|
|
6741
|
+
* @beta
|
|
6742
|
+
* Contains the custom component's JSON parameters
|
|
6743
|
+
*/
|
|
6744
|
+
export class CustomComponentParameters {
|
|
6745
|
+
private constructor();
|
|
6746
|
+
/**
|
|
6747
|
+
* @remarks
|
|
6748
|
+
* JSON object containing the parameters from the custom
|
|
6749
|
+
* component definition
|
|
6750
|
+
*
|
|
6751
|
+
*/
|
|
6752
|
+
readonly params: unknown;
|
|
6600
6753
|
}
|
|
6601
6754
|
|
|
6602
6755
|
/**
|
|
@@ -6695,6 +6848,7 @@ export class Dimension {
|
|
|
6695
6848
|
* or all of the block volume is outside of the loaded chunks.
|
|
6696
6849
|
* Will only check the block locations that are within the
|
|
6697
6850
|
* loaded chunks in the volume.
|
|
6851
|
+
* Defaults to: false
|
|
6698
6852
|
* @returns
|
|
6699
6853
|
* Returns true if at least one block in the volume satisfies
|
|
6700
6854
|
* the filter, false otherwise.
|
|
@@ -6889,6 +7043,7 @@ export class Dimension {
|
|
|
6889
7043
|
* or all of the block volume is outside of the loaded chunks.
|
|
6890
7044
|
* Will only check the block locations that are within the
|
|
6891
7045
|
* loaded chunks in the volume.
|
|
7046
|
+
* Defaults to: false
|
|
6892
7047
|
* @returns
|
|
6893
7048
|
* Returns the ListBlockVolume that contains all the block
|
|
6894
7049
|
* locations that satisfied the block filter.
|
|
@@ -7040,7 +7195,7 @@ export class Dimension {
|
|
|
7040
7195
|
*/
|
|
7041
7196
|
getWeather(): WeatherType;
|
|
7042
7197
|
/**
|
|
7043
|
-
* @
|
|
7198
|
+
* @rc
|
|
7044
7199
|
* @remarks
|
|
7045
7200
|
* Places the given feature into the dimension at the specified
|
|
7046
7201
|
* location.
|
|
@@ -7057,6 +7212,7 @@ export class Dimension {
|
|
|
7057
7212
|
* Note: The function call will always throw an error if using
|
|
7058
7213
|
* an unknown feature name or trying to place in a unloaded
|
|
7059
7214
|
* chunk.
|
|
7215
|
+
* Defaults to: false
|
|
7060
7216
|
* @throws
|
|
7061
7217
|
* An error will be thrown if the feature name is invalid.
|
|
7062
7218
|
* An error will be thrown if the location is in an unloaded
|
|
@@ -7070,7 +7226,7 @@ export class Dimension {
|
|
|
7070
7226
|
*/
|
|
7071
7227
|
placeFeature(featureName: string, location: Vector3, shouldThrow?: boolean): boolean;
|
|
7072
7228
|
/**
|
|
7073
|
-
* @
|
|
7229
|
+
* @rc
|
|
7074
7230
|
* @remarks
|
|
7075
7231
|
* Places the given feature rule into the dimension at the
|
|
7076
7232
|
* specified location.
|
|
@@ -7208,20 +7364,24 @@ export class Dimension {
|
|
|
7208
7364
|
* Newly created entity at the specified location.
|
|
7209
7365
|
* @throws This function can throw errors.
|
|
7210
7366
|
*
|
|
7367
|
+
* {@link Error}
|
|
7368
|
+
*
|
|
7369
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
7370
|
+
*
|
|
7211
7371
|
* {@link LocationInUnloadedChunkError}
|
|
7212
7372
|
*
|
|
7213
7373
|
* {@link LocationOutOfWorldBoundariesError}
|
|
7214
7374
|
* @example spawnAdultHorse.ts
|
|
7215
7375
|
* ```typescript
|
|
7216
|
-
* import { DimensionLocation } from
|
|
7217
|
-
* import { Vector3Utils } from
|
|
7376
|
+
* import { DimensionLocation } from '@minecraft/server';
|
|
7377
|
+
* import { Vector3Utils } from '@minecraft/math';
|
|
7218
7378
|
*
|
|
7219
7379
|
* function spawnAdultHorse(log: (message: string, status?: number) => void, targetLocation: DimensionLocation) {
|
|
7220
|
-
*
|
|
7221
|
-
*
|
|
7222
|
-
*
|
|
7223
|
-
*
|
|
7224
|
-
*
|
|
7380
|
+
* log('Create a horse and triggering the ageable_grow_up event, ensuring the horse is created as an adult');
|
|
7381
|
+
* targetLocation.dimension.spawnEntity(
|
|
7382
|
+
* 'minecraft:horse<minecraft:ageable_grow_up>',
|
|
7383
|
+
* Vector3Utils.add(targetLocation, { x: 0, y: 1, z: 0 })
|
|
7384
|
+
* );
|
|
7225
7385
|
* }
|
|
7226
7386
|
* ```
|
|
7227
7387
|
* @example quickFoxLazyDog.ts
|
|
@@ -8059,6 +8219,7 @@ export class Entity {
|
|
|
8059
8219
|
* @param useEffects
|
|
8060
8220
|
* Whether to show any visual effects connected to the
|
|
8061
8221
|
* extinguishing.
|
|
8222
|
+
* Defaults to: true
|
|
8062
8223
|
* @returns
|
|
8063
8224
|
* Returns whether the entity was on fire.
|
|
8064
8225
|
* @throws This function can throw errors.
|
|
@@ -8467,7 +8628,7 @@ export class Entity {
|
|
|
8467
8628
|
*
|
|
8468
8629
|
* {@link CommandError}
|
|
8469
8630
|
*
|
|
8470
|
-
* {@link
|
|
8631
|
+
* {@link InvalidEntityError}
|
|
8471
8632
|
*/
|
|
8472
8633
|
runCommand(commandString: string): CommandResult;
|
|
8473
8634
|
/**
|
|
@@ -8506,6 +8667,7 @@ export class Entity {
|
|
|
8506
8667
|
* Whether side-effects should be applied (e.g. thawing freeze)
|
|
8507
8668
|
* and other conditions such as rain or fire protection should
|
|
8508
8669
|
* be taken into consideration.
|
|
8670
|
+
* Defaults to: true
|
|
8509
8671
|
* @returns
|
|
8510
8672
|
* Whether the entity was set on fire. This can fail if seconds
|
|
8511
8673
|
* is less than or equal to zero, the entity is wet or the
|
|
@@ -9236,33 +9398,12 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
9236
9398
|
* Current value of the friction modifier of the associated
|
|
9237
9399
|
* entity.
|
|
9238
9400
|
*
|
|
9239
|
-
* This property can
|
|
9240
|
-
*
|
|
9401
|
+
* @throws This property can throw when used.
|
|
9241
9402
|
*/
|
|
9242
|
-
value: number;
|
|
9403
|
+
readonly value: number;
|
|
9243
9404
|
static readonly componentId = 'minecraft:friction_modifier';
|
|
9244
9405
|
}
|
|
9245
9406
|
|
|
9246
|
-
/**
|
|
9247
|
-
* Sets the offset from the ground that the entity is actually
|
|
9248
|
-
* at.
|
|
9249
|
-
*/
|
|
9250
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9251
|
-
export class EntityGroundOffsetComponent extends EntityComponent {
|
|
9252
|
-
private constructor();
|
|
9253
|
-
/**
|
|
9254
|
-
* @remarks
|
|
9255
|
-
* Value of this particular ground offset. Note that this value
|
|
9256
|
-
* is effectively read only; setting the ground offset value
|
|
9257
|
-
* will not have an impact on the related entity.
|
|
9258
|
-
*
|
|
9259
|
-
* This property can't be edited in read-only mode.
|
|
9260
|
-
*
|
|
9261
|
-
*/
|
|
9262
|
-
value: number;
|
|
9263
|
-
static readonly componentId = 'minecraft:ground_offset';
|
|
9264
|
-
}
|
|
9265
|
-
|
|
9266
9407
|
/**
|
|
9267
9408
|
* Defines the interactions with this entity for healing it.
|
|
9268
9409
|
*/
|
|
@@ -11652,6 +11793,13 @@ export class GameRules {
|
|
|
11652
11793
|
*
|
|
11653
11794
|
*/
|
|
11654
11795
|
keepInventory: boolean;
|
|
11796
|
+
/**
|
|
11797
|
+
* @beta
|
|
11798
|
+
* @remarks
|
|
11799
|
+
* This property can't be edited in read-only mode.
|
|
11800
|
+
*
|
|
11801
|
+
*/
|
|
11802
|
+
locatorBar: boolean;
|
|
11655
11803
|
/**
|
|
11656
11804
|
* @remarks
|
|
11657
11805
|
* This property can't be edited in read-only mode.
|
|
@@ -12117,8 +12265,6 @@ export class ItemCompostableComponent extends ItemComponent {
|
|
|
12117
12265
|
*
|
|
12118
12266
|
* @throws
|
|
12119
12267
|
* Throws if value outside the range [1 - 100]
|
|
12120
|
-
*
|
|
12121
|
-
* {@link Error}
|
|
12122
12268
|
*/
|
|
12123
12269
|
readonly compostingChance: number;
|
|
12124
12270
|
static readonly componentId = 'minecraft:compostable';
|
|
@@ -12251,6 +12397,7 @@ export class ItemDurabilityComponent extends ItemComponent {
|
|
|
12251
12397
|
* Unbreaking factor to consider in factoring the damage
|
|
12252
12398
|
* chance. Incoming unbreaking parameter must be within the
|
|
12253
12399
|
* range [0, 3].
|
|
12400
|
+
* Defaults to: 0
|
|
12254
12401
|
* @throws This function can throw errors.
|
|
12255
12402
|
*/
|
|
12256
12403
|
getDamageChance(unbreakingEnchantmentLevel?: number): number;
|
|
@@ -12287,8 +12434,6 @@ export class ItemDyeableComponent extends ItemComponent {
|
|
|
12287
12434
|
* Returns the default color of the item.
|
|
12288
12435
|
*
|
|
12289
12436
|
* @throws This property can throw when used.
|
|
12290
|
-
*
|
|
12291
|
-
* {@link Error}
|
|
12292
12437
|
*/
|
|
12293
12438
|
readonly defaultColor?: RGB;
|
|
12294
12439
|
static readonly componentId = 'minecraft:dyeable';
|
|
@@ -12763,6 +12908,7 @@ export class ItemStack {
|
|
|
12763
12908
|
* provided value will be clamped to the item's maximum stack
|
|
12764
12909
|
* size. Note that certain items can only have one item in the
|
|
12765
12910
|
* stack.
|
|
12911
|
+
* Defaults to: 1
|
|
12766
12912
|
* @throws
|
|
12767
12913
|
* Throws if `itemType` is invalid, or if `amount` is outside
|
|
12768
12914
|
* the range of 1-255.
|
|
@@ -13886,8 +14032,6 @@ export class Player extends Entity {
|
|
|
13886
14032
|
* Contains the player's device information.
|
|
13887
14033
|
*
|
|
13888
14034
|
* @throws This property can throw when used.
|
|
13889
|
-
*
|
|
13890
|
-
* {@link Error}
|
|
13891
14035
|
*/
|
|
13892
14036
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
13893
14037
|
/**
|
|
@@ -14018,6 +14162,7 @@ export class Player extends Entity {
|
|
|
14018
14162
|
*/
|
|
14019
14163
|
addLevels(amount: number): number;
|
|
14020
14164
|
/**
|
|
14165
|
+
* @rc
|
|
14021
14166
|
* @remarks
|
|
14022
14167
|
* For this player, removes all overrides of any Entity
|
|
14023
14168
|
* Properties on the target Entity. This change is not applied
|
|
@@ -14176,6 +14321,7 @@ export class Player extends Entity {
|
|
|
14176
14321
|
*/
|
|
14177
14322
|
queueMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
14178
14323
|
/**
|
|
14324
|
+
* @rc
|
|
14179
14325
|
* @remarks
|
|
14180
14326
|
* For this player, removes the override on an Entity Property.
|
|
14181
14327
|
* This change is not applied until the next tick and will not
|
|
@@ -14316,6 +14462,7 @@ export class Player extends Entity {
|
|
|
14316
14462
|
*/
|
|
14317
14463
|
setOp(isOp: boolean): void;
|
|
14318
14464
|
/**
|
|
14465
|
+
* @rc
|
|
14319
14466
|
* @remarks
|
|
14320
14467
|
* For this player, overrides an Entity Property on the target
|
|
14321
14468
|
* Entity to the provided value. This property must be client
|
|
@@ -15026,8 +15173,6 @@ export class PlayerInputPermissions {
|
|
|
15026
15173
|
* This function can't be called in read-only mode.
|
|
15027
15174
|
*
|
|
15028
15175
|
* @throws This function can throw errors.
|
|
15029
|
-
*
|
|
15030
|
-
* {@link Error}
|
|
15031
15176
|
*/
|
|
15032
15177
|
isPermissionCategoryEnabled(permissionCategory: InputPermissionCategory): boolean;
|
|
15033
15178
|
/**
|
|
@@ -16919,6 +17064,7 @@ export class Structure {
|
|
|
16919
17064
|
* @param saveMode
|
|
16920
17065
|
* Determines how the Structure should be saved. Defaults to
|
|
16921
17066
|
* saving to the world.
|
|
17067
|
+
* Defaults to: 1
|
|
16922
17068
|
* @returns
|
|
16923
17069
|
* Returns the newly created structure.
|
|
16924
17070
|
* @throws
|
|
@@ -16955,9 +17101,11 @@ export class Structure {
|
|
|
16955
17101
|
* The block location relative to the Structure's origin.
|
|
16956
17102
|
* @param blockPermutation
|
|
16957
17103
|
* The BlockPermutation to set.
|
|
17104
|
+
* Defaults to: null
|
|
16958
17105
|
* @param waterlogged
|
|
16959
17106
|
* Specifies whether the block should be waterlogged. Air and
|
|
16960
17107
|
* undefined blocks cannot be waterlogged.
|
|
17108
|
+
* Defaults to: false
|
|
16961
17109
|
* @throws
|
|
16962
17110
|
* Throws if the type of block is StructureVoid.
|
|
16963
17111
|
* Throws if the block is undefined and waterlogged is set to
|
|
@@ -16996,6 +17144,7 @@ export class StructureManager {
|
|
|
16996
17144
|
* @param saveMode
|
|
16997
17145
|
* How the Structure should be saved upon creation. Defaults to
|
|
16998
17146
|
* StructureSaveMode.Memory.
|
|
17147
|
+
* Defaults to: 0
|
|
16999
17148
|
* @returns
|
|
17000
17149
|
* Returns the newly created Structure.
|
|
17001
17150
|
* @throws
|
|
@@ -17113,7 +17262,7 @@ export class StructureManager {
|
|
|
17113
17262
|
options?: StructurePlaceOptions,
|
|
17114
17263
|
): void;
|
|
17115
17264
|
/**
|
|
17116
|
-
* @
|
|
17265
|
+
* @rc
|
|
17117
17266
|
* @remarks
|
|
17118
17267
|
* Places a partial jigsaw structure in the world. This is
|
|
17119
17268
|
* useful for debugging connections between jigsaw blocks.
|
|
@@ -17137,8 +17286,8 @@ export class StructureManager {
|
|
|
17137
17286
|
* Optional settings to use when generating the jigsaw
|
|
17138
17287
|
* structure.
|
|
17139
17288
|
* @returns
|
|
17140
|
-
* Returns a {@link
|
|
17141
|
-
* maximum bounds of the jigsaw structure.
|
|
17289
|
+
* Returns a {@link BlockBoundingBox} object which represents
|
|
17290
|
+
* the maximum bounds of the jigsaw structure.
|
|
17142
17291
|
* @throws
|
|
17143
17292
|
* Throws if maxDepth is outside of the range [1,20]
|
|
17144
17293
|
* Throws if generation fails due to invalid parameters or
|
|
@@ -17155,9 +17304,9 @@ export class StructureManager {
|
|
|
17155
17304
|
dimension: Dimension,
|
|
17156
17305
|
location: Vector3,
|
|
17157
17306
|
options?: JigsawPlaceOptions,
|
|
17158
|
-
):
|
|
17307
|
+
): BlockBoundingBox;
|
|
17159
17308
|
/**
|
|
17160
|
-
* @
|
|
17309
|
+
* @rc
|
|
17161
17310
|
* @remarks
|
|
17162
17311
|
* Places a jigsaw structure in the world.
|
|
17163
17312
|
*
|
|
@@ -17177,8 +17326,8 @@ export class StructureManager {
|
|
|
17177
17326
|
* Optional settings to use when generating the jigsaw
|
|
17178
17327
|
* structure.
|
|
17179
17328
|
* @returns
|
|
17180
|
-
* Returns a {@link
|
|
17181
|
-
* maximum bounds of the jigsaw structure.
|
|
17329
|
+
* Returns a {@link BlockBoundingBox} object which represents
|
|
17330
|
+
* the maximum bounds of the jigsaw structure.
|
|
17182
17331
|
* @throws
|
|
17183
17332
|
* Throws if generation fails due to invalid parameters or
|
|
17184
17333
|
* jigsaw configuration.
|
|
@@ -17192,7 +17341,7 @@ export class StructureManager {
|
|
|
17192
17341
|
dimension: Dimension,
|
|
17193
17342
|
location: Vector3,
|
|
17194
17343
|
options?: JigsawStructurePlaceOptions,
|
|
17195
|
-
):
|
|
17344
|
+
): BlockBoundingBox;
|
|
17196
17345
|
}
|
|
17197
17346
|
|
|
17198
17347
|
/**
|
|
@@ -18005,7 +18154,7 @@ export class World {
|
|
|
18005
18154
|
*/
|
|
18006
18155
|
getDefaultSpawnLocation(): Vector3;
|
|
18007
18156
|
/**
|
|
18008
|
-
* @
|
|
18157
|
+
* @rc
|
|
18009
18158
|
* @remarks
|
|
18010
18159
|
* Gets the difficulty from the world.
|
|
18011
18160
|
*
|
|
@@ -18257,7 +18406,7 @@ export class World {
|
|
|
18257
18406
|
*/
|
|
18258
18407
|
setDefaultSpawnLocation(spawnLocation: Vector3): void;
|
|
18259
18408
|
/**
|
|
18260
|
-
* @
|
|
18409
|
+
* @rc
|
|
18261
18410
|
* @remarks
|
|
18262
18411
|
* Sets the worlds difficulty.
|
|
18263
18412
|
*
|
|
@@ -18960,6 +19109,40 @@ export interface BiomeSearchOptions {
|
|
|
18960
19109
|
boundingSize?: Vector3;
|
|
18961
19110
|
}
|
|
18962
19111
|
|
|
19112
|
+
/**
|
|
19113
|
+
* @rc
|
|
19114
|
+
* A BlockBoundingBox is an interface to an object which
|
|
19115
|
+
* represents an AABB aligned rectangle.
|
|
19116
|
+
* The BlockBoundingBox assumes that it was created in a valid
|
|
19117
|
+
* state (min <= max) but cannot guarantee it (unless it was
|
|
19118
|
+
* created using the associated {@link BlockBoundingBoxUtils}
|
|
19119
|
+
* utility functions.
|
|
19120
|
+
* The min/max coordinates represent the diametrically opposite
|
|
19121
|
+
* corners of the rectangle.
|
|
19122
|
+
* The BlockBoundingBox is not a representation of blocks - it
|
|
19123
|
+
* has no association with any type, it is just a mathematical
|
|
19124
|
+
* construct - so a rectangle with
|
|
19125
|
+
* ( 0,0,0 ) -> ( 0,0,0 )
|
|
19126
|
+
* has a size of ( 0,0,0 ) (unlike the very similar {@link
|
|
19127
|
+
* BlockVolume} object)
|
|
19128
|
+
*/
|
|
19129
|
+
export interface BlockBoundingBox {
|
|
19130
|
+
/**
|
|
19131
|
+
* @remarks
|
|
19132
|
+
* A {@link Vector3} that represents the largest corner of the
|
|
19133
|
+
* rectangle
|
|
19134
|
+
*
|
|
19135
|
+
*/
|
|
19136
|
+
max: Vector3;
|
|
19137
|
+
/**
|
|
19138
|
+
* @remarks
|
|
19139
|
+
* A {@link Vector3} that represents the smallest corner of the
|
|
19140
|
+
* rectangle
|
|
19141
|
+
*
|
|
19142
|
+
*/
|
|
19143
|
+
min: Vector3;
|
|
19144
|
+
}
|
|
19145
|
+
|
|
18963
19146
|
/**
|
|
18964
19147
|
* Contains a set of events that will be raised for a block.
|
|
18965
19148
|
* This object must be bound using the BlockRegistry.
|
|
@@ -18971,28 +19154,28 @@ export interface BlockCustomComponent {
|
|
|
18971
19154
|
* block.
|
|
18972
19155
|
*
|
|
18973
19156
|
*/
|
|
18974
|
-
beforeOnPlayerPlace?: (arg0: BlockComponentPlayerPlaceBeforeEvent) => void;
|
|
19157
|
+
beforeOnPlayerPlace?: (arg0: BlockComponentPlayerPlaceBeforeEvent, arg1: CustomComponentParameters) => void;
|
|
18975
19158
|
/**
|
|
18976
19159
|
* @remarks
|
|
18977
19160
|
* This function will be called when an entity falls onto the
|
|
18978
19161
|
* block that this custom component is bound to.
|
|
18979
19162
|
*
|
|
18980
19163
|
*/
|
|
18981
|
-
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent) => void;
|
|
19164
|
+
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent, arg1: CustomComponentParameters) => void;
|
|
18982
19165
|
/**
|
|
18983
19166
|
* @remarks
|
|
18984
19167
|
* This function will be called when the block that this custom
|
|
18985
19168
|
* component is bound to is placed.
|
|
18986
19169
|
*
|
|
18987
19170
|
*/
|
|
18988
|
-
onPlace?: (arg0: BlockComponentOnPlaceEvent) => void;
|
|
19171
|
+
onPlace?: (arg0: BlockComponentOnPlaceEvent, arg1: CustomComponentParameters) => void;
|
|
18989
19172
|
/**
|
|
18990
19173
|
* @remarks
|
|
18991
19174
|
* This function will be called when a player destroys a
|
|
18992
19175
|
* specific block.
|
|
18993
19176
|
*
|
|
18994
19177
|
*/
|
|
18995
|
-
onPlayerDestroy?: (arg0: BlockComponentPlayerDestroyEvent) => void;
|
|
19178
|
+
onPlayerDestroy?: (arg0: BlockComponentPlayerDestroyEvent, arg1: CustomComponentParameters) => void;
|
|
18996
19179
|
/**
|
|
18997
19180
|
* @remarks
|
|
18998
19181
|
* This function will be called when a player sucessfully
|
|
@@ -19000,33 +19183,33 @@ export interface BlockCustomComponent {
|
|
|
19000
19183
|
* to.
|
|
19001
19184
|
*
|
|
19002
19185
|
*/
|
|
19003
|
-
onPlayerInteract?: (arg0: BlockComponentPlayerInteractEvent) => void;
|
|
19186
|
+
onPlayerInteract?: (arg0: BlockComponentPlayerInteractEvent, arg1: CustomComponentParameters) => void;
|
|
19004
19187
|
/**
|
|
19005
19188
|
* @remarks
|
|
19006
19189
|
* This function will be called when a block randomly ticks.
|
|
19007
19190
|
*
|
|
19008
19191
|
*/
|
|
19009
|
-
onRandomTick?: (arg0: BlockComponentRandomTickEvent) => void;
|
|
19192
|
+
onRandomTick?: (arg0: BlockComponentRandomTickEvent, arg1: CustomComponentParameters) => void;
|
|
19010
19193
|
/**
|
|
19011
19194
|
* @remarks
|
|
19012
19195
|
* This function will be called when an entity steps off the
|
|
19013
19196
|
* block that this custom component is bound to.
|
|
19014
19197
|
*
|
|
19015
19198
|
*/
|
|
19016
|
-
onStepOff?: (arg0: BlockComponentStepOffEvent) => void;
|
|
19199
|
+
onStepOff?: (arg0: BlockComponentStepOffEvent, arg1: CustomComponentParameters) => void;
|
|
19017
19200
|
/**
|
|
19018
19201
|
* @remarks
|
|
19019
19202
|
* This function will be called when an entity steps onto the
|
|
19020
19203
|
* block that this custom component is bound to.
|
|
19021
19204
|
*
|
|
19022
19205
|
*/
|
|
19023
|
-
onStepOn?: (arg0: BlockComponentStepOnEvent) => void;
|
|
19206
|
+
onStepOn?: (arg0: BlockComponentStepOnEvent, arg1: CustomComponentParameters) => void;
|
|
19024
19207
|
/**
|
|
19025
19208
|
* @remarks
|
|
19026
19209
|
* This function will be called when a block ticks.
|
|
19027
19210
|
*
|
|
19028
19211
|
*/
|
|
19029
|
-
onTick?: (arg0: BlockComponentTickEvent) => void;
|
|
19212
|
+
onTick?: (arg0: BlockComponentTickEvent, arg1: CustomComponentParameters) => void;
|
|
19030
19213
|
}
|
|
19031
19214
|
|
|
19032
19215
|
/**
|
|
@@ -19201,40 +19384,6 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
19201
19384
|
maxDistance?: number;
|
|
19202
19385
|
}
|
|
19203
19386
|
|
|
19204
|
-
/**
|
|
19205
|
-
* @beta
|
|
19206
|
-
* A BoundingBox is an interface to an object which represents
|
|
19207
|
-
* an AABB aligned rectangle.
|
|
19208
|
-
* The BoundingBox assumes that it was created in a valid state
|
|
19209
|
-
* (min <= max) but cannot guarantee it (unless it was created
|
|
19210
|
-
* using the associated {@link BoundingBoxUtils} utility
|
|
19211
|
-
* functions.
|
|
19212
|
-
* The min/max coordinates represent the diametrically opposite
|
|
19213
|
-
* corners of the rectangle.
|
|
19214
|
-
* The BoundingBox is not a representation of blocks - it has
|
|
19215
|
-
* no association with any type, it is just a mathematical
|
|
19216
|
-
* construct - so a rectangle with
|
|
19217
|
-
* ( 0,0,0 ) -> ( 0,0,0 )
|
|
19218
|
-
* has a size of ( 0,0,0 ) (unlike the very similar {@link
|
|
19219
|
-
* BlockVolume} object)
|
|
19220
|
-
*/
|
|
19221
|
-
export interface BoundingBox {
|
|
19222
|
-
/**
|
|
19223
|
-
* @remarks
|
|
19224
|
-
* A {@link Vector3} that represents the largest corner of the
|
|
19225
|
-
* rectangle
|
|
19226
|
-
*
|
|
19227
|
-
*/
|
|
19228
|
-
max: Vector3;
|
|
19229
|
-
/**
|
|
19230
|
-
* @remarks
|
|
19231
|
-
* A {@link Vector3} that represents the smallest corner of the
|
|
19232
|
-
* rectangle
|
|
19233
|
-
*
|
|
19234
|
-
*/
|
|
19235
|
-
min: Vector3;
|
|
19236
|
-
}
|
|
19237
|
-
|
|
19238
19387
|
export interface CameraDefaultOptions {
|
|
19239
19388
|
/**
|
|
19240
19389
|
* @remarks
|
|
@@ -19434,7 +19583,7 @@ export interface CustomCommand {
|
|
|
19434
19583
|
* The permission level required to execute the command.
|
|
19435
19584
|
*
|
|
19436
19585
|
*/
|
|
19437
|
-
permissionLevel:
|
|
19586
|
+
permissionLevel: CommandPermissionLevel;
|
|
19438
19587
|
}
|
|
19439
19588
|
|
|
19440
19589
|
/**
|
|
@@ -20283,53 +20432,56 @@ export interface ItemCustomComponent {
|
|
|
20283
20432
|
* damage.
|
|
20284
20433
|
*
|
|
20285
20434
|
*/
|
|
20286
|
-
onBeforeDurabilityDamage?: (
|
|
20435
|
+
onBeforeDurabilityDamage?: (
|
|
20436
|
+
arg0: ItemComponentBeforeDurabilityDamageEvent,
|
|
20437
|
+
arg1: CustomComponentParameters,
|
|
20438
|
+
) => void;
|
|
20287
20439
|
/**
|
|
20288
20440
|
* @remarks
|
|
20289
20441
|
* This function will be called when an item containing this
|
|
20290
20442
|
* component's use duration was completed.
|
|
20291
20443
|
*
|
|
20292
20444
|
*/
|
|
20293
|
-
onCompleteUse?: (arg0: ItemComponentCompleteUseEvent) => void;
|
|
20445
|
+
onCompleteUse?: (arg0: ItemComponentCompleteUseEvent, arg1: CustomComponentParameters) => void;
|
|
20294
20446
|
/**
|
|
20295
20447
|
* @remarks
|
|
20296
20448
|
* This function will be called when an item containing this
|
|
20297
20449
|
* component is eaten by an entity.
|
|
20298
20450
|
*
|
|
20299
20451
|
*/
|
|
20300
|
-
onConsume?: (arg0: ItemComponentConsumeEvent) => void;
|
|
20452
|
+
onConsume?: (arg0: ItemComponentConsumeEvent, arg1: CustomComponentParameters) => void;
|
|
20301
20453
|
/**
|
|
20302
20454
|
* @remarks
|
|
20303
20455
|
* This function will be called when an item containing this
|
|
20304
20456
|
* component is used to hit another entity.
|
|
20305
20457
|
*
|
|
20306
20458
|
*/
|
|
20307
|
-
onHitEntity?: (arg0: ItemComponentHitEntityEvent) => void;
|
|
20459
|
+
onHitEntity?: (arg0: ItemComponentHitEntityEvent, arg1: CustomComponentParameters) => void;
|
|
20308
20460
|
/**
|
|
20309
20461
|
* @remarks
|
|
20310
20462
|
* This function will be called when an item containing this
|
|
20311
20463
|
* component is used to mine a block.
|
|
20312
20464
|
*
|
|
20313
20465
|
*/
|
|
20314
|
-
onMineBlock?: (arg0: ItemComponentMineBlockEvent) => void;
|
|
20466
|
+
onMineBlock?: (arg0: ItemComponentMineBlockEvent, arg1: CustomComponentParameters) => void;
|
|
20315
20467
|
/**
|
|
20316
20468
|
* @remarks
|
|
20317
20469
|
* This function will be called when an item containing this
|
|
20318
20470
|
* component is used by a player.
|
|
20319
20471
|
*
|
|
20320
20472
|
*/
|
|
20321
|
-
onUse?: (arg0: ItemComponentUseEvent) => void;
|
|
20473
|
+
onUse?: (arg0: ItemComponentUseEvent, arg1: CustomComponentParameters) => void;
|
|
20322
20474
|
/**
|
|
20323
20475
|
* @remarks
|
|
20324
20476
|
* This function will be called when an item containing this
|
|
20325
20477
|
* component is used on a block.
|
|
20326
20478
|
*
|
|
20327
20479
|
*/
|
|
20328
|
-
onUseOn?: (arg0: ItemComponentUseOnEvent) => void;
|
|
20480
|
+
onUseOn?: (arg0: ItemComponentUseOnEvent, arg1: CustomComponentParameters) => void;
|
|
20329
20481
|
}
|
|
20330
20482
|
|
|
20331
20483
|
/**
|
|
20332
|
-
* @
|
|
20484
|
+
* @rc
|
|
20333
20485
|
* Provides additional options for {@link
|
|
20334
20486
|
* StructureManager.placeJigsaw}.
|
|
20335
20487
|
*/
|
|
@@ -20351,7 +20503,7 @@ export interface JigsawPlaceOptions {
|
|
|
20351
20503
|
}
|
|
20352
20504
|
|
|
20353
20505
|
/**
|
|
20354
|
-
* @
|
|
20506
|
+
* @rc
|
|
20355
20507
|
* Provides additional options for {@link
|
|
20356
20508
|
* StructureManager.placeJigsawStructure}.
|
|
20357
20509
|
*/
|
|
@@ -20840,10 +20992,31 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
20840
20992
|
|
|
20841
20993
|
/**
|
|
20842
20994
|
* @beta
|
|
20995
|
+
* Contains additional options for spawning an Entity.
|
|
20843
20996
|
*/
|
|
20844
20997
|
export interface SpawnEntityOptions {
|
|
20998
|
+
/**
|
|
20999
|
+
* @remarks
|
|
21000
|
+
* Optional boolean which determines if this entity should
|
|
21001
|
+
* persist in the game world. Persistence prevents the entity
|
|
21002
|
+
* from automatically despawning.
|
|
21003
|
+
*
|
|
21004
|
+
*/
|
|
20845
21005
|
initialPersistence?: boolean;
|
|
21006
|
+
/**
|
|
21007
|
+
* @remarks
|
|
21008
|
+
* Optional initial rotation, in degrees, to set on the entity
|
|
21009
|
+
* when it spawns.
|
|
21010
|
+
*
|
|
21011
|
+
*/
|
|
20846
21012
|
initialRotation?: number;
|
|
21013
|
+
/**
|
|
21014
|
+
* @remarks
|
|
21015
|
+
* Optional spawn event to send to the entity after it is
|
|
21016
|
+
* spawned.
|
|
21017
|
+
*
|
|
21018
|
+
*/
|
|
21019
|
+
spawnEvent?: string;
|
|
20847
21020
|
}
|
|
20848
21021
|
|
|
20849
21022
|
/**
|
|
@@ -21330,7 +21503,7 @@ export class NamespaceNameError extends Error {
|
|
|
21330
21503
|
}
|
|
21331
21504
|
|
|
21332
21505
|
/**
|
|
21333
|
-
* @
|
|
21506
|
+
* @rc
|
|
21334
21507
|
*/
|
|
21335
21508
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21336
21509
|
export class PlaceJigsawError extends Error {
|