@minecraft/server 2.0.0-beta.1.21.80-preview.21 → 2.0.0-beta.1.21.80-preview.26
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 +628 -250
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -133,7 +133,6 @@ export enum BlockVolumeIntersection {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* @rc
|
|
137
136
|
* The state of a button on a keyboard, controller, or touch
|
|
138
137
|
* interface.
|
|
139
138
|
*/
|
|
@@ -142,6 +141,43 @@ export enum ButtonState {
|
|
|
142
141
|
Released = 'Released',
|
|
143
142
|
}
|
|
144
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
|
+
|
|
145
181
|
/**
|
|
146
182
|
* @beta
|
|
147
183
|
* The Action enum determines how the CompoundBlockVolume
|
|
@@ -191,41 +227,123 @@ export enum CompoundBlockVolumePositionRelativity {
|
|
|
191
227
|
Absolute = 1,
|
|
192
228
|
}
|
|
193
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
|
+
* Too many command parameters defined in CustomCommand.
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
246
|
+
ParameterLimit = 'ParameterLimit',
|
|
247
|
+
/**
|
|
248
|
+
* @remarks
|
|
249
|
+
* Custom command registry can not be accessed after world
|
|
250
|
+
* initialized event.
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
RegistryInvalid = 'RegistryInvalid',
|
|
254
|
+
/**
|
|
255
|
+
* @remarks
|
|
256
|
+
* Command parameters cannot be redefined during reload. Only
|
|
257
|
+
* the script closure itself can be changed.
|
|
258
|
+
*
|
|
259
|
+
*/
|
|
260
|
+
RegistryReadOnly = 'RegistryReadOnly',
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @beta
|
|
265
|
+
*/
|
|
266
|
+
export enum CustomCommandParamType {
|
|
267
|
+
Boolean = 0,
|
|
268
|
+
Integer = 1,
|
|
269
|
+
Float = 2,
|
|
270
|
+
String = 3,
|
|
271
|
+
EntitySelector = 4,
|
|
272
|
+
PlayerSelector = 5,
|
|
273
|
+
Location = 6,
|
|
274
|
+
BlockType = 7,
|
|
275
|
+
ItemType = 8,
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @beta
|
|
280
|
+
* Who executed the command.
|
|
281
|
+
*/
|
|
282
|
+
export enum CustomCommandSource {
|
|
283
|
+
/**
|
|
284
|
+
* @remarks
|
|
285
|
+
* Command originated from a command block.
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
Block = 'Block',
|
|
289
|
+
/**
|
|
290
|
+
* @remarks
|
|
291
|
+
* Command originated from an entity or player.
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
Entity = 'Entity',
|
|
295
|
+
NPCDialogue = 'NPCDialogue',
|
|
296
|
+
/**
|
|
297
|
+
* @remarks
|
|
298
|
+
* Command originated from the server.
|
|
299
|
+
*
|
|
300
|
+
*/
|
|
301
|
+
Server = 'Server',
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @beta
|
|
306
|
+
*/
|
|
307
|
+
export enum CustomCommandStatus {
|
|
308
|
+
Success = 0,
|
|
309
|
+
Failure = 1,
|
|
310
|
+
}
|
|
311
|
+
|
|
194
312
|
export enum CustomComponentNameErrorReason {
|
|
195
313
|
NoNamespace = 1,
|
|
196
314
|
DisallowedNamespace = 2,
|
|
197
315
|
}
|
|
198
316
|
|
|
199
317
|
/**
|
|
200
|
-
* @
|
|
318
|
+
* @rc
|
|
201
319
|
* An enumeration for the various difficulty levels of
|
|
202
320
|
* Minecraft.
|
|
203
321
|
*/
|
|
204
322
|
export enum Difficulty {
|
|
205
323
|
/**
|
|
206
324
|
* @remarks
|
|
207
|
-
*
|
|
325
|
+
* Easy difficulty level.
|
|
208
326
|
*
|
|
209
327
|
*/
|
|
210
|
-
|
|
328
|
+
Easy = 'Easy',
|
|
211
329
|
/**
|
|
212
330
|
* @remarks
|
|
213
|
-
*
|
|
331
|
+
* Hard difficulty level.
|
|
214
332
|
*
|
|
215
333
|
*/
|
|
216
|
-
|
|
334
|
+
Hard = 'Hard',
|
|
217
335
|
/**
|
|
218
336
|
* @remarks
|
|
219
337
|
* Normal difficulty level.
|
|
220
338
|
*
|
|
221
339
|
*/
|
|
222
|
-
Normal =
|
|
340
|
+
Normal = 'Normal',
|
|
223
341
|
/**
|
|
224
342
|
* @remarks
|
|
225
|
-
*
|
|
343
|
+
* Peaceful difficulty level.
|
|
226
344
|
*
|
|
227
345
|
*/
|
|
228
|
-
|
|
346
|
+
Peaceful = 'Peaceful',
|
|
229
347
|
}
|
|
230
348
|
|
|
231
349
|
/**
|
|
@@ -1436,6 +1554,10 @@ export enum GameRule {
|
|
|
1436
1554
|
*
|
|
1437
1555
|
*/
|
|
1438
1556
|
KeepInventory = 'keepInventory',
|
|
1557
|
+
/**
|
|
1558
|
+
* @beta
|
|
1559
|
+
*/
|
|
1560
|
+
LocatorBar = 'locatorBar',
|
|
1439
1561
|
/**
|
|
1440
1562
|
* @remarks
|
|
1441
1563
|
* The maximum number of chained commands that can execute per
|
|
@@ -1648,7 +1770,6 @@ export enum HudVisibility {
|
|
|
1648
1770
|
}
|
|
1649
1771
|
|
|
1650
1772
|
/**
|
|
1651
|
-
* @rc
|
|
1652
1773
|
* All the different input buttons that are supported. Use with
|
|
1653
1774
|
* {@link InputInfo.getButtonState} via {@link
|
|
1654
1775
|
* Player.inputInfo} or {@link PlayerButtonInputAfterEvent} via
|
|
@@ -1856,7 +1977,6 @@ export enum ItemLockMode {
|
|
|
1856
1977
|
}
|
|
1857
1978
|
|
|
1858
1979
|
/**
|
|
1859
|
-
* @rc
|
|
1860
1980
|
* Represents the type of liquid that can be placed on a block
|
|
1861
1981
|
* or flow dynamically in the world.
|
|
1862
1982
|
*/
|
|
@@ -1969,7 +2089,6 @@ export enum MoonPhase {
|
|
|
1969
2089
|
}
|
|
1970
2090
|
|
|
1971
2091
|
/**
|
|
1972
|
-
* @rc
|
|
1973
2092
|
* An enumeration describing the reason for the namespace name
|
|
1974
2093
|
* error being thrown
|
|
1975
2094
|
*/
|
|
@@ -2434,16 +2553,10 @@ export enum WeatherType {
|
|
|
2434
2553
|
Thunder = 'Thunder',
|
|
2435
2554
|
}
|
|
2436
2555
|
|
|
2437
|
-
/**
|
|
2438
|
-
* @rc
|
|
2439
|
-
*/
|
|
2440
2556
|
export type BlockComponentReturnType<T extends string> = T extends keyof BlockComponentTypeMap
|
|
2441
2557
|
? BlockComponentTypeMap[T]
|
|
2442
2558
|
: BlockComponent;
|
|
2443
2559
|
|
|
2444
|
-
/**
|
|
2445
|
-
* @rc
|
|
2446
|
-
*/
|
|
2447
2560
|
export type BlockComponentTypeMap = {
|
|
2448
2561
|
destruction_particles: BlockDestructionParticlesComponent;
|
|
2449
2562
|
fluid_container: BlockFluidContainerComponent;
|
|
@@ -2462,7 +2575,6 @@ export type BlockComponentTypeMap = {
|
|
|
2462
2575
|
};
|
|
2463
2576
|
|
|
2464
2577
|
/**
|
|
2465
|
-
* @rc
|
|
2466
2578
|
* Type alias used by the {@link BlockPermutation} matches and
|
|
2467
2579
|
* resolve functions to narrow block state argument types to
|
|
2468
2580
|
* those mapped by {@link
|
|
@@ -2474,16 +2586,10 @@ export type BlockStateArg<T> = T extends `${minecraftvanilladata.MinecraftBlockT
|
|
|
2474
2586
|
: never
|
|
2475
2587
|
: Record<string, boolean | number | string>;
|
|
2476
2588
|
|
|
2477
|
-
/**
|
|
2478
|
-
* @rc
|
|
2479
|
-
*/
|
|
2480
2589
|
export type EntityComponentReturnType<T extends string> = T extends keyof EntityComponentTypeMap
|
|
2481
2590
|
? EntityComponentTypeMap[T]
|
|
2482
2591
|
: EntityComponent;
|
|
2483
2592
|
|
|
2484
|
-
/**
|
|
2485
|
-
* @rc
|
|
2486
|
-
*/
|
|
2487
2593
|
export type EntityComponentTypeMap = {
|
|
2488
2594
|
addrider: EntityAddRiderComponent;
|
|
2489
2595
|
ageable: EntityAgeableComponent;
|
|
@@ -2628,16 +2734,10 @@ export type EntityIdentifierType<T> = [T] extends [never]
|
|
|
2628
2734
|
? VanillaEntityIdentifier | T
|
|
2629
2735
|
: never;
|
|
2630
2736
|
|
|
2631
|
-
/**
|
|
2632
|
-
* @rc
|
|
2633
|
-
*/
|
|
2634
2737
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
2635
2738
|
? ItemComponentTypeMap[T]
|
|
2636
2739
|
: ItemCustomComponentInstance;
|
|
2637
2740
|
|
|
2638
|
-
/**
|
|
2639
|
-
* @rc
|
|
2640
|
-
*/
|
|
2641
2741
|
export type ItemComponentTypeMap = {
|
|
2642
2742
|
compostable: ItemCompostableComponent;
|
|
2643
2743
|
cooldown: ItemCooldownComponent;
|
|
@@ -3192,6 +3292,19 @@ export class Block {
|
|
|
3192
3292
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3193
3293
|
*/
|
|
3194
3294
|
readonly isWaterlogged: boolean;
|
|
3295
|
+
/**
|
|
3296
|
+
* @beta
|
|
3297
|
+
* @remarks
|
|
3298
|
+
* key for the localization of this block's name used in .lang
|
|
3299
|
+
* files.
|
|
3300
|
+
*
|
|
3301
|
+
* @throws This property can throw when used.
|
|
3302
|
+
*
|
|
3303
|
+
* {@link LocationInUnloadedChunkError}
|
|
3304
|
+
*
|
|
3305
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3306
|
+
*/
|
|
3307
|
+
readonly localizationKey: string;
|
|
3195
3308
|
/**
|
|
3196
3309
|
* @remarks
|
|
3197
3310
|
* Coordinates of the specified block.
|
|
@@ -3289,7 +3402,6 @@ export class Block {
|
|
|
3289
3402
|
*/
|
|
3290
3403
|
bottomCenter(): Vector3;
|
|
3291
3404
|
/**
|
|
3292
|
-
* @rc
|
|
3293
3405
|
* @remarks
|
|
3294
3406
|
* Returns whether this block is removed when touched by
|
|
3295
3407
|
* liquid.
|
|
@@ -3308,7 +3420,6 @@ export class Block {
|
|
|
3308
3420
|
*/
|
|
3309
3421
|
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
3310
3422
|
/**
|
|
3311
|
-
* @rc
|
|
3312
3423
|
* @remarks
|
|
3313
3424
|
* Returns whether this block can have a liquid placed over it,
|
|
3314
3425
|
* i.e. be waterlogged.
|
|
@@ -3483,7 +3594,6 @@ export class Block {
|
|
|
3483
3594
|
*/
|
|
3484
3595
|
hasTag(tag: string): boolean;
|
|
3485
3596
|
/**
|
|
3486
|
-
* @rc
|
|
3487
3597
|
* @remarks
|
|
3488
3598
|
* Returns whether this block stops liquid from flowing.
|
|
3489
3599
|
*
|
|
@@ -3501,7 +3611,6 @@ export class Block {
|
|
|
3501
3611
|
*/
|
|
3502
3612
|
isLiquidBlocking(liquidType: LiquidType): boolean;
|
|
3503
3613
|
/**
|
|
3504
|
-
* @rc
|
|
3505
3614
|
* @remarks
|
|
3506
3615
|
* Returns whether liquid can flow into the block from the
|
|
3507
3616
|
* provided direction, or flow out from the provided direction
|
|
@@ -3523,7 +3632,6 @@ export class Block {
|
|
|
3523
3632
|
*/
|
|
3524
3633
|
liquidCanFlowFromDirection(liquidType: LiquidType, flowDirection: Direction): boolean;
|
|
3525
3634
|
/**
|
|
3526
|
-
* @rc
|
|
3527
3635
|
* @remarks
|
|
3528
3636
|
* Returns whether this block is removed and spawns its item
|
|
3529
3637
|
* when touched by liquid.
|
|
@@ -3695,6 +3803,137 @@ export class Block {
|
|
|
3695
3803
|
west(steps?: number): Block | undefined;
|
|
3696
3804
|
}
|
|
3697
3805
|
|
|
3806
|
+
/**
|
|
3807
|
+
* @beta
|
|
3808
|
+
* Bounding Box Utils is a utility class that provides a number
|
|
3809
|
+
* of useful functions for the creation and utility of {@link
|
|
3810
|
+
* BlockBoundingBox} objects
|
|
3811
|
+
*/
|
|
3812
|
+
export class BlockBoundingBoxUtils {
|
|
3813
|
+
private constructor();
|
|
3814
|
+
/**
|
|
3815
|
+
* @remarks
|
|
3816
|
+
* Create a validated instance of a {@link BlockBoundingBox}
|
|
3817
|
+
* where the min and max components are guaranteed to be (min
|
|
3818
|
+
* <= max)
|
|
3819
|
+
*
|
|
3820
|
+
* This function can't be called in read-only mode.
|
|
3821
|
+
*
|
|
3822
|
+
* @param min
|
|
3823
|
+
* A corner world location
|
|
3824
|
+
* @param max
|
|
3825
|
+
* A corner world location diametrically opposite
|
|
3826
|
+
*/
|
|
3827
|
+
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
3828
|
+
/**
|
|
3829
|
+
* @remarks
|
|
3830
|
+
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
3831
|
+
* each axis.
|
|
3832
|
+
* Sizes can be negative to perform contraction.
|
|
3833
|
+
* Note: corners can be inverted if the contraction size is
|
|
3834
|
+
* greater than the span, but the min/max relationship will
|
|
3835
|
+
* remain correct
|
|
3836
|
+
*
|
|
3837
|
+
* This function can't be called in read-only mode.
|
|
3838
|
+
*
|
|
3839
|
+
* @returns
|
|
3840
|
+
* Return a new {@link BlockBoundingBox} object representing
|
|
3841
|
+
* the changes
|
|
3842
|
+
*/
|
|
3843
|
+
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
3844
|
+
/**
|
|
3845
|
+
* @remarks
|
|
3846
|
+
* Check if two {@link BlockBoundingBox} objects are identical
|
|
3847
|
+
*
|
|
3848
|
+
* This function can't be called in read-only mode.
|
|
3849
|
+
*
|
|
3850
|
+
*/
|
|
3851
|
+
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3852
|
+
/**
|
|
3853
|
+
* @remarks
|
|
3854
|
+
* Expand the initial box object bounds to include the 2nd box
|
|
3855
|
+
* argument. The resultant {@link BlockBoundingBox} object
|
|
3856
|
+
* will be a BlockBoundingBox which exactly encompasses the two
|
|
3857
|
+
* boxes.
|
|
3858
|
+
*
|
|
3859
|
+
* This function can't be called in read-only mode.
|
|
3860
|
+
*
|
|
3861
|
+
* @returns
|
|
3862
|
+
* A new {@link BlockBoundingBox} instance representing the
|
|
3863
|
+
* smallest possible bounding box which can encompass both
|
|
3864
|
+
*/
|
|
3865
|
+
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
3866
|
+
/**
|
|
3867
|
+
* @remarks
|
|
3868
|
+
* Calculate the center block of a given {@link
|
|
3869
|
+
* BlockBoundingBox} object.
|
|
3870
|
+
*
|
|
3871
|
+
* This function can't be called in read-only mode.
|
|
3872
|
+
*
|
|
3873
|
+
* @returns
|
|
3874
|
+
* Note that {@link BlockBoundingBox} objects represent whole
|
|
3875
|
+
* blocks, so the center of boxes which have odd numbered
|
|
3876
|
+
* bounds are not mathematically centered...
|
|
3877
|
+
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
3878
|
+
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
3879
|
+
*/
|
|
3880
|
+
static getCenter(box: BlockBoundingBox): Vector3;
|
|
3881
|
+
/**
|
|
3882
|
+
* @remarks
|
|
3883
|
+
* Calculate the BlockBoundingBox which represents the union
|
|
3884
|
+
* area of two intersecting BlockBoundingBoxes
|
|
3885
|
+
*
|
|
3886
|
+
* This function can't be called in read-only mode.
|
|
3887
|
+
*
|
|
3888
|
+
*/
|
|
3889
|
+
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
3890
|
+
/**
|
|
3891
|
+
* @remarks
|
|
3892
|
+
* Get the Span of each of the BlockBoundingBox Axis components
|
|
3893
|
+
*
|
|
3894
|
+
* This function can't be called in read-only mode.
|
|
3895
|
+
*
|
|
3896
|
+
*/
|
|
3897
|
+
static getSpan(box: BlockBoundingBox): Vector3;
|
|
3898
|
+
/**
|
|
3899
|
+
* @remarks
|
|
3900
|
+
* Check to see if two BlockBoundingBox objects intersect
|
|
3901
|
+
*
|
|
3902
|
+
* This function can't be called in read-only mode.
|
|
3903
|
+
*
|
|
3904
|
+
*/
|
|
3905
|
+
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
3906
|
+
/**
|
|
3907
|
+
* @remarks
|
|
3908
|
+
* Check to see if a given coordinate is inside a
|
|
3909
|
+
* BlockBoundingBox
|
|
3910
|
+
*
|
|
3911
|
+
* This function can't be called in read-only mode.
|
|
3912
|
+
*
|
|
3913
|
+
*/
|
|
3914
|
+
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
3915
|
+
/**
|
|
3916
|
+
* @remarks
|
|
3917
|
+
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
3918
|
+
* max))
|
|
3919
|
+
*
|
|
3920
|
+
* This function can't be called in read-only mode.
|
|
3921
|
+
*
|
|
3922
|
+
*/
|
|
3923
|
+
static isValid(box: BlockBoundingBox): boolean;
|
|
3924
|
+
/**
|
|
3925
|
+
* @remarks
|
|
3926
|
+
* Move a BlockBoundingBox by a given amount
|
|
3927
|
+
*
|
|
3928
|
+
* This function can't be called in read-only mode.
|
|
3929
|
+
*
|
|
3930
|
+
* @returns
|
|
3931
|
+
* Return a new BlockBoundingBox object which represents the
|
|
3932
|
+
* change
|
|
3933
|
+
*/
|
|
3934
|
+
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
3935
|
+
}
|
|
3936
|
+
|
|
3698
3937
|
/**
|
|
3699
3938
|
* Base type for components associated with blocks.
|
|
3700
3939
|
*/
|
|
@@ -4243,7 +4482,6 @@ export class BlockPermutation {
|
|
|
4243
4482
|
*/
|
|
4244
4483
|
readonly 'type': BlockType;
|
|
4245
4484
|
/**
|
|
4246
|
-
* @rc
|
|
4247
4485
|
* @remarks
|
|
4248
4486
|
* Returns whether this block is removed when touched by
|
|
4249
4487
|
* liquid.
|
|
@@ -4258,7 +4496,6 @@ export class BlockPermutation {
|
|
|
4258
4496
|
*/
|
|
4259
4497
|
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
4260
4498
|
/**
|
|
4261
|
-
* @rc
|
|
4262
4499
|
* @remarks
|
|
4263
4500
|
* Returns whether this block can have a liquid placed over it,
|
|
4264
4501
|
* i.e. be waterlogged.
|
|
@@ -4337,7 +4574,6 @@ export class BlockPermutation {
|
|
|
4337
4574
|
*/
|
|
4338
4575
|
hasTag(tag: string): boolean;
|
|
4339
4576
|
/**
|
|
4340
|
-
* @rc
|
|
4341
4577
|
* @remarks
|
|
4342
4578
|
* Returns whether this block stops liquid from flowing.
|
|
4343
4579
|
*
|
|
@@ -4351,7 +4587,6 @@ export class BlockPermutation {
|
|
|
4351
4587
|
*/
|
|
4352
4588
|
isLiquidBlocking(liquidType: LiquidType): boolean;
|
|
4353
4589
|
/**
|
|
4354
|
-
* @rc
|
|
4355
4590
|
* @remarks
|
|
4356
4591
|
* Returns whether this block is removed and spawns its item
|
|
4357
4592
|
* when touched by liquid.
|
|
@@ -4947,12 +5182,12 @@ export class BlockVolumeBase {
|
|
|
4947
5182
|
/**
|
|
4948
5183
|
* @beta
|
|
4949
5184
|
* @remarks
|
|
4950
|
-
* Return a {@link
|
|
4951
|
-
* validated min and max coordinates of the volume
|
|
5185
|
+
* Return a {@link BlockBoundingBox} object which represents
|
|
5186
|
+
* the validated min and max coordinates of the volume
|
|
4952
5187
|
*
|
|
4953
5188
|
* @throws This function can throw errors.
|
|
4954
5189
|
*/
|
|
4955
|
-
getBoundingBox():
|
|
5190
|
+
getBoundingBox(): BlockBoundingBox;
|
|
4956
5191
|
/**
|
|
4957
5192
|
* @remarks
|
|
4958
5193
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -4999,132 +5234,6 @@ export class BlockVolumeBase {
|
|
|
4999
5234
|
translate(delta: Vector3): void;
|
|
5000
5235
|
}
|
|
5001
5236
|
|
|
5002
|
-
/**
|
|
5003
|
-
* @beta
|
|
5004
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
5005
|
-
* of useful functions for the creation and utility of {@link
|
|
5006
|
-
* BoundingBox} objects
|
|
5007
|
-
*/
|
|
5008
|
-
export class BoundingBoxUtils {
|
|
5009
|
-
private constructor();
|
|
5010
|
-
/**
|
|
5011
|
-
* @remarks
|
|
5012
|
-
* Create a validated instance of a {@link BoundingBox} where
|
|
5013
|
-
* the min and max components are guaranteed to be (min <= max)
|
|
5014
|
-
*
|
|
5015
|
-
* This function can't be called in read-only mode.
|
|
5016
|
-
*
|
|
5017
|
-
* @param min
|
|
5018
|
-
* A corner world location
|
|
5019
|
-
* @param max
|
|
5020
|
-
* A corner world location diametrically opposite
|
|
5021
|
-
*/
|
|
5022
|
-
static createValid(min: Vector3, max: Vector3): BoundingBox;
|
|
5023
|
-
/**
|
|
5024
|
-
* @remarks
|
|
5025
|
-
* Expand a {@link BoundingBox} by a given amount along each
|
|
5026
|
-
* axis.
|
|
5027
|
-
* Sizes can be negative to perform contraction.
|
|
5028
|
-
* Note: corners can be inverted if the contraction size is
|
|
5029
|
-
* greater than the span, but the min/max relationship will
|
|
5030
|
-
* remain correct
|
|
5031
|
-
*
|
|
5032
|
-
* This function can't be called in read-only mode.
|
|
5033
|
-
*
|
|
5034
|
-
* @returns
|
|
5035
|
-
* Return a new {@link BoundingBox} object representing the
|
|
5036
|
-
* changes
|
|
5037
|
-
*/
|
|
5038
|
-
static dilate(box: BoundingBox, size: Vector3): BoundingBox;
|
|
5039
|
-
/**
|
|
5040
|
-
* @remarks
|
|
5041
|
-
* Check if two {@link BoundingBox} objects are identical
|
|
5042
|
-
*
|
|
5043
|
-
* This function can't be called in read-only mode.
|
|
5044
|
-
*
|
|
5045
|
-
*/
|
|
5046
|
-
static equals(box: BoundingBox, other: BoundingBox): boolean;
|
|
5047
|
-
/**
|
|
5048
|
-
* @remarks
|
|
5049
|
-
* Expand the initial box object bounds to include the 2nd box
|
|
5050
|
-
* argument. The resultant {@link BoundingBox} object will be
|
|
5051
|
-
* a BoundingBox which exactly encompasses the two boxes.
|
|
5052
|
-
*
|
|
5053
|
-
* This function can't be called in read-only mode.
|
|
5054
|
-
*
|
|
5055
|
-
* @returns
|
|
5056
|
-
* A new {@link BoundingBox} instance representing the smallest
|
|
5057
|
-
* possible bounding box which can encompass both
|
|
5058
|
-
*/
|
|
5059
|
-
static expand(box: BoundingBox, other: BoundingBox): BoundingBox;
|
|
5060
|
-
/**
|
|
5061
|
-
* @remarks
|
|
5062
|
-
* Calculate the center block of a given {@link BoundingBox}
|
|
5063
|
-
* object.
|
|
5064
|
-
*
|
|
5065
|
-
* This function can't be called in read-only mode.
|
|
5066
|
-
*
|
|
5067
|
-
* @returns
|
|
5068
|
-
* Note that {@link BoundingBox} objects represent whole
|
|
5069
|
-
* blocks, so the center of boxes which have odd numbered
|
|
5070
|
-
* bounds are not mathematically centered...
|
|
5071
|
-
* i.e. a BoundingBox( 0,0,0 -> 3,3,3 ) would have a center of
|
|
5072
|
-
* (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
5073
|
-
*/
|
|
5074
|
-
static getCenter(box: BoundingBox): Vector3;
|
|
5075
|
-
/**
|
|
5076
|
-
* @remarks
|
|
5077
|
-
* Calculate the BoundingBox which represents the union area of
|
|
5078
|
-
* two intersecting BoundingBoxes
|
|
5079
|
-
*
|
|
5080
|
-
* This function can't be called in read-only mode.
|
|
5081
|
-
*
|
|
5082
|
-
*/
|
|
5083
|
-
static getIntersection(box: BoundingBox, other: BoundingBox): BoundingBox | undefined;
|
|
5084
|
-
/**
|
|
5085
|
-
* @remarks
|
|
5086
|
-
* Get the Span of each of the BoundingBox Axis components
|
|
5087
|
-
*
|
|
5088
|
-
* This function can't be called in read-only mode.
|
|
5089
|
-
*
|
|
5090
|
-
*/
|
|
5091
|
-
static getSpan(box: BoundingBox): Vector3;
|
|
5092
|
-
/**
|
|
5093
|
-
* @remarks
|
|
5094
|
-
* Check to see if two BoundingBox objects intersect
|
|
5095
|
-
*
|
|
5096
|
-
* This function can't be called in read-only mode.
|
|
5097
|
-
*
|
|
5098
|
-
*/
|
|
5099
|
-
static intersects(box: BoundingBox, other: BoundingBox): boolean;
|
|
5100
|
-
/**
|
|
5101
|
-
* @remarks
|
|
5102
|
-
* Check to see if a given coordinate is inside a BoundingBox
|
|
5103
|
-
*
|
|
5104
|
-
* This function can't be called in read-only mode.
|
|
5105
|
-
*
|
|
5106
|
-
*/
|
|
5107
|
-
static isInside(box: BoundingBox, pos: Vector3): boolean;
|
|
5108
|
-
/**
|
|
5109
|
-
* @remarks
|
|
5110
|
-
* Check to see if a BoundingBox is valid (i.e. (min <= max))
|
|
5111
|
-
*
|
|
5112
|
-
* This function can't be called in read-only mode.
|
|
5113
|
-
*
|
|
5114
|
-
*/
|
|
5115
|
-
static isValid(box: BoundingBox): boolean;
|
|
5116
|
-
/**
|
|
5117
|
-
* @remarks
|
|
5118
|
-
* Move a BoundingBox by a given amount
|
|
5119
|
-
*
|
|
5120
|
-
* This function can't be called in read-only mode.
|
|
5121
|
-
*
|
|
5122
|
-
* @returns
|
|
5123
|
-
* Return a new BoundingBox object which represents the change
|
|
5124
|
-
*/
|
|
5125
|
-
static translate(box: BoundingBox, delta: Vector3): BoundingBox;
|
|
5126
|
-
}
|
|
5127
|
-
|
|
5128
5237
|
/**
|
|
5129
5238
|
* Contains information related to changes to a button push.
|
|
5130
5239
|
* @example buttonPushEvent.ts
|
|
@@ -5598,7 +5707,7 @@ export class CompoundBlockVolume {
|
|
|
5598
5707
|
* This function can't be called in read-only mode.
|
|
5599
5708
|
*
|
|
5600
5709
|
*/
|
|
5601
|
-
getBoundingBox():
|
|
5710
|
+
getBoundingBox(): BlockBoundingBox;
|
|
5602
5711
|
/**
|
|
5603
5712
|
* @remarks
|
|
5604
5713
|
* Get the max block location of the outermost bounding
|
|
@@ -5884,14 +5993,59 @@ export class Container {
|
|
|
5884
5993
|
addItem(itemStack: ItemStack): ItemStack | undefined;
|
|
5885
5994
|
/**
|
|
5886
5995
|
* @remarks
|
|
5887
|
-
* Clears all inventory items in the container.
|
|
5996
|
+
* Clears all inventory items in the container.
|
|
5997
|
+
*
|
|
5998
|
+
* This function can't be called in read-only mode.
|
|
5999
|
+
*
|
|
6000
|
+
* @throws
|
|
6001
|
+
* Throws if the container is invalid.
|
|
6002
|
+
*/
|
|
6003
|
+
clearAll(): void;
|
|
6004
|
+
/**
|
|
6005
|
+
* @beta
|
|
6006
|
+
* @remarks
|
|
6007
|
+
* Attempts to find an item inside the container
|
|
6008
|
+
*
|
|
6009
|
+
* @param itemStack
|
|
6010
|
+
* The item to find.
|
|
6011
|
+
* @throws This function can throw errors.
|
|
6012
|
+
*
|
|
6013
|
+
* {@link InvalidContainerError}
|
|
6014
|
+
*/
|
|
6015
|
+
contains(itemStack: ItemStack): boolean;
|
|
6016
|
+
/**
|
|
6017
|
+
* @beta
|
|
6018
|
+
* @remarks
|
|
6019
|
+
* Find the index of the first instance of an item inside the
|
|
6020
|
+
* container
|
|
6021
|
+
*
|
|
6022
|
+
* @param itemStack
|
|
6023
|
+
* The item to find.
|
|
6024
|
+
* @throws This function can throw errors.
|
|
6025
|
+
*
|
|
6026
|
+
* {@link InvalidContainerError}
|
|
6027
|
+
*/
|
|
6028
|
+
find(itemStack: ItemStack): number;
|
|
6029
|
+
/**
|
|
6030
|
+
* @beta
|
|
6031
|
+
* @remarks
|
|
6032
|
+
* Finds the index of the first empty slot inside the container
|
|
6033
|
+
*
|
|
6034
|
+
* @throws This function can throw errors.
|
|
6035
|
+
*
|
|
6036
|
+
* {@link InvalidContainerError}
|
|
6037
|
+
*/
|
|
6038
|
+
firstEmptySlot(): number;
|
|
6039
|
+
/**
|
|
6040
|
+
* @beta
|
|
6041
|
+
* @remarks
|
|
6042
|
+
* Finds the index of the first item inside the container
|
|
5888
6043
|
*
|
|
5889
|
-
* This function can
|
|
6044
|
+
* @throws This function can throw errors.
|
|
5890
6045
|
*
|
|
5891
|
-
* @
|
|
5892
|
-
* Throws if the container is invalid.
|
|
6046
|
+
* {@link InvalidContainerError}
|
|
5893
6047
|
*/
|
|
5894
|
-
|
|
6048
|
+
firstItem(): number;
|
|
5895
6049
|
/**
|
|
5896
6050
|
* @remarks
|
|
5897
6051
|
* Gets an {@link ItemStack} of the item at the specified slot.
|
|
@@ -5989,6 +6143,19 @@ export class Container {
|
|
|
5989
6143
|
* ```
|
|
5990
6144
|
*/
|
|
5991
6145
|
moveItem(fromSlot: number, toSlot: number, toContainer: Container): void;
|
|
6146
|
+
/**
|
|
6147
|
+
* @beta
|
|
6148
|
+
* @remarks
|
|
6149
|
+
* Find the index of the last instance of an item inside the
|
|
6150
|
+
* container
|
|
6151
|
+
*
|
|
6152
|
+
* @param itemStack
|
|
6153
|
+
* The item to find.
|
|
6154
|
+
* @throws This function can throw errors.
|
|
6155
|
+
*
|
|
6156
|
+
* {@link InvalidContainerError}
|
|
6157
|
+
*/
|
|
6158
|
+
reverseFind(itemStack: ItemStack): number;
|
|
5992
6159
|
/**
|
|
5993
6160
|
* @remarks
|
|
5994
6161
|
* Sets an item stack within a particular slot.
|
|
@@ -6445,6 +6612,87 @@ export class ContainerSlot {
|
|
|
6445
6612
|
setLore(loreList?: string[]): void;
|
|
6446
6613
|
}
|
|
6447
6614
|
|
|
6615
|
+
/**
|
|
6616
|
+
* @beta
|
|
6617
|
+
* Details about the origins of the command.
|
|
6618
|
+
*/
|
|
6619
|
+
export class CustomCommandOrigin {
|
|
6620
|
+
private constructor();
|
|
6621
|
+
/**
|
|
6622
|
+
* @remarks
|
|
6623
|
+
* If this command was initiated via an NPC, returns the entity
|
|
6624
|
+
* that initiated the NPC dialogue.
|
|
6625
|
+
*
|
|
6626
|
+
*/
|
|
6627
|
+
readonly initiator?: Entity;
|
|
6628
|
+
/**
|
|
6629
|
+
* @remarks
|
|
6630
|
+
* Source block if this command was triggered via a block
|
|
6631
|
+
* (e.g., a commandblock.)
|
|
6632
|
+
*
|
|
6633
|
+
*/
|
|
6634
|
+
readonly sourceBlock?: Block;
|
|
6635
|
+
/**
|
|
6636
|
+
* @remarks
|
|
6637
|
+
* Source entity if this command was triggered by an entity
|
|
6638
|
+
* (e.g., a NPC).
|
|
6639
|
+
*
|
|
6640
|
+
*/
|
|
6641
|
+
readonly sourceEntity?: Entity;
|
|
6642
|
+
/**
|
|
6643
|
+
* @remarks
|
|
6644
|
+
* Returns the type of source that fired this command.
|
|
6645
|
+
*
|
|
6646
|
+
*/
|
|
6647
|
+
readonly sourceType: CustomCommandSource;
|
|
6648
|
+
}
|
|
6649
|
+
|
|
6650
|
+
/**
|
|
6651
|
+
* @beta
|
|
6652
|
+
* Provides the functionality for registering custom commands.
|
|
6653
|
+
*/
|
|
6654
|
+
export class CustomCommandRegistry {
|
|
6655
|
+
private constructor();
|
|
6656
|
+
/**
|
|
6657
|
+
* @remarks
|
|
6658
|
+
* Registers a custom command that when executed triggers a
|
|
6659
|
+
* script callback.
|
|
6660
|
+
*
|
|
6661
|
+
* This function can't be called in read-only mode.
|
|
6662
|
+
*
|
|
6663
|
+
* This function can be called in early-execution mode.
|
|
6664
|
+
*
|
|
6665
|
+
* @param callback
|
|
6666
|
+
* The callback triggered when the command executes.
|
|
6667
|
+
* @throws This function can throw errors.
|
|
6668
|
+
*
|
|
6669
|
+
* {@link CustomCommandError}
|
|
6670
|
+
*
|
|
6671
|
+
* {@link minecraftcommon.EngineError}
|
|
6672
|
+
*
|
|
6673
|
+
* {@link NamespaceNameError}
|
|
6674
|
+
*/
|
|
6675
|
+
registerCommand(
|
|
6676
|
+
customCommand: CustomCommand,
|
|
6677
|
+
callback: (origin: CustomCommandOrigin, ...args: any[]) => CustomCommandResult | undefined,
|
|
6678
|
+
): void;
|
|
6679
|
+
}
|
|
6680
|
+
|
|
6681
|
+
/**
|
|
6682
|
+
* @beta
|
|
6683
|
+
* Contains the custom component's JSON parameters
|
|
6684
|
+
*/
|
|
6685
|
+
export class CustomComponentParameters {
|
|
6686
|
+
private constructor();
|
|
6687
|
+
/**
|
|
6688
|
+
* @remarks
|
|
6689
|
+
* JSON object containing the parameters from the custom
|
|
6690
|
+
* component definition
|
|
6691
|
+
*
|
|
6692
|
+
*/
|
|
6693
|
+
readonly params: unknown;
|
|
6694
|
+
}
|
|
6695
|
+
|
|
6448
6696
|
/**
|
|
6449
6697
|
* Contains information related to firing of a data driven
|
|
6450
6698
|
* entity event - for example, the minecraft:ageable_grow_up
|
|
@@ -6886,7 +7134,7 @@ export class Dimension {
|
|
|
6886
7134
|
*/
|
|
6887
7135
|
getWeather(): WeatherType;
|
|
6888
7136
|
/**
|
|
6889
|
-
* @
|
|
7137
|
+
* @rc
|
|
6890
7138
|
* @remarks
|
|
6891
7139
|
* Places the given feature into the dimension at the specified
|
|
6892
7140
|
* location.
|
|
@@ -6916,7 +7164,7 @@ export class Dimension {
|
|
|
6916
7164
|
*/
|
|
6917
7165
|
placeFeature(featureName: string, location: Vector3, shouldThrow?: boolean): boolean;
|
|
6918
7166
|
/**
|
|
6919
|
-
* @
|
|
7167
|
+
* @rc
|
|
6920
7168
|
* @remarks
|
|
6921
7169
|
* Places the given feature rule into the dimension at the
|
|
6922
7170
|
* specified location.
|
|
@@ -7607,6 +7855,17 @@ export class Entity {
|
|
|
7607
7855
|
*
|
|
7608
7856
|
*/
|
|
7609
7857
|
readonly isValid: boolean;
|
|
7858
|
+
/**
|
|
7859
|
+
* @beta
|
|
7860
|
+
* @remarks
|
|
7861
|
+
* key for the localization of this entity's name used in .lang
|
|
7862
|
+
* files.
|
|
7863
|
+
*
|
|
7864
|
+
* @throws This property can throw when used.
|
|
7865
|
+
*
|
|
7866
|
+
* {@link InvalidEntityError}
|
|
7867
|
+
*/
|
|
7868
|
+
readonly localizationKey: string;
|
|
7610
7869
|
/**
|
|
7611
7870
|
* @remarks
|
|
7612
7871
|
* Current location of the entity.
|
|
@@ -9071,10 +9330,9 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
9071
9330
|
* Current value of the friction modifier of the associated
|
|
9072
9331
|
* entity.
|
|
9073
9332
|
*
|
|
9074
|
-
* This property can
|
|
9075
|
-
*
|
|
9333
|
+
* @throws This property can throw when used.
|
|
9076
9334
|
*/
|
|
9077
|
-
value: number;
|
|
9335
|
+
readonly value: number;
|
|
9078
9336
|
static readonly componentId = 'minecraft:friction_modifier';
|
|
9079
9337
|
}
|
|
9080
9338
|
|
|
@@ -10741,10 +10999,9 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
10741
10999
|
* @remarks
|
|
10742
11000
|
* Returns the value of the skin Id identifier of the entity.
|
|
10743
11001
|
*
|
|
10744
|
-
* This property can
|
|
10745
|
-
*
|
|
11002
|
+
* @throws This property can throw when used.
|
|
10746
11003
|
*/
|
|
10747
|
-
value: number;
|
|
11004
|
+
readonly value: number;
|
|
10748
11005
|
static readonly componentId = 'minecraft:skin_id';
|
|
10749
11006
|
}
|
|
10750
11007
|
|
|
@@ -11488,6 +11745,13 @@ export class GameRules {
|
|
|
11488
11745
|
*
|
|
11489
11746
|
*/
|
|
11490
11747
|
keepInventory: boolean;
|
|
11748
|
+
/**
|
|
11749
|
+
* @beta
|
|
11750
|
+
* @remarks
|
|
11751
|
+
* This property can't be edited in read-only mode.
|
|
11752
|
+
*
|
|
11753
|
+
*/
|
|
11754
|
+
locatorBar: boolean;
|
|
11491
11755
|
/**
|
|
11492
11756
|
* @remarks
|
|
11493
11757
|
* This property can't be edited in read-only mode.
|
|
@@ -11631,7 +11895,6 @@ export class InputInfo {
|
|
|
11631
11895
|
*/
|
|
11632
11896
|
readonly touchOnlyAffectsHotbar: boolean;
|
|
11633
11897
|
/**
|
|
11634
|
-
* @rc
|
|
11635
11898
|
* @throws This function can throw errors.
|
|
11636
11899
|
*
|
|
11637
11900
|
* {@link minecraftcommon.EngineError}
|
|
@@ -11640,7 +11903,6 @@ export class InputInfo {
|
|
|
11640
11903
|
*/
|
|
11641
11904
|
getButtonState(button: InputButton): ButtonState;
|
|
11642
11905
|
/**
|
|
11643
|
-
* @rc
|
|
11644
11906
|
* @throws This function can throw errors.
|
|
11645
11907
|
*
|
|
11646
11908
|
* {@link InvalidEntityError}
|
|
@@ -12533,6 +12795,17 @@ export class ItemStack {
|
|
|
12533
12795
|
*
|
|
12534
12796
|
*/
|
|
12535
12797
|
keepOnDeath: boolean;
|
|
12798
|
+
/**
|
|
12799
|
+
* @beta
|
|
12800
|
+
* @remarks
|
|
12801
|
+
* key for the localization of this items's name used in .lang
|
|
12802
|
+
* files.
|
|
12803
|
+
*
|
|
12804
|
+
* @throws This property can throw when used.
|
|
12805
|
+
*
|
|
12806
|
+
* {@link minecraftcommon.EngineError}
|
|
12807
|
+
*/
|
|
12808
|
+
readonly localizationKey: string;
|
|
12536
12809
|
/**
|
|
12537
12810
|
* @remarks
|
|
12538
12811
|
* Gets or sets the item's lock mode. The default value is
|
|
@@ -14187,7 +14460,6 @@ export class Player extends Entity {
|
|
|
14187
14460
|
*/
|
|
14188
14461
|
setSpawnPoint(spawnPoint?: DimensionLocation): void;
|
|
14189
14462
|
/**
|
|
14190
|
-
* @rc
|
|
14191
14463
|
* @remarks
|
|
14192
14464
|
* Creates a new particle emitter at a specified location in
|
|
14193
14465
|
* the world. Only visible to the target player.
|
|
@@ -14431,7 +14703,6 @@ export class PlayerBreakBlockBeforeEventSignal {
|
|
|
14431
14703
|
}
|
|
14432
14704
|
|
|
14433
14705
|
/**
|
|
14434
|
-
* @rc
|
|
14435
14706
|
* Event data for when a player presses a button.
|
|
14436
14707
|
*/
|
|
14437
14708
|
export class PlayerButtonInputAfterEvent {
|
|
@@ -14457,7 +14728,6 @@ export class PlayerButtonInputAfterEvent {
|
|
|
14457
14728
|
}
|
|
14458
14729
|
|
|
14459
14730
|
/**
|
|
14460
|
-
* @rc
|
|
14461
14731
|
* Manages callbacks that are connected to player inputs.
|
|
14462
14732
|
*/
|
|
14463
14733
|
export class PlayerButtonInputAfterEventSignal {
|
|
@@ -16654,6 +16924,12 @@ export class StartupEvent {
|
|
|
16654
16924
|
*
|
|
16655
16925
|
*/
|
|
16656
16926
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
16927
|
+
/**
|
|
16928
|
+
* @remarks
|
|
16929
|
+
* This property can be read in early-execution mode.
|
|
16930
|
+
*
|
|
16931
|
+
*/
|
|
16932
|
+
readonly customCommandRegistry: CustomCommandRegistry;
|
|
16657
16933
|
/**
|
|
16658
16934
|
* @remarks
|
|
16659
16935
|
* This property can be read in early-execution mode.
|
|
@@ -16964,8 +17240,8 @@ export class StructureManager {
|
|
|
16964
17240
|
* Optional settings to use when generating the jigsaw
|
|
16965
17241
|
* structure.
|
|
16966
17242
|
* @returns
|
|
16967
|
-
* Returns a {@link
|
|
16968
|
-
* maximum bounds of the jigsaw structure.
|
|
17243
|
+
* Returns a {@link BlockBoundingBox} object which represents
|
|
17244
|
+
* the maximum bounds of the jigsaw structure.
|
|
16969
17245
|
* @throws
|
|
16970
17246
|
* Throws if maxDepth is outside of the range [1,20]
|
|
16971
17247
|
* Throws if generation fails due to invalid parameters or
|
|
@@ -16982,7 +17258,7 @@ export class StructureManager {
|
|
|
16982
17258
|
dimension: Dimension,
|
|
16983
17259
|
location: Vector3,
|
|
16984
17260
|
options?: JigsawPlaceOptions,
|
|
16985
|
-
):
|
|
17261
|
+
): BlockBoundingBox;
|
|
16986
17262
|
/**
|
|
16987
17263
|
* @beta
|
|
16988
17264
|
* @remarks
|
|
@@ -17004,8 +17280,8 @@ export class StructureManager {
|
|
|
17004
17280
|
* Optional settings to use when generating the jigsaw
|
|
17005
17281
|
* structure.
|
|
17006
17282
|
* @returns
|
|
17007
|
-
* Returns a {@link
|
|
17008
|
-
* maximum bounds of the jigsaw structure.
|
|
17283
|
+
* Returns a {@link BlockBoundingBox} object which represents
|
|
17284
|
+
* the maximum bounds of the jigsaw structure.
|
|
17009
17285
|
* @throws
|
|
17010
17286
|
* Throws if generation fails due to invalid parameters or
|
|
17011
17287
|
* jigsaw configuration.
|
|
@@ -17019,7 +17295,7 @@ export class StructureManager {
|
|
|
17019
17295
|
dimension: Dimension,
|
|
17020
17296
|
location: Vector3,
|
|
17021
17297
|
options?: JigsawStructurePlaceOptions,
|
|
17022
|
-
):
|
|
17298
|
+
): BlockBoundingBox;
|
|
17023
17299
|
}
|
|
17024
17300
|
|
|
17025
17301
|
/**
|
|
@@ -17213,7 +17489,6 @@ export class System {
|
|
|
17213
17489
|
*/
|
|
17214
17490
|
runTimeout(callback: () => void, tickDelay?: number): number;
|
|
17215
17491
|
/**
|
|
17216
|
-
* @rc
|
|
17217
17492
|
* @remarks
|
|
17218
17493
|
* Causes an event to fire within script with the specified
|
|
17219
17494
|
* message ID and payload.
|
|
@@ -17833,7 +18108,7 @@ export class World {
|
|
|
17833
18108
|
*/
|
|
17834
18109
|
getDefaultSpawnLocation(): Vector3;
|
|
17835
18110
|
/**
|
|
17836
|
-
* @
|
|
18111
|
+
* @rc
|
|
17837
18112
|
* @remarks
|
|
17838
18113
|
* Gets the difficulty from the world.
|
|
17839
18114
|
*
|
|
@@ -18085,7 +18360,7 @@ export class World {
|
|
|
18085
18360
|
*/
|
|
18086
18361
|
setDefaultSpawnLocation(spawnLocation: Vector3): void;
|
|
18087
18362
|
/**
|
|
18088
|
-
* @
|
|
18363
|
+
* @rc
|
|
18089
18364
|
* @remarks
|
|
18090
18365
|
* Sets the worlds difficulty.
|
|
18091
18366
|
*
|
|
@@ -18444,7 +18719,6 @@ export class WorldAfterEvents {
|
|
|
18444
18719
|
*/
|
|
18445
18720
|
readonly playerBreakBlock: PlayerBreakBlockAfterEventSignal;
|
|
18446
18721
|
/**
|
|
18447
|
-
* @rc
|
|
18448
18722
|
* @remarks
|
|
18449
18723
|
* This event fires when an {@link InputButton} state is
|
|
18450
18724
|
* changed.
|
|
@@ -18789,6 +19063,40 @@ export interface BiomeSearchOptions {
|
|
|
18789
19063
|
boundingSize?: Vector3;
|
|
18790
19064
|
}
|
|
18791
19065
|
|
|
19066
|
+
/**
|
|
19067
|
+
* @rc
|
|
19068
|
+
* A BlockBoundingBox is an interface to an object which
|
|
19069
|
+
* represents an AABB aligned rectangle.
|
|
19070
|
+
* The BlockBoundingBox assumes that it was created in a valid
|
|
19071
|
+
* state (min <= max) but cannot guarantee it (unless it was
|
|
19072
|
+
* created using the associated {@link BlockBoundingBoxUtils}
|
|
19073
|
+
* utility functions.
|
|
19074
|
+
* The min/max coordinates represent the diametrically opposite
|
|
19075
|
+
* corners of the rectangle.
|
|
19076
|
+
* The BlockBoundingBox is not a representation of blocks - it
|
|
19077
|
+
* has no association with any type, it is just a mathematical
|
|
19078
|
+
* construct - so a rectangle with
|
|
19079
|
+
* ( 0,0,0 ) -> ( 0,0,0 )
|
|
19080
|
+
* has a size of ( 0,0,0 ) (unlike the very similar {@link
|
|
19081
|
+
* BlockVolume} object)
|
|
19082
|
+
*/
|
|
19083
|
+
export interface BlockBoundingBox {
|
|
19084
|
+
/**
|
|
19085
|
+
* @remarks
|
|
19086
|
+
* A {@link Vector3} that represents the largest corner of the
|
|
19087
|
+
* rectangle
|
|
19088
|
+
*
|
|
19089
|
+
*/
|
|
19090
|
+
max: Vector3;
|
|
19091
|
+
/**
|
|
19092
|
+
* @remarks
|
|
19093
|
+
* A {@link Vector3} that represents the smallest corner of the
|
|
19094
|
+
* rectangle
|
|
19095
|
+
*
|
|
19096
|
+
*/
|
|
19097
|
+
min: Vector3;
|
|
19098
|
+
}
|
|
19099
|
+
|
|
18792
19100
|
/**
|
|
18793
19101
|
* Contains a set of events that will be raised for a block.
|
|
18794
19102
|
* This object must be bound using the BlockRegistry.
|
|
@@ -18800,28 +19108,28 @@ export interface BlockCustomComponent {
|
|
|
18800
19108
|
* block.
|
|
18801
19109
|
*
|
|
18802
19110
|
*/
|
|
18803
|
-
beforeOnPlayerPlace?: (arg0: BlockComponentPlayerPlaceBeforeEvent) => void;
|
|
19111
|
+
beforeOnPlayerPlace?: (arg0: BlockComponentPlayerPlaceBeforeEvent, arg1: CustomComponentParameters) => void;
|
|
18804
19112
|
/**
|
|
18805
19113
|
* @remarks
|
|
18806
19114
|
* This function will be called when an entity falls onto the
|
|
18807
19115
|
* block that this custom component is bound to.
|
|
18808
19116
|
*
|
|
18809
19117
|
*/
|
|
18810
|
-
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent) => void;
|
|
19118
|
+
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent, arg1: CustomComponentParameters) => void;
|
|
18811
19119
|
/**
|
|
18812
19120
|
* @remarks
|
|
18813
19121
|
* This function will be called when the block that this custom
|
|
18814
19122
|
* component is bound to is placed.
|
|
18815
19123
|
*
|
|
18816
19124
|
*/
|
|
18817
|
-
onPlace?: (arg0: BlockComponentOnPlaceEvent) => void;
|
|
19125
|
+
onPlace?: (arg0: BlockComponentOnPlaceEvent, arg1: CustomComponentParameters) => void;
|
|
18818
19126
|
/**
|
|
18819
19127
|
* @remarks
|
|
18820
19128
|
* This function will be called when a player destroys a
|
|
18821
19129
|
* specific block.
|
|
18822
19130
|
*
|
|
18823
19131
|
*/
|
|
18824
|
-
onPlayerDestroy?: (arg0: BlockComponentPlayerDestroyEvent) => void;
|
|
19132
|
+
onPlayerDestroy?: (arg0: BlockComponentPlayerDestroyEvent, arg1: CustomComponentParameters) => void;
|
|
18825
19133
|
/**
|
|
18826
19134
|
* @remarks
|
|
18827
19135
|
* This function will be called when a player sucessfully
|
|
@@ -18829,33 +19137,33 @@ export interface BlockCustomComponent {
|
|
|
18829
19137
|
* to.
|
|
18830
19138
|
*
|
|
18831
19139
|
*/
|
|
18832
|
-
onPlayerInteract?: (arg0: BlockComponentPlayerInteractEvent) => void;
|
|
19140
|
+
onPlayerInteract?: (arg0: BlockComponentPlayerInteractEvent, arg1: CustomComponentParameters) => void;
|
|
18833
19141
|
/**
|
|
18834
19142
|
* @remarks
|
|
18835
19143
|
* This function will be called when a block randomly ticks.
|
|
18836
19144
|
*
|
|
18837
19145
|
*/
|
|
18838
|
-
onRandomTick?: (arg0: BlockComponentRandomTickEvent) => void;
|
|
19146
|
+
onRandomTick?: (arg0: BlockComponentRandomTickEvent, arg1: CustomComponentParameters) => void;
|
|
18839
19147
|
/**
|
|
18840
19148
|
* @remarks
|
|
18841
19149
|
* This function will be called when an entity steps off the
|
|
18842
19150
|
* block that this custom component is bound to.
|
|
18843
19151
|
*
|
|
18844
19152
|
*/
|
|
18845
|
-
onStepOff?: (arg0: BlockComponentStepOffEvent) => void;
|
|
19153
|
+
onStepOff?: (arg0: BlockComponentStepOffEvent, arg1: CustomComponentParameters) => void;
|
|
18846
19154
|
/**
|
|
18847
19155
|
* @remarks
|
|
18848
19156
|
* This function will be called when an entity steps onto the
|
|
18849
19157
|
* block that this custom component is bound to.
|
|
18850
19158
|
*
|
|
18851
19159
|
*/
|
|
18852
|
-
onStepOn?: (arg0: BlockComponentStepOnEvent) => void;
|
|
19160
|
+
onStepOn?: (arg0: BlockComponentStepOnEvent, arg1: CustomComponentParameters) => void;
|
|
18853
19161
|
/**
|
|
18854
19162
|
* @remarks
|
|
18855
19163
|
* This function will be called when a block ticks.
|
|
18856
19164
|
*
|
|
18857
19165
|
*/
|
|
18858
|
-
onTick?: (arg0: BlockComponentTickEvent) => void;
|
|
19166
|
+
onTick?: (arg0: BlockComponentTickEvent, arg1: CustomComponentParameters) => void;
|
|
18859
19167
|
}
|
|
18860
19168
|
|
|
18861
19169
|
/**
|
|
@@ -19030,40 +19338,6 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
19030
19338
|
maxDistance?: number;
|
|
19031
19339
|
}
|
|
19032
19340
|
|
|
19033
|
-
/**
|
|
19034
|
-
* @beta
|
|
19035
|
-
* A BoundingBox is an interface to an object which represents
|
|
19036
|
-
* an AABB aligned rectangle.
|
|
19037
|
-
* The BoundingBox assumes that it was created in a valid state
|
|
19038
|
-
* (min <= max) but cannot guarantee it (unless it was created
|
|
19039
|
-
* using the associated {@link BoundingBoxUtils} utility
|
|
19040
|
-
* functions.
|
|
19041
|
-
* The min/max coordinates represent the diametrically opposite
|
|
19042
|
-
* corners of the rectangle.
|
|
19043
|
-
* The BoundingBox is not a representation of blocks - it has
|
|
19044
|
-
* no association with any type, it is just a mathematical
|
|
19045
|
-
* construct - so a rectangle with
|
|
19046
|
-
* ( 0,0,0 ) -> ( 0,0,0 )
|
|
19047
|
-
* has a size of ( 0,0,0 ) (unlike the very similar {@link
|
|
19048
|
-
* BlockVolume} object)
|
|
19049
|
-
*/
|
|
19050
|
-
export interface BoundingBox {
|
|
19051
|
-
/**
|
|
19052
|
-
* @remarks
|
|
19053
|
-
* A {@link Vector3} that represents the largest corner of the
|
|
19054
|
-
* rectangle
|
|
19055
|
-
*
|
|
19056
|
-
*/
|
|
19057
|
-
max: Vector3;
|
|
19058
|
-
/**
|
|
19059
|
-
* @remarks
|
|
19060
|
-
* A {@link Vector3} that represents the smallest corner of the
|
|
19061
|
-
* rectangle
|
|
19062
|
-
*
|
|
19063
|
-
*/
|
|
19064
|
-
min: Vector3;
|
|
19065
|
-
}
|
|
19066
|
-
|
|
19067
19341
|
export interface CameraDefaultOptions {
|
|
19068
19342
|
/**
|
|
19069
19343
|
* @remarks
|
|
@@ -19228,6 +19502,84 @@ export interface CompoundBlockVolumeItem {
|
|
|
19228
19502
|
volume: BlockVolume;
|
|
19229
19503
|
}
|
|
19230
19504
|
|
|
19505
|
+
/**
|
|
19506
|
+
* @beta
|
|
19507
|
+
* Define the custom command, including name, permissions, and
|
|
19508
|
+
* parameters.
|
|
19509
|
+
*/
|
|
19510
|
+
export interface CustomCommand {
|
|
19511
|
+
/**
|
|
19512
|
+
* @remarks
|
|
19513
|
+
* Command description as seen on the command line.
|
|
19514
|
+
*
|
|
19515
|
+
*/
|
|
19516
|
+
description: string;
|
|
19517
|
+
/**
|
|
19518
|
+
* @remarks
|
|
19519
|
+
* List of mandatory command parameters.
|
|
19520
|
+
*
|
|
19521
|
+
*/
|
|
19522
|
+
mandatoryParameters?: CustomCommandParameter[];
|
|
19523
|
+
/**
|
|
19524
|
+
* @remarks
|
|
19525
|
+
* The name of the command. A namespace is required.
|
|
19526
|
+
*
|
|
19527
|
+
*/
|
|
19528
|
+
name: string;
|
|
19529
|
+
/**
|
|
19530
|
+
* @remarks
|
|
19531
|
+
* List of optional command parameters.
|
|
19532
|
+
*
|
|
19533
|
+
*/
|
|
19534
|
+
optionalParameters?: CustomCommandParameter[];
|
|
19535
|
+
/**
|
|
19536
|
+
* @remarks
|
|
19537
|
+
* The permission level required to execute the command.
|
|
19538
|
+
*
|
|
19539
|
+
*/
|
|
19540
|
+
permissionLevel: CommandPermissionLevel;
|
|
19541
|
+
}
|
|
19542
|
+
|
|
19543
|
+
/**
|
|
19544
|
+
* @beta
|
|
19545
|
+
* Definition for each parameter expected by the custom
|
|
19546
|
+
* command.
|
|
19547
|
+
*/
|
|
19548
|
+
export interface CustomCommandParameter {
|
|
19549
|
+
/**
|
|
19550
|
+
* @remarks
|
|
19551
|
+
* The name of parameter as it appears on the command line.
|
|
19552
|
+
*
|
|
19553
|
+
*/
|
|
19554
|
+
name: string;
|
|
19555
|
+
/**
|
|
19556
|
+
* @remarks
|
|
19557
|
+
* The data type of the parameter.
|
|
19558
|
+
*
|
|
19559
|
+
*/
|
|
19560
|
+
type: CustomCommandParamType;
|
|
19561
|
+
}
|
|
19562
|
+
|
|
19563
|
+
/**
|
|
19564
|
+
* @beta
|
|
19565
|
+
* Interface returned from custom command callback function.
|
|
19566
|
+
*/
|
|
19567
|
+
export interface CustomCommandResult {
|
|
19568
|
+
/**
|
|
19569
|
+
* @remarks
|
|
19570
|
+
* Message displayed to chat after command execution.
|
|
19571
|
+
*
|
|
19572
|
+
*/
|
|
19573
|
+
message?: string;
|
|
19574
|
+
/**
|
|
19575
|
+
* @remarks
|
|
19576
|
+
* Command execution Success or Failure. Determines how the
|
|
19577
|
+
* status message is displayed.
|
|
19578
|
+
*
|
|
19579
|
+
*/
|
|
19580
|
+
status: CustomCommandStatus;
|
|
19581
|
+
}
|
|
19582
|
+
|
|
19231
19583
|
/**
|
|
19232
19584
|
* Contains a set of updates to the component definition state
|
|
19233
19585
|
* of an entity.
|
|
@@ -20000,7 +20352,6 @@ export interface GreaterThanOrEqualsComparison {
|
|
|
20000
20352
|
}
|
|
20001
20353
|
|
|
20002
20354
|
/**
|
|
20003
|
-
* @rc
|
|
20004
20355
|
* An interface that is passed into {@link
|
|
20005
20356
|
* @minecraft/Server.PlayerButtonInputAfterEventSignal.subscribe}
|
|
20006
20357
|
* that filters out which events are passed to the provided
|
|
@@ -20035,49 +20386,52 @@ export interface ItemCustomComponent {
|
|
|
20035
20386
|
* damage.
|
|
20036
20387
|
*
|
|
20037
20388
|
*/
|
|
20038
|
-
onBeforeDurabilityDamage?: (
|
|
20389
|
+
onBeforeDurabilityDamage?: (
|
|
20390
|
+
arg0: ItemComponentBeforeDurabilityDamageEvent,
|
|
20391
|
+
arg1: CustomComponentParameters,
|
|
20392
|
+
) => void;
|
|
20039
20393
|
/**
|
|
20040
20394
|
* @remarks
|
|
20041
20395
|
* This function will be called when an item containing this
|
|
20042
20396
|
* component's use duration was completed.
|
|
20043
20397
|
*
|
|
20044
20398
|
*/
|
|
20045
|
-
onCompleteUse?: (arg0: ItemComponentCompleteUseEvent) => void;
|
|
20399
|
+
onCompleteUse?: (arg0: ItemComponentCompleteUseEvent, arg1: CustomComponentParameters) => void;
|
|
20046
20400
|
/**
|
|
20047
20401
|
* @remarks
|
|
20048
20402
|
* This function will be called when an item containing this
|
|
20049
20403
|
* component is eaten by an entity.
|
|
20050
20404
|
*
|
|
20051
20405
|
*/
|
|
20052
|
-
onConsume?: (arg0: ItemComponentConsumeEvent) => void;
|
|
20406
|
+
onConsume?: (arg0: ItemComponentConsumeEvent, arg1: CustomComponentParameters) => void;
|
|
20053
20407
|
/**
|
|
20054
20408
|
* @remarks
|
|
20055
20409
|
* This function will be called when an item containing this
|
|
20056
20410
|
* component is used to hit another entity.
|
|
20057
20411
|
*
|
|
20058
20412
|
*/
|
|
20059
|
-
onHitEntity?: (arg0: ItemComponentHitEntityEvent) => void;
|
|
20413
|
+
onHitEntity?: (arg0: ItemComponentHitEntityEvent, arg1: CustomComponentParameters) => void;
|
|
20060
20414
|
/**
|
|
20061
20415
|
* @remarks
|
|
20062
20416
|
* This function will be called when an item containing this
|
|
20063
20417
|
* component is used to mine a block.
|
|
20064
20418
|
*
|
|
20065
20419
|
*/
|
|
20066
|
-
onMineBlock?: (arg0: ItemComponentMineBlockEvent) => void;
|
|
20420
|
+
onMineBlock?: (arg0: ItemComponentMineBlockEvent, arg1: CustomComponentParameters) => void;
|
|
20067
20421
|
/**
|
|
20068
20422
|
* @remarks
|
|
20069
20423
|
* This function will be called when an item containing this
|
|
20070
20424
|
* component is used by a player.
|
|
20071
20425
|
*
|
|
20072
20426
|
*/
|
|
20073
|
-
onUse?: (arg0: ItemComponentUseEvent) => void;
|
|
20427
|
+
onUse?: (arg0: ItemComponentUseEvent, arg1: CustomComponentParameters) => void;
|
|
20074
20428
|
/**
|
|
20075
20429
|
* @remarks
|
|
20076
20430
|
* This function will be called when an item containing this
|
|
20077
20431
|
* component is used on a block.
|
|
20078
20432
|
*
|
|
20079
20433
|
*/
|
|
20080
|
-
onUseOn?: (arg0: ItemComponentUseOnEvent) => void;
|
|
20434
|
+
onUseOn?: (arg0: ItemComponentUseOnEvent, arg1: CustomComponentParameters) => void;
|
|
20081
20435
|
}
|
|
20082
20436
|
|
|
20083
20437
|
/**
|
|
@@ -20906,6 +21260,23 @@ export class CommandError extends Error {
|
|
|
20906
21260
|
private constructor();
|
|
20907
21261
|
}
|
|
20908
21262
|
|
|
21263
|
+
/**
|
|
21264
|
+
* @beta
|
|
21265
|
+
* Error object thrown when CustomCommandRegistry errors occur.
|
|
21266
|
+
*/
|
|
21267
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21268
|
+
export class CustomCommandError extends Error {
|
|
21269
|
+
private constructor();
|
|
21270
|
+
/**
|
|
21271
|
+
* @remarks
|
|
21272
|
+
* Reason for the error.
|
|
21273
|
+
*
|
|
21274
|
+
* This property can be read in early-execution mode.
|
|
21275
|
+
*
|
|
21276
|
+
*/
|
|
21277
|
+
reason: CustomCommandErrorReason;
|
|
21278
|
+
}
|
|
21279
|
+
|
|
20909
21280
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20910
21281
|
export class CustomComponentInvalidRegistryError extends Error {
|
|
20911
21282
|
private constructor();
|
|
@@ -20937,6 +21308,14 @@ export class EnchantmentTypeUnknownIdError extends Error {
|
|
|
20937
21308
|
private constructor();
|
|
20938
21309
|
}
|
|
20939
21310
|
|
|
21311
|
+
/**
|
|
21312
|
+
* @beta
|
|
21313
|
+
*/
|
|
21314
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21315
|
+
export class InvalidContainerError extends Error {
|
|
21316
|
+
private constructor();
|
|
21317
|
+
}
|
|
21318
|
+
|
|
20940
21319
|
/**
|
|
20941
21320
|
* The container slot is invalid. This can occur when the
|
|
20942
21321
|
* owning container is destroyed or unloaded.
|
|
@@ -21042,7 +21421,6 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
21042
21421
|
}
|
|
21043
21422
|
|
|
21044
21423
|
/**
|
|
21045
|
-
* @rc
|
|
21046
21424
|
* Thrown when a name requires a namespace and an error occurs
|
|
21047
21425
|
* when validating that namespace
|
|
21048
21426
|
*/
|