@minecraft/server 1.6.0-beta.1.20.30-preview.22 → 1.6.0-beta.1.20.30-preview.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +481 -114
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -6,4 +6,4 @@ Contains many types related to manipulating a Minecraft world, including entitie
6
6
 
7
7
  See full documentation for this module here:
8
8
 
9
- https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/@minecraft/server/@minecraft/server
9
+ https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/minecraft-server
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "1.6.0-internal.1.20.30-preview.22"
19
+ * "version": "1.6.0-internal.1.20.30-preview.24"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -258,6 +258,45 @@ export enum EntityDamageCause {
258
258
  wither = 'wither',
259
259
  }
260
260
 
261
+ /**
262
+ * @beta
263
+ * An enumeration describing initialization cause of an entity.
264
+ */
265
+ export enum EntityInitializationCause {
266
+ /**
267
+ * @beta
268
+ * @remarks
269
+ * Case when an entity is created as child of other entity or
270
+ * entities, e.g., cows making a cow or slimes making smaller
271
+ * slimes after dying.
272
+ *
273
+ */
274
+ Born = 'Born',
275
+ /**
276
+ * @beta
277
+ * @remarks
278
+ * Case when an entity is created by an event, e.g., Wandering
279
+ * trader spawning llamas.
280
+ *
281
+ */
282
+ Event = 'Event',
283
+ Loaded = 'Loaded',
284
+ /**
285
+ * @beta
286
+ * @remarks
287
+ * Case when an entity is naturally spawned in the world.
288
+ *
289
+ */
290
+ Spawned = 'Spawned',
291
+ /**
292
+ * @beta
293
+ * @remarks
294
+ * Case when an entity is transformed into another entity.
295
+ *
296
+ */
297
+ Transformed = 'Transformed',
298
+ }
299
+
261
300
  /**
262
301
  * @beta
263
302
  * Describes the lifetime state of an Entity. For example,
@@ -927,57 +966,6 @@ export class BlockAreaSize {
927
966
  equals(other: BlockAreaSize): boolean;
928
967
  }
929
968
 
930
- /**
931
- * @beta
932
- * Contains information regarding an event where a player
933
- * breaks a block.
934
- */
935
- // @ts-ignore Class inheritance allowed for native defined classes
936
- export class BlockBreakAfterEvent extends BlockEvent {
937
- private constructor();
938
- /**
939
- * @remarks
940
- * Returns permutation information about this block before it
941
- * was broken.
942
- *
943
- */
944
- readonly brokenBlockPermutation: BlockPermutation;
945
- /**
946
- * @remarks
947
- * Player that broke the block for this event.
948
- *
949
- */
950
- readonly player: Player;
951
- }
952
-
953
- /**
954
- * @beta
955
- * Manages callbacks that are connected to when a block is
956
- * broken.
957
- */
958
- export class BlockBreakAfterEventSignal {
959
- private constructor();
960
- /**
961
- * @remarks
962
- * Adds a callback that will be called when a block is broken
963
- * by a player.
964
- *
965
- * This function can't be called in read-only mode.
966
- *
967
- */
968
- subscribe(callback: (arg: BlockBreakAfterEvent) => void): (arg: BlockBreakAfterEvent) => void;
969
- /**
970
- * @remarks
971
- * Removes a callback from being called when an block is
972
- * broken.
973
- *
974
- * This function can't be called in read-only mode.
975
- *
976
- * @throws This function can throw errors.
977
- */
978
- unsubscribe(callback: (arg: BlockBreakAfterEvent) => void): void;
979
- }
980
-
981
969
  /**
982
970
  * @beta
983
971
  * Base type for components associated with blocks.
@@ -1379,50 +1367,6 @@ export class BlockPistonComponent extends BlockComponent {
1379
1367
  getAttachedBlocks(): Vector3[];
1380
1368
  }
1381
1369
 
1382
- /**
1383
- * @beta
1384
- * Contains information regarding an event where a player
1385
- * places a block.
1386
- */
1387
- // @ts-ignore Class inheritance allowed for native defined classes
1388
- export class BlockPlaceAfterEvent extends BlockEvent {
1389
- private constructor();
1390
- /**
1391
- * @remarks
1392
- * Player that placed the block for this event.
1393
- *
1394
- */
1395
- readonly player: Player;
1396
- }
1397
-
1398
- /**
1399
- * @beta
1400
- * Manages callbacks that are connected to when a block is
1401
- * placed.
1402
- */
1403
- export class BlockPlaceAfterEventSignal {
1404
- private constructor();
1405
- /**
1406
- * @remarks
1407
- * Adds a callback that will be called when a block is placed
1408
- * by a player.
1409
- *
1410
- * This function can't be called in read-only mode.
1411
- *
1412
- */
1413
- subscribe(callback: (arg: BlockPlaceAfterEvent) => void): (arg: BlockPlaceAfterEvent) => void;
1414
- /**
1415
- * @remarks
1416
- * Removes a callback from being called when an block is
1417
- * placed.
1418
- *
1419
- * This function can't be called in read-only mode.
1420
- *
1421
- * @throws This function can throw errors.
1422
- */
1423
- unsubscribe(callback: (arg: BlockPlaceAfterEvent) => void): void;
1424
- }
1425
-
1426
1370
  /**
1427
1371
  * @beta
1428
1372
  * Represents a fluid container block that currently contains a
@@ -1624,6 +1568,9 @@ export class BlockStates {
1624
1568
  * @remarks
1625
1569
  * Retrieves a specific block state instance.
1626
1570
  *
1571
+ * @returns
1572
+ * Returns the block state instance if it is found. If the
1573
+ * block state instance is not found returns undefined.
1627
1574
  */
1628
1575
  static get(stateName: string): BlockStateType;
1629
1576
  /**
@@ -4061,7 +4008,6 @@ export class Entity {
4061
4008
  * Returns a scoreboard identity that represents this entity.
4062
4009
  * Will remain valid when the entity is killed.
4063
4010
  *
4064
- * @throws This property can throw when used.
4065
4011
  */
4066
4012
  readonly scoreboardIdentity?: ScoreboardIdentity;
4067
4013
  /**
@@ -4438,7 +4384,20 @@ export class Entity {
4438
4384
  getHeadLocation(): Vector3;
4439
4385
  /**
4440
4386
  * @beta
4441
- * @throws This function can throw errors.
4387
+ * @remarks
4388
+ * Gets an entity Property value. If the property was set using
4389
+ * the setProperty function within the same tick, the updated
4390
+ * value will not be reflected until the subsequent tick.
4391
+ *
4392
+ * @param identifier
4393
+ * The entity Property identifier.
4394
+ * @returns
4395
+ * Returns the current property value. For enum properties, a
4396
+ * string is returned. For float and int properties, a number
4397
+ * is returned. For undefined properties, undefined is
4398
+ * returned.
4399
+ * @throws
4400
+ * Throws if the entity is invalid.
4442
4401
  */
4443
4402
  getProperty(identifier: string): boolean | number | string | undefined;
4444
4403
  /**
@@ -4580,6 +4539,10 @@ export class Entity {
4580
4539
  /**
4581
4540
  * @beta
4582
4541
  * @remarks
4542
+ * Immediately removes the entity from the world. The removed
4543
+ * entity will not perform a death animation or drop loot upon
4544
+ * removal.
4545
+ *
4583
4546
  * This function can't be called in read-only mode.
4584
4547
  *
4585
4548
  * @throws This function can throw errors.
@@ -4630,9 +4593,21 @@ export class Entity {
4630
4593
  /**
4631
4594
  * @beta
4632
4595
  * @remarks
4596
+ * Resets an Entity Property back to its default value, as
4597
+ * specified in the Entity's definition. This property change
4598
+ * is not applied until the next tick.
4599
+ *
4633
4600
  * This function can't be called in read-only mode.
4634
4601
  *
4635
- * @throws This function can throw errors.
4602
+ * @param identifier
4603
+ * The Entity Property identifier.
4604
+ * @returns
4605
+ * Returns the default property value. For enum properties, a
4606
+ * string is returned. For float and int properties, a number
4607
+ * is returned. For undefined properties, undefined is
4608
+ * returned.
4609
+ * @throws
4610
+ * Throws if the entity is invalid.
4636
4611
  */
4637
4612
  resetProperty(identifier: string): boolean | number | string;
4638
4613
  /**
@@ -4730,9 +4705,25 @@ export class Entity {
4730
4705
  /**
4731
4706
  * @beta
4732
4707
  * @remarks
4708
+ * Sets an Entity Property to the provided value. This property
4709
+ * change is not applied until the next tick.
4710
+ *
4733
4711
  * This function can't be called in read-only mode.
4734
4712
  *
4735
- * @throws This function can throw errors.
4713
+ * @param identifier
4714
+ * The Entity Property identifier.
4715
+ * @param value
4716
+ * The property value. The provided type must be compatible
4717
+ * with the type specified in the entity's definition.
4718
+ * @throws
4719
+ * Throws if the entity is invalid.
4720
+ * Throws if an invalid identifier is provided.
4721
+ * Throws if the provided value type does not match the
4722
+ * property type.
4723
+ * Throws if the provided value is outside the expected range
4724
+ * (int, float properties).
4725
+ * Throws if the provided string value does not match the set
4726
+ * of accepted enum values (enum properties
4736
4727
  */
4737
4728
  setProperty(identifier: string, value: boolean | number | string): void;
4738
4729
  /**
@@ -5242,6 +5233,8 @@ export class EntityDieAfterEventSignal {
5242
5233
 
5243
5234
  /**
5244
5235
  * @beta
5236
+ * Provides access to a mob's equipment slots. This component
5237
+ * exists for all mob entities.
5245
5238
  */
5246
5239
  // @ts-ignore Class inheritance allowed for native defined classes
5247
5240
  export class EntityEquippableComponent extends EntityComponent {
@@ -5249,23 +5242,44 @@ export class EntityEquippableComponent extends EntityComponent {
5249
5242
  static readonly componentId = 'minecraft:equippable';
5250
5243
  /**
5251
5244
  * @remarks
5245
+ * Gets the equipped item for the given EquipmentSlot.
5246
+ *
5252
5247
  * This function can't be called in read-only mode.
5253
5248
  *
5249
+ * @param equipmentSlot
5250
+ * The equipment slot. e.g. "head", "chest", "offhand"
5251
+ * @returns
5252
+ * Returns the item equipped to the given EquipmentSlot. If
5253
+ * empty, returns undefined.
5254
5254
  * @throws This function can throw errors.
5255
5255
  */
5256
5256
  getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
5257
5257
  /**
5258
5258
  * @beta
5259
5259
  * @remarks
5260
+ * Gets the ContainerSlot corresponding to the given
5261
+ * EquipmentSlot.
5262
+ *
5260
5263
  * This function can't be called in read-only mode.
5261
5264
  *
5265
+ * @param equipmentSlot
5266
+ * The equipment slot. e.g. "head", "chest", "offhand".
5267
+ * @returns
5268
+ * Returns the ContainerSlot corresponding to the given
5269
+ * EquipmentSlot.
5262
5270
  * @throws This function can throw errors.
5263
5271
  */
5264
5272
  getEquipmentSlot(equipmentSlot: EquipmentSlot): ContainerSlot;
5265
5273
  /**
5266
5274
  * @remarks
5275
+ * Replaces the item in the given EquipmentSlot.
5276
+ *
5267
5277
  * This function can't be called in read-only mode.
5268
5278
  *
5279
+ * @param equipmentSlot
5280
+ * The equipment slot. e.g. "head", "chest", "offhand".
5281
+ * @param itemStack
5282
+ * The item to equip. If undefined, clears the slot.
5269
5283
  * @throws This function can throw errors.
5270
5284
  */
5271
5285
  setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): boolean;
@@ -5920,6 +5934,57 @@ export class EntityLeashableComponent extends EntityComponent {
5920
5934
  unleash(): void;
5921
5935
  }
5922
5936
 
5937
+ /**
5938
+ * @beta
5939
+ * Contains data related to an entity loaded within the world.
5940
+ * This could happen when an unloaded chunk is reloaded, or
5941
+ * when an entity changes dimensions.
5942
+ */
5943
+ export class EntityLoadAfterEvent {
5944
+ private constructor();
5945
+ /**
5946
+ * @remarks
5947
+ * Entity that was loaded.
5948
+ *
5949
+ * This property can't be edited in read-only mode.
5950
+ *
5951
+ */
5952
+ entity: Entity;
5953
+ }
5954
+
5955
+ /**
5956
+ * @beta
5957
+ * Registers a script-based event handler for handling what
5958
+ * happens when an entity loads.
5959
+ */
5960
+ export class EntityLoadAfterEventSignal {
5961
+ private constructor();
5962
+ /**
5963
+ * @remarks
5964
+ * Method to register an event handler for what happens when an
5965
+ * entity loads.
5966
+ *
5967
+ * This function can't be called in read-only mode.
5968
+ *
5969
+ * @param callback
5970
+ * Function that handles the load event.
5971
+ */
5972
+ subscribe(callback: (arg: EntityLoadAfterEvent) => void): (arg: EntityLoadAfterEvent) => void;
5973
+ /**
5974
+ * @remarks
5975
+ * Unregisters a method that was previously subscribed to the
5976
+ * subscription event.
5977
+ *
5978
+ * This function can't be called in read-only mode.
5979
+ *
5980
+ * @param callback
5981
+ * Original function that was passed into the subscribe event,
5982
+ * that is to be unregistered.
5983
+ * @throws This function can throw errors.
5984
+ */
5985
+ unsubscribe(callback: (arg: EntityLoadAfterEvent) => void): void;
5986
+ }
5987
+
5923
5988
  /**
5924
5989
  * @beta
5925
5990
  * Additional variant value. Can be used to further
@@ -6644,6 +6709,12 @@ export class EntitySkinIdComponent extends EntityComponent {
6644
6709
  */
6645
6710
  export class EntitySpawnAfterEvent {
6646
6711
  private constructor();
6712
+ /**
6713
+ * @remarks
6714
+ * Initialization cause (Spawned, Born ...).
6715
+ *
6716
+ */
6717
+ readonly cause: EntityInitializationCause;
6647
6718
  /**
6648
6719
  * @remarks
6649
6720
  * Entity that was spawned.
@@ -8746,6 +8817,9 @@ export class Player extends Entity {
8746
8817
  private constructor();
8747
8818
  /**
8748
8819
  * @beta
8820
+ * @remarks
8821
+ * The player's Camera.
8822
+ *
8749
8823
  * @throws This property can throw when used.
8750
8824
  */
8751
8825
  readonly camera: Camera;
@@ -9051,6 +9125,134 @@ export class Player extends Entity {
9051
9125
  startItemCooldown(itemCategory: string, tickDuration: number): void;
9052
9126
  }
9053
9127
 
9128
+ /**
9129
+ * @beta
9130
+ * Contains information regarding an event after a player
9131
+ * breaks a block.
9132
+ */
9133
+ // @ts-ignore Class inheritance allowed for native defined classes
9134
+ export class PlayerBreakBlockAfterEvent extends BlockEvent {
9135
+ private constructor();
9136
+ /**
9137
+ * @remarks
9138
+ * Returns permutation information about this block before it
9139
+ * was broken.
9140
+ *
9141
+ */
9142
+ readonly brokenBlockPermutation: BlockPermutation;
9143
+ /**
9144
+ * @remarks
9145
+ * The item stack that was used to break the block after the
9146
+ * block was broken, or undefined if empty hand.
9147
+ *
9148
+ */
9149
+ readonly itemStackAfterBreak?: ItemStack;
9150
+ /**
9151
+ * @remarks
9152
+ * The item stack that was used to break the block before the
9153
+ * block was broken, or undefined if empty hand.
9154
+ *
9155
+ */
9156
+ readonly itemStackBeforeBreak?: ItemStack;
9157
+ /**
9158
+ * @remarks
9159
+ * Player that broke the block for this event.
9160
+ *
9161
+ */
9162
+ readonly player: Player;
9163
+ }
9164
+
9165
+ /**
9166
+ * @beta
9167
+ * Manages callbacks that are connected to when a player breaks
9168
+ * a block.
9169
+ */
9170
+ export class PlayerBreakBlockAfterEventSignal {
9171
+ private constructor();
9172
+ /**
9173
+ * @remarks
9174
+ * Adds a callback that will be called when a block is broken
9175
+ * by a player.
9176
+ *
9177
+ * This function can't be called in read-only mode.
9178
+ *
9179
+ */
9180
+ subscribe(
9181
+ callback: (arg: PlayerBreakBlockAfterEvent) => void,
9182
+ options?: BlockEventOptions,
9183
+ ): (arg: PlayerBreakBlockAfterEvent) => void;
9184
+ /**
9185
+ * @remarks
9186
+ * Removes a callback from being called when a player breaks a
9187
+ * block.
9188
+ *
9189
+ * This function can't be called in read-only mode.
9190
+ *
9191
+ * @throws This function can throw errors.
9192
+ */
9193
+ unsubscribe(callback: (arg: PlayerBreakBlockAfterEvent) => void): void;
9194
+ }
9195
+
9196
+ /**
9197
+ * @beta
9198
+ * Contains information regarding an event before a player
9199
+ * breaks a block.
9200
+ */
9201
+ // @ts-ignore Class inheritance allowed for native defined classes
9202
+ export class PlayerBreakBlockBeforeEvent extends BlockEvent {
9203
+ private constructor();
9204
+ /**
9205
+ * @remarks
9206
+ * If set to true, cancels the block break event.
9207
+ *
9208
+ */
9209
+ cancel: boolean;
9210
+ /**
9211
+ * @remarks
9212
+ * The item stack that is being used to break the block, or
9213
+ * undefined if empty hand.
9214
+ *
9215
+ */
9216
+ itemStack?: ItemStack;
9217
+ /**
9218
+ * @remarks
9219
+ * Player breaking the block for this event.
9220
+ *
9221
+ */
9222
+ readonly player: Player;
9223
+ }
9224
+
9225
+ /**
9226
+ * @beta
9227
+ * Manages callbacks that are connected to before a player
9228
+ * breaks a block.
9229
+ */
9230
+ export class PlayerBreakBlockBeforeEventSignal {
9231
+ private constructor();
9232
+ /**
9233
+ * @remarks
9234
+ * Adds a callback that will be called before a block is broken
9235
+ * by a player.
9236
+ *
9237
+ * This function can't be called in read-only mode.
9238
+ *
9239
+ */
9240
+ subscribe(
9241
+ callback: (arg: PlayerBreakBlockBeforeEvent) => void,
9242
+ options?: BlockEventOptions,
9243
+ ): (arg: PlayerBreakBlockBeforeEvent) => void;
9244
+ /**
9245
+ * @remarks
9246
+ * Removes a callback from being called before a player breaks
9247
+ * a block.
9248
+ *
9249
+ * This function can't be called in read-only mode.
9250
+ *
9251
+ * @throws This function can throw errors.
9252
+ */
9253
+ unsubscribe(callback: (arg: PlayerBreakBlockBeforeEvent) => void): void;
9254
+ }
9255
+
9054
9256
  /**
9055
9257
  * @beta
9056
9258
  * This type is usable for iterating over a set of players.
@@ -9142,6 +9344,125 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
9142
9344
  private constructor();
9143
9345
  }
9144
9346
 
9347
+ /**
9348
+ * @beta
9349
+ * Contains information regarding an event where a player
9350
+ * places a block.
9351
+ */
9352
+ // @ts-ignore Class inheritance allowed for native defined classes
9353
+ export class PlayerPlaceBlockAfterEvent extends BlockEvent {
9354
+ private constructor();
9355
+ /**
9356
+ * @remarks
9357
+ * Player that placed the block for this event.
9358
+ *
9359
+ */
9360
+ readonly player: Player;
9361
+ }
9362
+
9363
+ /**
9364
+ * @beta
9365
+ * Manages callbacks that are connected to when a block is
9366
+ * placed by a player.
9367
+ */
9368
+ export class PlayerPlaceBlockAfterEventSignal {
9369
+ private constructor();
9370
+ /**
9371
+ * @remarks
9372
+ * Adds a callback that will be called when a block is placed
9373
+ * by a player.
9374
+ *
9375
+ * This function can't be called in read-only mode.
9376
+ *
9377
+ */
9378
+ subscribe(
9379
+ callback: (arg: PlayerPlaceBlockAfterEvent) => void,
9380
+ options?: BlockEventOptions,
9381
+ ): (arg: PlayerPlaceBlockAfterEvent) => void;
9382
+ /**
9383
+ * @remarks
9384
+ * Removes a callback from being called when an block is placed
9385
+ * by a player.
9386
+ *
9387
+ * This function can't be called in read-only mode.
9388
+ *
9389
+ * @throws This function can throw errors.
9390
+ */
9391
+ unsubscribe(callback: (arg: PlayerPlaceBlockAfterEvent) => void): void;
9392
+ }
9393
+
9394
+ /**
9395
+ * @beta
9396
+ * Contains information regarding an event before a player
9397
+ * places a block.
9398
+ */
9399
+ // @ts-ignore Class inheritance allowed for native defined classes
9400
+ export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
9401
+ private constructor();
9402
+ /**
9403
+ * @remarks
9404
+ * If set to true, cancels the block place event.
9405
+ *
9406
+ */
9407
+ cancel: boolean;
9408
+ /**
9409
+ * @remarks
9410
+ * The face of the block that the new block is being placed on.
9411
+ *
9412
+ */
9413
+ readonly face: Direction;
9414
+ /**
9415
+ * @remarks
9416
+ * Location relative to the bottom north-west corner of the
9417
+ * block where the new block is being placed onto.
9418
+ *
9419
+ */
9420
+ readonly faceLocation: Vector3;
9421
+ /**
9422
+ * @remarks
9423
+ * The item being used to place the block.
9424
+ *
9425
+ */
9426
+ itemStack: ItemStack;
9427
+ /**
9428
+ * @remarks
9429
+ * Player that is placing the block for this event.
9430
+ *
9431
+ */
9432
+ readonly player: Player;
9433
+ }
9434
+
9435
+ /**
9436
+ * @beta
9437
+ * Manages callbacks that are connected to before a block is
9438
+ * placed by a player.
9439
+ */
9440
+ export class PlayerPlaceBlockBeforeEventSignal {
9441
+ private constructor();
9442
+ /**
9443
+ * @remarks
9444
+ * Adds a callback that will be called before a block is placed
9445
+ * by a player.
9446
+ *
9447
+ * This function can't be called in read-only mode.
9448
+ *
9449
+ */
9450
+ subscribe(
9451
+ callback: (arg: PlayerPlaceBlockBeforeEvent) => void,
9452
+ options?: BlockEventOptions,
9453
+ ): (arg: PlayerPlaceBlockBeforeEvent) => void;
9454
+ /**
9455
+ * @remarks
9456
+ * Removes a callback from being called before an block is
9457
+ * placed by a player.
9458
+ *
9459
+ * This function can't be called in read-only mode.
9460
+ *
9461
+ * @throws This function can throw errors.
9462
+ */
9463
+ unsubscribe(callback: (arg: PlayerPlaceBlockBeforeEvent) => void): void;
9464
+ }
9465
+
9145
9466
  /**
9146
9467
  * @beta
9147
9468
  * An event that contains more information about a player
@@ -10955,13 +11276,6 @@ export class World {
10955
11276
  */
10956
11277
  export class WorldAfterEvents {
10957
11278
  private constructor();
10958
- /**
10959
- * @beta
10960
- * @remarks
10961
- * This event fires for a block that is broken by a player.
10962
- *
10963
- */
10964
- readonly blockBreak: BlockBreakAfterEventSignal;
10965
11279
  /**
10966
11280
  * @beta
10967
11281
  * @remarks
@@ -10971,13 +11285,6 @@ export class WorldAfterEvents {
10971
11285
  *
10972
11286
  */
10973
11287
  readonly blockExplode: BlockExplodeAfterEventSignal;
10974
- /**
10975
- * @beta
10976
- * @remarks
10977
- * This event fires for a block that is placed by a player.
10978
- *
10979
- */
10980
- readonly blockPlace: BlockPlaceAfterEventSignal;
10981
11288
  /**
10982
11289
  * @remarks
10983
11290
  * This event fires when a button is pushed.
@@ -11046,6 +11353,10 @@ export class WorldAfterEvents {
11046
11353
  *
11047
11354
  */
11048
11355
  readonly entityHurt: EntityHurtAfterEventSignal;
11356
+ /**
11357
+ * @beta
11358
+ */
11359
+ readonly entityLoad: EntityLoadAfterEventSignal;
11049
11360
  /**
11050
11361
  * @beta
11051
11362
  */
@@ -11160,6 +11471,13 @@ export class WorldAfterEvents {
11160
11471
  *
11161
11472
  */
11162
11473
  readonly pistonActivate: PistonActivateAfterEventSignal;
11474
+ /**
11475
+ * @beta
11476
+ * @remarks
11477
+ * This event fires for a block that is broken by a player.
11478
+ *
11479
+ */
11480
+ readonly playerBreakBlock: PlayerBreakBlockAfterEventSignal;
11163
11481
  /**
11164
11482
  * @remarks
11165
11483
  * This event fires when a player joins a world. See also
@@ -11174,6 +11492,13 @@ export class WorldAfterEvents {
11174
11492
  *
11175
11493
  */
11176
11494
  readonly playerLeave: PlayerLeaveAfterEventSignal;
11495
+ /**
11496
+ * @beta
11497
+ * @remarks
11498
+ * This event fires for a block that is placed by a player.
11499
+ *
11500
+ */
11501
+ readonly playerPlaceBlock: PlayerPlaceBlockAfterEventSignal;
11177
11502
  /**
11178
11503
  * @remarks
11179
11504
  * This event fires when a player spawns or respawns. Note that
@@ -11314,6 +11639,20 @@ export class WorldBeforeEvents {
11314
11639
  *
11315
11640
  */
11316
11641
  readonly pistonActivate: PistonActivateBeforeEventSignal;
11642
+ /**
11643
+ * @beta
11644
+ * @remarks
11645
+ * This event fires before a block is broken by a player.
11646
+ *
11647
+ */
11648
+ readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
11649
+ /**
11650
+ * @beta
11651
+ * @remarks
11652
+ * This event fires before a block is placed by a player.
11653
+ *
11654
+ */
11655
+ readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
11317
11656
  }
11318
11657
 
11319
11658
  /**
@@ -11380,6 +11719,27 @@ export class WorldInitializeAfterEventSignal {
11380
11719
  unsubscribe(callback: (arg: WorldInitializeAfterEvent) => void): void;
11381
11720
  }
11382
11721
 
11722
+ /**
11723
+ * @beta
11724
+ * Contains optional parameters for registering a block event.
11725
+ */
11726
+ export interface BlockEventOptions {
11727
+ /**
11728
+ * @remarks
11729
+ * If this value is set, this event will only fire if the
11730
+ * impacted block's type matches this parameter.
11731
+ *
11732
+ */
11733
+ blockTypes?: string[];
11734
+ /**
11735
+ * @remarks
11736
+ * If this value is set, this event will only fire if the
11737
+ * impacted block's permutation matches this parameter.
11738
+ *
11739
+ */
11740
+ permutations?: BlockPermutation[];
11741
+ }
11742
+
11383
11743
  /**
11384
11744
  * @beta
11385
11745
  * Contains additional options for a block fill operation.
@@ -12206,6 +12566,13 @@ export interface RawMessage {
12206
12566
  *
12207
12567
  */
12208
12568
  translate?: string;
12569
+ /**
12570
+ * @remarks
12571
+ * Arguments for the translation token. Can be either an array
12572
+ * of strings or RawMessage containing an array of raw text
12573
+ * objects.
12574
+ *
12575
+ */
12209
12576
  with?: string[] | RawMessage;
12210
12577
  }
12211
12578
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.6.0-beta.1.20.30-preview.22",
3
+ "version": "1.6.0-beta.1.20.30-preview.24",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {