@minecraft/server 1.1.0-beta.1.19.70-preview.20 → 1.1.0-beta.1.19.70-preview.21
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 +29 -120
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.1.0-internal.1.19.70-preview.
|
|
19
|
+
* "version": "1.1.0-internal.1.19.70-preview.21"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -377,16 +377,12 @@ export class BeforeExplosionEvent {
|
|
|
377
377
|
* Dimension where the explosion has occurred.
|
|
378
378
|
*/
|
|
379
379
|
readonly dimension: Dimension;
|
|
380
|
-
/**
|
|
381
|
-
* A collection of blocks impacted by this explosion event.
|
|
382
|
-
* Note that this property can be updated to change the set of
|
|
383
|
-
* blocks impacted.
|
|
384
|
-
*/
|
|
385
|
-
impactedBlocks: Vector3[];
|
|
386
380
|
/**
|
|
387
381
|
* Optional source of the explosion.
|
|
388
382
|
*/
|
|
389
383
|
readonly source: Entity;
|
|
384
|
+
getImpactedBlocks(): Vector3[];
|
|
385
|
+
setImpactedBlocks(blocks: Vector3[]): void;
|
|
390
386
|
}
|
|
391
387
|
/**
|
|
392
388
|
* @beta
|
|
@@ -513,10 +509,6 @@ export class BeforeItemUseOnEvent {
|
|
|
513
509
|
* The face of the block that an item is being used on.
|
|
514
510
|
*/
|
|
515
511
|
readonly blockFace: Direction;
|
|
516
|
-
/**
|
|
517
|
-
* Location of the block being impacted.
|
|
518
|
-
*/
|
|
519
|
-
readonly blockLocation: Vector3;
|
|
520
512
|
/**
|
|
521
513
|
* If set to true, this will cancel the item use behavior.
|
|
522
514
|
*/
|
|
@@ -539,6 +531,7 @@ export class BeforeItemUseOnEvent {
|
|
|
539
531
|
* Returns the source entity that triggered this item event.
|
|
540
532
|
*/
|
|
541
533
|
readonly source: Entity;
|
|
534
|
+
getBlockLocation(): Vector3;
|
|
542
535
|
}
|
|
543
536
|
/**
|
|
544
537
|
* @beta
|
|
@@ -987,10 +980,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
987
980
|
* @throws This property can throw when used.
|
|
988
981
|
*/
|
|
989
982
|
readonly container: BlockInventoryComponentContainer;
|
|
990
|
-
/**
|
|
991
|
-
* Coordinates of the specified block.
|
|
992
|
-
*/
|
|
993
|
-
readonly location: Vector3;
|
|
994
983
|
/**
|
|
995
984
|
* Identifier of this component. Should always be
|
|
996
985
|
* minecraft:inventory.
|
|
@@ -1128,10 +1117,6 @@ export class BlockLavaContainerComponent extends BlockComponent {
|
|
|
1128
1117
|
* FluidContainer.maxFillLevel (6).
|
|
1129
1118
|
*/
|
|
1130
1119
|
fillLevel: number;
|
|
1131
|
-
/**
|
|
1132
|
-
* Source location of the block.
|
|
1133
|
-
*/
|
|
1134
|
-
readonly location: Vector3;
|
|
1135
1120
|
/**
|
|
1136
1121
|
* Identifier of this component. Should always be
|
|
1137
1122
|
* minecraft:lavaContainer.
|
|
@@ -1214,12 +1199,6 @@ export class BlockPermutation {
|
|
|
1214
1199
|
*/
|
|
1215
1200
|
export class BlockPistonComponent extends BlockComponent {
|
|
1216
1201
|
protected constructor();
|
|
1217
|
-
/**
|
|
1218
|
-
* A set of locations for blocks that are impacted by the
|
|
1219
|
-
* activation of this piston.
|
|
1220
|
-
* @throws This property can throw when used.
|
|
1221
|
-
*/
|
|
1222
|
-
readonly attachedBlocks: Vector3[];
|
|
1223
1202
|
/**
|
|
1224
1203
|
* Whether the piston is fully expanded.
|
|
1225
1204
|
* @throws This property can throw when used.
|
|
@@ -1246,10 +1225,6 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
1246
1225
|
* @throws This property can throw when used.
|
|
1247
1226
|
*/
|
|
1248
1227
|
readonly isRetracting: boolean;
|
|
1249
|
-
/**
|
|
1250
|
-
* Source location of the block.
|
|
1251
|
-
*/
|
|
1252
|
-
readonly location: Vector3;
|
|
1253
1228
|
/**
|
|
1254
1229
|
* Identifier of this component.
|
|
1255
1230
|
*/
|
|
@@ -1258,6 +1233,7 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
1258
1233
|
* Identifier of this component.
|
|
1259
1234
|
*/
|
|
1260
1235
|
static readonly componentId = 'minecraft:piston';
|
|
1236
|
+
getAttachedBlocks(): Vector3[];
|
|
1261
1237
|
}
|
|
1262
1238
|
/**
|
|
1263
1239
|
* @beta
|
|
@@ -1316,10 +1292,6 @@ export class BlockPotionContainerComponent extends BlockComponent {
|
|
|
1316
1292
|
* FluidContainer.maxFillLevel (6).
|
|
1317
1293
|
*/
|
|
1318
1294
|
fillLevel: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* Source location of the block.
|
|
1321
|
-
*/
|
|
1322
|
-
readonly location: Vector3;
|
|
1323
1295
|
/**
|
|
1324
1296
|
* Identifier of this component. Should always be
|
|
1325
1297
|
* minecraft:potionContainer.
|
|
@@ -1951,10 +1923,6 @@ export class BlockProperties {
|
|
|
1951
1923
|
*/
|
|
1952
1924
|
export class BlockRecordPlayerComponent extends BlockComponent {
|
|
1953
1925
|
protected constructor();
|
|
1954
|
-
/**
|
|
1955
|
-
* Location of this record-playing block.
|
|
1956
|
-
*/
|
|
1957
|
-
readonly location: Vector3;
|
|
1958
1926
|
/**
|
|
1959
1927
|
* Identifier of this component. Should always be
|
|
1960
1928
|
* minecraft:recordPlayer.
|
|
@@ -1993,10 +1961,6 @@ export class BlockRecordPlayerComponent extends BlockComponent {
|
|
|
1993
1961
|
*/
|
|
1994
1962
|
export class BlockSignComponent extends BlockComponent {
|
|
1995
1963
|
protected constructor();
|
|
1996
|
-
/**
|
|
1997
|
-
* Location of the sign.
|
|
1998
|
-
*/
|
|
1999
|
-
readonly location: Vector3;
|
|
2000
1964
|
/**
|
|
2001
1965
|
* Text of the sign
|
|
2002
1966
|
* @throws This property can throw when used.
|
|
@@ -2026,10 +1990,6 @@ export class BlockSnowContainerComponent extends BlockComponent {
|
|
|
2026
1990
|
* FluidContainer.maxFillLevel (6).
|
|
2027
1991
|
*/
|
|
2028
1992
|
fillLevel: number;
|
|
2029
|
-
/**
|
|
2030
|
-
* Source location of the block.
|
|
2031
|
-
*/
|
|
2032
|
-
readonly location: Vector3;
|
|
2033
1993
|
/**
|
|
2034
1994
|
* Identifier of this component. Should always be
|
|
2035
1995
|
* minecraft:snowContainer.
|
|
@@ -2081,10 +2041,6 @@ export class BlockWaterContainerComponent extends BlockComponent {
|
|
|
2081
2041
|
* FluidContainer.maxFillLevel (6).
|
|
2082
2042
|
*/
|
|
2083
2043
|
fillLevel: number;
|
|
2084
|
-
/**
|
|
2085
|
-
* Source location of the block.
|
|
2086
|
-
*/
|
|
2087
|
-
readonly location: Vector3;
|
|
2088
2044
|
/**
|
|
2089
2045
|
* Identifier of this component. Should always be
|
|
2090
2046
|
* minecraft:waterContainer.
|
|
@@ -2389,13 +2345,6 @@ export class ContainerSlot {
|
|
|
2389
2345
|
* @throws This property can throw when used.
|
|
2390
2346
|
*/
|
|
2391
2347
|
readonly typeId?: string;
|
|
2392
|
-
/**
|
|
2393
|
-
* @remarks
|
|
2394
|
-
* Empties the item stored at the specified slot.
|
|
2395
|
-
* @throws This function can throw errors.
|
|
2396
|
-
*/
|
|
2397
|
-
clearItem(): void;
|
|
2398
|
-
clearLore(): void;
|
|
2399
2348
|
/**
|
|
2400
2349
|
* @remarks
|
|
2401
2350
|
* Returns the item stored within the container.
|
|
@@ -3024,12 +2973,6 @@ export class Entity {
|
|
|
3024
2973
|
* @throws This property can throw when used.
|
|
3025
2974
|
*/
|
|
3026
2975
|
readonly dimension: Dimension;
|
|
3027
|
-
/**
|
|
3028
|
-
* @beta
|
|
3029
|
-
* Location of the center of the head component of the entity.
|
|
3030
|
-
* @throws This property can throw when used.
|
|
3031
|
-
*/
|
|
3032
|
-
readonly headLocation: Vector3;
|
|
3033
2976
|
/**
|
|
3034
2977
|
* Unique identifier of the entity. This identifier is intended
|
|
3035
2978
|
* to be consistent across loads of a world instance. No
|
|
@@ -3130,6 +3073,9 @@ export class Entity {
|
|
|
3130
3073
|
*/
|
|
3131
3074
|
addTag(tag: string): boolean;
|
|
3132
3075
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
3076
|
+
applyImpulse(vector: Vector3): void;
|
|
3077
|
+
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
3078
|
+
clearVelocity(): void;
|
|
3133
3079
|
extinguishFire(useEffects?: boolean): boolean;
|
|
3134
3080
|
/**
|
|
3135
3081
|
* @beta
|
|
@@ -3192,6 +3138,7 @@ export class Entity {
|
|
|
3192
3138
|
* @throws This function can throw errors.
|
|
3193
3139
|
*/
|
|
3194
3140
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
|
|
3141
|
+
getHeadLocation(): Vector3;
|
|
3195
3142
|
getRotation(): XYRotation;
|
|
3196
3143
|
/**
|
|
3197
3144
|
* @beta
|
|
@@ -3229,6 +3176,7 @@ export class Entity {
|
|
|
3229
3176
|
* @throws This function can throw errors.
|
|
3230
3177
|
*/
|
|
3231
3178
|
kill(): void;
|
|
3179
|
+
playAnimation(animationName: string, options?: PlayAnimationOptions): void;
|
|
3232
3180
|
/**
|
|
3233
3181
|
* @beta
|
|
3234
3182
|
* @remarks
|
|
@@ -3280,15 +3228,6 @@ export class Entity {
|
|
|
3280
3228
|
* @throws This function can throw errors.
|
|
3281
3229
|
*/
|
|
3282
3230
|
setRotation(degreesX: number, degreesY: number): void;
|
|
3283
|
-
/**
|
|
3284
|
-
* @beta
|
|
3285
|
-
* @remarks
|
|
3286
|
-
* Sets a velocity for the entity to move with.
|
|
3287
|
-
* @param velocity
|
|
3288
|
-
* X/Y/Z components of the velocity.
|
|
3289
|
-
* @throws This function can throw errors.
|
|
3290
|
-
*/
|
|
3291
|
-
setVelocity(velocity: Vector3): void;
|
|
3292
3231
|
/**
|
|
3293
3232
|
* @beta
|
|
3294
3233
|
* @remarks
|
|
@@ -5977,14 +5916,11 @@ export class ExplosionEvent {
|
|
|
5977
5916
|
* Dimension where the explosion has occurred.
|
|
5978
5917
|
*/
|
|
5979
5918
|
readonly dimension: Dimension;
|
|
5980
|
-
/**
|
|
5981
|
-
* A collection of blocks impacted by this explosion event.
|
|
5982
|
-
*/
|
|
5983
|
-
readonly impactedBlocks: Vector3[];
|
|
5984
5919
|
/**
|
|
5985
5920
|
* Optional source of the explosion.
|
|
5986
5921
|
*/
|
|
5987
5922
|
readonly source: Entity;
|
|
5923
|
+
getImpactedBlocks(): Vector3[];
|
|
5988
5924
|
}
|
|
5989
5925
|
/**
|
|
5990
5926
|
* @beta
|
|
@@ -6535,10 +6471,6 @@ export class ItemStack {
|
|
|
6535
6471
|
* 0 and 64.
|
|
6536
6472
|
*/
|
|
6537
6473
|
amount: number;
|
|
6538
|
-
/**
|
|
6539
|
-
* A data value used to configure alternate states of the item.
|
|
6540
|
-
*/
|
|
6541
|
-
data: number;
|
|
6542
6474
|
/**
|
|
6543
6475
|
* Given name of this stack of items.
|
|
6544
6476
|
*/
|
|
@@ -6560,12 +6492,9 @@ export class ItemStack {
|
|
|
6560
6492
|
* @param amount
|
|
6561
6493
|
* Number of items to place in the stack, between 1 and 64.
|
|
6562
6494
|
* Note that certain items can only have one item in the stack.
|
|
6563
|
-
* @
|
|
6564
|
-
* Optional data value used for creating the item, or 0 if no
|
|
6565
|
-
* data value is specified.
|
|
6495
|
+
* @throws This function can throw errors.
|
|
6566
6496
|
*/
|
|
6567
|
-
constructor(itemType: ItemType
|
|
6568
|
-
clearLore(): void;
|
|
6497
|
+
constructor(itemType: ItemType | string, amount?: number);
|
|
6569
6498
|
/**
|
|
6570
6499
|
* @remarks
|
|
6571
6500
|
* Gets a component (that represents additional capabilities)
|
|
@@ -6672,15 +6601,6 @@ export class ItemStartUseOnEvent {
|
|
|
6672
6601
|
* The face of the block that an item is being used on.
|
|
6673
6602
|
*/
|
|
6674
6603
|
readonly blockFace: Direction;
|
|
6675
|
-
/**
|
|
6676
|
-
* Location of the block being impacted.
|
|
6677
|
-
*/
|
|
6678
|
-
readonly blockLocation: Vector3;
|
|
6679
|
-
/**
|
|
6680
|
-
* Location of the resulting build block position. Useful for
|
|
6681
|
-
* determining where a block was placed.
|
|
6682
|
-
*/
|
|
6683
|
-
readonly buildBlockLocation: Vector3;
|
|
6684
6604
|
/**
|
|
6685
6605
|
* The impacted item stack that is starting to be used.
|
|
6686
6606
|
*/
|
|
@@ -6689,6 +6609,8 @@ export class ItemStartUseOnEvent {
|
|
|
6689
6609
|
* Returns the source entity that triggered this item event.
|
|
6690
6610
|
*/
|
|
6691
6611
|
readonly source: Entity;
|
|
6612
|
+
getBlockLocation(): Vector3;
|
|
6613
|
+
getBuildBlockLocation(): Vector3;
|
|
6692
6614
|
}
|
|
6693
6615
|
/**
|
|
6694
6616
|
* @beta
|
|
@@ -6766,10 +6688,6 @@ export class ItemStopChargeEventSignal {
|
|
|
6766
6688
|
*/
|
|
6767
6689
|
export class ItemStopUseOnEvent {
|
|
6768
6690
|
protected constructor();
|
|
6769
|
-
/**
|
|
6770
|
-
* Location of the block being impacted.
|
|
6771
|
-
*/
|
|
6772
|
-
readonly blockLocation: Vector3;
|
|
6773
6691
|
/**
|
|
6774
6692
|
* The impacted item stack that is being used on a block.
|
|
6775
6693
|
*/
|
|
@@ -6778,6 +6696,7 @@ export class ItemStopUseOnEvent {
|
|
|
6778
6696
|
* Returns the source entity that triggered this item event.
|
|
6779
6697
|
*/
|
|
6780
6698
|
readonly source: Entity;
|
|
6699
|
+
getBlockLocation(): Vector3;
|
|
6781
6700
|
}
|
|
6782
6701
|
/**
|
|
6783
6702
|
* @beta
|
|
@@ -6889,10 +6808,6 @@ export class ItemUseOnEvent {
|
|
|
6889
6808
|
* The face of the block that an item is being used on.
|
|
6890
6809
|
*/
|
|
6891
6810
|
readonly blockFace: Direction;
|
|
6892
|
-
/**
|
|
6893
|
-
* Location of the block being impacted.
|
|
6894
|
-
*/
|
|
6895
|
-
readonly blockLocation: Vector3;
|
|
6896
6811
|
/**
|
|
6897
6812
|
* X coordinate of the item-use impact location on the face of
|
|
6898
6813
|
* the target block.
|
|
@@ -6911,6 +6826,7 @@ export class ItemUseOnEvent {
|
|
|
6911
6826
|
* Returns the source entity that triggered this item event.
|
|
6912
6827
|
*/
|
|
6913
6828
|
readonly source: Entity;
|
|
6829
|
+
getBlockLocation(): Vector3;
|
|
6914
6830
|
}
|
|
6915
6831
|
/**
|
|
6916
6832
|
* @beta
|
|
@@ -13038,10 +12954,7 @@ export class NavigationResult {
|
|
|
13038
12954
|
* including to the requested destination.
|
|
13039
12955
|
*/
|
|
13040
12956
|
readonly isFullPath: boolean;
|
|
13041
|
-
|
|
13042
|
-
* A set of block locations that comprise the navigation route.
|
|
13043
|
-
*/
|
|
13044
|
-
readonly path: Vector3[];
|
|
12957
|
+
getPath(): Vector3[];
|
|
13045
12958
|
}
|
|
13046
12959
|
/**
|
|
13047
12960
|
* @beta
|
|
@@ -13121,12 +13034,6 @@ export class Player extends Entity {
|
|
|
13121
13034
|
* @throws This property can throw when used.
|
|
13122
13035
|
*/
|
|
13123
13036
|
readonly dimension: Dimension;
|
|
13124
|
-
/**
|
|
13125
|
-
* @beta
|
|
13126
|
-
* Location of the center of the head component of the player.
|
|
13127
|
-
* @throws This property can throw when used.
|
|
13128
|
-
*/
|
|
13129
|
-
readonly headLocation: Vector3;
|
|
13130
13037
|
/**
|
|
13131
13038
|
* Unique identifier of the player. This identifier is intended
|
|
13132
13039
|
* to be consistent across loads of a world instance. No
|
|
@@ -13218,7 +13125,10 @@ export class Player extends Entity {
|
|
|
13218
13125
|
*/
|
|
13219
13126
|
addTag(tag: string): boolean;
|
|
13220
13127
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
13128
|
+
applyImpulse(vector: Vector3): void;
|
|
13129
|
+
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
13221
13130
|
clearSpawn(): void;
|
|
13131
|
+
clearVelocity(): void;
|
|
13222
13132
|
extinguishFire(useEffects?: boolean): boolean;
|
|
13223
13133
|
/**
|
|
13224
13134
|
* @beta
|
|
@@ -13281,6 +13191,7 @@ export class Player extends Entity {
|
|
|
13281
13191
|
* @throws This function can throw errors.
|
|
13282
13192
|
*/
|
|
13283
13193
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
|
|
13194
|
+
getHeadLocation(): Vector3;
|
|
13284
13195
|
/**
|
|
13285
13196
|
* @beta
|
|
13286
13197
|
* @remarks
|
|
@@ -13338,6 +13249,7 @@ export class Player extends Entity {
|
|
|
13338
13249
|
* @throws This function can throw errors.
|
|
13339
13250
|
*/
|
|
13340
13251
|
kill(): void;
|
|
13252
|
+
playAnimation(animationName: string, options?: PlayAnimationOptions): void;
|
|
13341
13253
|
/**
|
|
13342
13254
|
* @beta
|
|
13343
13255
|
* @remarks
|
|
@@ -13422,15 +13334,6 @@ export class Player extends Entity {
|
|
|
13422
13334
|
*/
|
|
13423
13335
|
setRotation(degreesX: number, degreesY: number): void;
|
|
13424
13336
|
setSpawn(spawnPosition: Vector3, spawnDimension: Dimension): void;
|
|
13425
|
-
/**
|
|
13426
|
-
* @beta
|
|
13427
|
-
* @remarks
|
|
13428
|
-
* Sets a velocity for the entity to move with.
|
|
13429
|
-
* @param velocity
|
|
13430
|
-
* X/Y/Z components of the velocity.
|
|
13431
|
-
* @throws This function can throw errors.
|
|
13432
|
-
*/
|
|
13433
|
-
setVelocity(velocity: Vector3): void;
|
|
13434
13337
|
/**
|
|
13435
13338
|
* @beta
|
|
13436
13339
|
* @remarks
|
|
@@ -14975,6 +14878,12 @@ export interface NumberRange {
|
|
|
14975
14878
|
*/
|
|
14976
14879
|
min: number;
|
|
14977
14880
|
}
|
|
14881
|
+
export interface PlayAnimationOptions {
|
|
14882
|
+
blendOutTime?: number;
|
|
14883
|
+
controller?: string;
|
|
14884
|
+
nextState?: string;
|
|
14885
|
+
stopExpression?: string;
|
|
14886
|
+
}
|
|
14978
14887
|
export interface RawMessage {
|
|
14979
14888
|
rawtext?: (RawMessage | string)[];
|
|
14980
14889
|
score?: RawMessageScore;
|