@minecraft/server 1.2.0-beta.1.19.80-preview.20 → 1.2.0-beta.1.19.80-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.
Files changed (2) hide show
  1. package/index.d.ts +51 -69
  2. 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.2.0-internal.1.19.80-preview.20"
19
+ * "version": "1.2.0-internal.1.19.80-preview.21"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -143,6 +143,14 @@ export enum EntityDamageCause {
143
143
  'void' = 'void',
144
144
  wither = 'wither',
145
145
  }
146
+ export enum EquipmentSlot {
147
+ chest = 'chest',
148
+ feet = 'feet',
149
+ head = 'head',
150
+ legs = 'legs',
151
+ mainhand = 'mainhand',
152
+ offhand = 'offhand',
153
+ }
146
154
  /**
147
155
  * @beta
148
156
  * Represents the type of fluid for use within a fluid
@@ -290,33 +298,17 @@ export enum WatchdogTerminateReason {
290
298
  * @beta
291
299
  * An event that fires as players enter chat messages.
292
300
  */
293
- export class BeforeChatEvent {
301
+ export class BeforeChatEvent extends ChatEvent {
294
302
  protected constructor();
295
303
  /**
296
304
  * If set to true in a beforeChat event handler, this message
297
305
  * is not broadcast out.
298
306
  */
299
307
  cancel: boolean;
300
- /**
301
- * Message that is being broadcast. In a beforeChat event
302
- * handler, _message_ can be updated with edits before the
303
- * message is displayed to players.
304
- */
305
- message: string;
306
- /**
307
- * Player that sent the chat message.
308
- */
309
- sender: Player;
310
- /**
311
- * If true, this message is directly targeted to one or more
312
- * players (i.e., is not broadcast.)
313
- */
314
- sendToTargets: boolean;
315
- getTargets(): Player[];
316
308
  setTargets(players: Player[]): void;
317
309
  }
318
310
  // tslint:disable-next-line:no-unnecessary-class
319
- export class BeforeChatEventSignal_deprecated extends IBeforeChatEventSignal {
311
+ export class BeforeChatEventSignal_deprecated extends IBeforeChatEventSignal_deprecated {
320
312
  protected constructor();
321
313
  }
322
314
  /**
@@ -343,7 +335,7 @@ export class BeforeDataDrivenEntityTriggerEvent {
343
335
  setModifiers(modifiers: DefinitionModifier[]): void;
344
336
  }
345
337
  // tslint:disable-next-line:no-unnecessary-class
346
- export class BeforeDataDrivenEntityTriggerEventSignal_deprecated extends IBeforeDataDrivenEntityTriggerEventSignal {
338
+ export class BeforeDataDrivenEntityTriggerEventSignal_deprecated extends IBeforeDataDrivenEntityTriggerEventSignal_deprecated {
347
339
  protected constructor();
348
340
  }
349
341
  /**
@@ -351,29 +343,20 @@ export class BeforeDataDrivenEntityTriggerEventSignal_deprecated extends IBefore
351
343
  * Contains information regarding an explosion that has
352
344
  * happened.
353
345
  */
354
- export class BeforeExplosionEvent {
346
+ export class BeforeExplosionEvent extends ExplosionEvent {
355
347
  protected constructor();
356
348
  /**
357
349
  * If set to true, cancels the explosion event.
358
350
  */
359
351
  cancel: boolean;
360
- /**
361
- * Dimension where the explosion has occurred.
362
- */
363
- readonly dimension: Dimension;
364
- /**
365
- * Optional source of the explosion.
366
- */
367
- readonly source: Entity;
368
- getImpactedBlocks(): Vector3[];
369
352
  setImpactedBlocks(blocks: Vector3[]): void;
370
353
  }
371
354
  // tslint:disable-next-line:no-unnecessary-class
372
- export class BeforeExplosionEventSignal_deprecated extends IBeforeExplosionEventSignal {
355
+ export class BeforeExplosionEventSignal_deprecated extends IBeforeExplosionEventSignal_deprecated {
373
356
  protected constructor();
374
357
  }
375
358
  // tslint:disable-next-line:no-unnecessary-class
376
- export class BeforeItemDefinitionEventSignal_deprecated extends IBeforeItemDefinitionEventSignal {
359
+ export class BeforeItemDefinitionEventSignal_deprecated extends IBeforeItemDefinitionEventSignal_deprecated {
377
360
  protected constructor();
378
361
  }
379
362
  /**
@@ -381,48 +364,27 @@ export class BeforeItemDefinitionEventSignal_deprecated extends IBeforeItemDefin
381
364
  * Contains information related to a triggering of a custom
382
365
  * item definition change.
383
366
  */
384
- export class BeforeItemDefinitionTriggeredEvent {
367
+ export class BeforeItemDefinitionTriggeredEvent extends ItemDefinitionTriggeredEvent {
385
368
  protected constructor();
386
369
  /**
387
370
  * If set to true, will cancel the application of this item
388
371
  * definition change.
389
372
  */
390
373
  cancel: boolean;
391
- /**
392
- * Name of the data-driven item event that is triggering this
393
- * change.
394
- */
395
- readonly eventName: string;
396
- /**
397
- * The impacted item stack that is being used.
398
- */
399
- item: ItemStack;
400
- /**
401
- * Returns the source entity that triggered this item event.
402
- */
403
- readonly source: Entity;
404
374
  }
405
375
  /**
406
376
  * @beta
407
377
  * Contains information related to an item being used.
408
378
  */
409
- export class BeforeItemUseEvent {
379
+ export class BeforeItemUseEvent extends ItemUseEvent {
410
380
  protected constructor();
411
381
  /**
412
382
  * If set to true, this will cancel the item use behavior.
413
383
  */
414
384
  cancel: boolean;
415
- /**
416
- * The impacted item stack that is being used.
417
- */
418
- item: ItemStack;
419
- /**
420
- * Returns the source entity that triggered this item event.
421
- */
422
- readonly source: Entity;
423
385
  }
424
386
  // tslint:disable-next-line:no-unnecessary-class
425
- export class BeforeItemUseEventSignal_deprecated extends IBeforeItemUseEventSignal {
387
+ export class BeforeItemUseEventSignal_deprecated extends IBeforeItemUseEventSignal_deprecated {
426
388
  protected constructor();
427
389
  }
428
390
  /**
@@ -438,7 +400,7 @@ export class BeforeItemUseOnEvent extends ItemUseOnEvent {
438
400
  cancel: boolean;
439
401
  }
440
402
  // tslint:disable-next-line:no-unnecessary-class
441
- export class BeforeItemUseOnEventSignal_deprecated extends IBeforeItemUseOnEventSignal {
403
+ export class BeforeItemUseOnEventSignal_deprecated extends IBeforeItemUseOnEventSignal_deprecated {
442
404
  protected constructor();
443
405
  }
444
406
  /**
@@ -463,7 +425,7 @@ export class BeforePistonActivateEvent extends BlockEvent {
463
425
  readonly piston: BlockPistonComponent;
464
426
  }
465
427
  // tslint:disable-next-line:no-unnecessary-class
466
- export class BeforePistonActivateEventSignal_deprecated extends IBeforePistonActivateEventSignal {
428
+ export class BeforePistonActivateEventSignal_deprecated extends IBeforePistonActivateEventSignal_deprecated {
467
429
  protected constructor();
468
430
  }
469
431
  /**
@@ -1429,6 +1391,8 @@ export class ContainerSlot {
1429
1391
  * Throws if the slot's container is invalid.
1430
1392
  */
1431
1393
  getLore(): string[];
1394
+ getTags(): string[];
1395
+ hasTag(tag: string): boolean;
1432
1396
  /**
1433
1397
  * @remarks
1434
1398
  * Returns whether this item stack can be stacked with the
@@ -2622,6 +2586,13 @@ export class EntityDieEvent {
2622
2586
  export class EntityDieEventSignal_deprecated extends IEntityDieEventSignal {
2623
2587
  protected constructor();
2624
2588
  }
2589
+ export class EntityEquipmentInventoryComponent extends EntityComponent {
2590
+ protected constructor();
2591
+ static readonly componentId = 'minecraft:equipment_inventory';
2592
+ getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
2593
+ getEquipmentSlot(equipmentSlot: EquipmentSlot): ContainerSlot;
2594
+ setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): void;
2595
+ }
2625
2596
  /**
2626
2597
  * @beta
2627
2598
  * When added, this component signifies that this entity
@@ -4035,12 +4006,12 @@ export class FluidContainer {
4035
4006
  */
4036
4007
  static readonly minFillLevel = 0;
4037
4008
  }
4038
- export class IBeforeChatEventSignal {
4009
+ export class IBeforeChatEventSignal_deprecated {
4039
4010
  protected constructor();
4040
4011
  subscribe(callback: (arg: BeforeChatEvent) => void): (arg: BeforeChatEvent) => void;
4041
4012
  unsubscribe(callback: (arg: BeforeChatEvent) => void): void;
4042
4013
  }
4043
- export class IBeforeDataDrivenEntityTriggerEventSignal {
4014
+ export class IBeforeDataDrivenEntityTriggerEventSignal_deprecated {
4044
4015
  protected constructor();
4045
4016
  subscribe(
4046
4017
  callback: (arg: BeforeDataDrivenEntityTriggerEvent) => void,
@@ -4048,29 +4019,29 @@ export class IBeforeDataDrivenEntityTriggerEventSignal {
4048
4019
  ): (arg: BeforeDataDrivenEntityTriggerEvent) => void;
4049
4020
  unsubscribe(callback: (arg: BeforeDataDrivenEntityTriggerEvent) => void): void;
4050
4021
  }
4051
- export class IBeforeExplosionEventSignal {
4022
+ export class IBeforeExplosionEventSignal_deprecated {
4052
4023
  protected constructor();
4053
4024
  subscribe(callback: (arg: BeforeExplosionEvent) => void): (arg: BeforeExplosionEvent) => void;
4054
4025
  unsubscribe(callback: (arg: BeforeExplosionEvent) => void): void;
4055
4026
  }
4056
- export class IBeforeItemDefinitionEventSignal {
4027
+ export class IBeforeItemDefinitionEventSignal_deprecated {
4057
4028
  protected constructor();
4058
4029
  subscribe(
4059
4030
  callback: (arg: BeforeItemDefinitionTriggeredEvent) => void,
4060
4031
  ): (arg: BeforeItemDefinitionTriggeredEvent) => void;
4061
4032
  unsubscribe(callback: (arg: BeforeItemDefinitionTriggeredEvent) => void): void;
4062
4033
  }
4063
- export class IBeforeItemUseEventSignal {
4034
+ export class IBeforeItemUseEventSignal_deprecated {
4064
4035
  protected constructor();
4065
4036
  subscribe(callback: (arg: BeforeItemUseEvent) => void): (arg: BeforeItemUseEvent) => void;
4066
4037
  unsubscribe(callback: (arg: BeforeItemUseEvent) => void): void;
4067
4038
  }
4068
- export class IBeforeItemUseOnEventSignal {
4039
+ export class IBeforeItemUseOnEventSignal_deprecated {
4069
4040
  protected constructor();
4070
4041
  subscribe(callback: (arg: BeforeItemUseOnEvent) => void): (arg: BeforeItemUseOnEvent) => void;
4071
4042
  unsubscribe(callback: (arg: BeforeItemUseOnEvent) => void): void;
4072
4043
  }
4073
- export class IBeforePistonActivateEventSignal {
4044
+ export class IBeforePistonActivateEventSignal_deprecated {
4074
4045
  protected constructor();
4075
4046
  subscribe(callback: (arg: BeforePistonActivateEvent) => void): (arg: BeforePistonActivateEvent) => void;
4076
4047
  unsubscribe(callback: (arg: BeforePistonActivateEvent) => void): void;
@@ -4568,6 +4539,7 @@ export class ItemStack {
4568
4539
  * returns an empty array.
4569
4540
  */
4570
4541
  getLore(): string[];
4542
+ getTags(): string[];
4571
4543
  /**
4572
4544
  * @remarks
4573
4545
  * Returns true if the specified component is present on this
@@ -4578,6 +4550,7 @@ export class ItemStack {
4578
4550
  * is assumed.
4579
4551
  */
4580
4552
  hasComponent(componentId: string): boolean;
4553
+ hasTag(tag: string): boolean;
4581
4554
  /**
4582
4555
  * @remarks
4583
4556
  * Returns whether this item stack can be stacked with the
@@ -4900,6 +4873,7 @@ export class MinecraftBlockTypes {
4900
4873
  * Represents an acacia door within Minecraft.
4901
4874
  */
4902
4875
  static readonly acaciaDoor: BlockType;
4876
+ static readonly acaciaFence: BlockType;
4903
4877
  /**
4904
4878
  * Represents an acacia fence gate within Minecraft.
4905
4879
  */
@@ -5049,6 +5023,7 @@ export class MinecraftBlockTypes {
5049
5023
  * Represents a birch door within Minecraft.
5050
5024
  */
5051
5025
  static readonly birchDoor: BlockType;
5026
+ static readonly birchFence: BlockType;
5052
5027
  /**
5053
5028
  * Represents a birch fence gate within Minecraft.
5054
5029
  */
@@ -5554,6 +5529,7 @@ export class MinecraftBlockTypes {
5554
5529
  * Represents a dark oak door within Minecraft.
5555
5530
  */
5556
5531
  static readonly darkOakDoor: BlockType;
5532
+ static readonly darkOakFence: BlockType;
5557
5533
  /**
5558
5534
  * Represents a dark oak fence gate within Minecraft.
5559
5535
  */
@@ -6433,10 +6409,6 @@ export class MinecraftBlockTypes {
6433
6409
  * Represents a farmland block within Minecraft.
6434
6410
  */
6435
6411
  static readonly farmland: BlockType;
6436
- /**
6437
- * Represents a fence within Minecraft.
6438
- */
6439
- static readonly fence: BlockType;
6440
6412
  /**
6441
6413
  * Represents a fence gate within Minecraft.
6442
6414
  */
@@ -6668,6 +6640,7 @@ export class MinecraftBlockTypes {
6668
6640
  * Represents a jungle wood door within Minecraft.
6669
6641
  */
6670
6642
  static readonly jungleDoor: BlockType;
6643
+ static readonly jungleFence: BlockType;
6671
6644
  /**
6672
6645
  * Represents a jungle wood fence gate within Minecraft.
6673
6646
  */
@@ -6968,6 +6941,7 @@ export class MinecraftBlockTypes {
6968
6941
  * Represents a note block within Minecraft.
6969
6942
  */
6970
6943
  static readonly noteblock: BlockType;
6944
+ static readonly oakFence: BlockType;
6971
6945
  static readonly oakHangingSign: BlockType;
6972
6946
  static readonly oakLog: BlockType;
6973
6947
  /**
@@ -7475,6 +7449,7 @@ export class MinecraftBlockTypes {
7475
7449
  * Represents a spruce wood door within Minecraft.
7476
7450
  */
7477
7451
  static readonly spruceDoor: BlockType;
7452
+ static readonly spruceFence: BlockType;
7478
7453
  /**
7479
7454
  * Represents a spruce wood fence gate within Minecraft.
7480
7455
  */
@@ -7635,6 +7610,7 @@ export class MinecraftBlockTypes {
7635
7610
  * Represents a structure void within Minecraft.
7636
7611
  */
7637
7612
  static readonly structureVoid: BlockType;
7613
+ static readonly suspiciousGravel: BlockType;
7638
7614
  static readonly suspiciousSand: BlockType;
7639
7615
  /**
7640
7616
  * Represents a sweet berry bush within Minecraft.
@@ -8258,6 +8234,7 @@ export class MinecraftItemTypes {
8258
8234
  * Minecraft.
8259
8235
  */
8260
8236
  static readonly acaciaDoor: ItemType;
8237
+ static readonly acaciaFence: ItemType;
8261
8238
  /**
8262
8239
  * Represents an item that can place an acacia fence gate
8263
8240
  * within Minecraft.
@@ -8415,6 +8392,7 @@ export class MinecraftItemTypes {
8415
8392
  * Minecraft.
8416
8393
  */
8417
8394
  static readonly birchDoor: ItemType;
8395
+ static readonly birchFence: ItemType;
8418
8396
  /**
8419
8397
  * Represents an item that can place a birch fence gate within
8420
8398
  * Minecraft.
@@ -8911,6 +8889,7 @@ export class MinecraftItemTypes {
8911
8889
  * Minecraft.
8912
8890
  */
8913
8891
  static readonly darkOakDoor: ItemType;
8892
+ static readonly darkOakFence: ItemType;
8914
8893
  /**
8915
8894
  * Represents an item that can place a dark oak fence gate
8916
8895
  * within Minecraft.
@@ -9487,6 +9466,7 @@ export class MinecraftItemTypes {
9487
9466
  * Minecraft.
9488
9467
  */
9489
9468
  static readonly jungleDoor: ItemType;
9469
+ static readonly jungleFence: ItemType;
9490
9470
  /**
9491
9471
  * Represents an item that can place a jungle wood fence gate
9492
9472
  * within Minecraft.
@@ -9831,6 +9811,7 @@ export class MinecraftItemTypes {
9831
9811
  static readonly noteblock: ItemType;
9832
9812
  static readonly oakBoat: ItemType;
9833
9813
  static readonly oakChestBoat: ItemType;
9814
+ static readonly oakFence: ItemType;
9834
9815
  static readonly oakLog: ItemType;
9835
9816
  static readonly oakSign: ItemType;
9836
9817
  /**
@@ -10394,6 +10375,7 @@ export class MinecraftItemTypes {
10394
10375
  * Minecraft.
10395
10376
  */
10396
10377
  static readonly spruceDoor: ItemType;
10378
+ static readonly spruceFence: ItemType;
10397
10379
  /**
10398
10380
  * Represents an item that can place a spruce wood fence gate
10399
10381
  * within Minecraft.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.2.0-beta.1.19.80-preview.20",
3
+ "version": "1.2.0-beta.1.19.80-preview.21",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {