@minecraft/server 1.9.0-beta.1.20.60-preview.22 → 1.9.0-beta.1.20.60-preview.23

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 +152 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -439,6 +439,7 @@ export enum EntityComponentTypes {
439
439
  NavigationWalk = 'minecraft:navigation.walk',
440
440
  Npc = 'minecraft:npc',
441
441
  OnFire = 'minecraft:onfire',
442
+ Projectile = 'minecraft:projectile',
442
443
  PushThrough = 'minecraft:push_through',
443
444
  Rideable = 'minecraft:rideable',
444
445
  Riding = 'minecraft:riding',
@@ -1266,6 +1267,7 @@ export type EntityComponentTypeMap = {
1266
1267
  'minecraft:navigation.walk': EntityNavigationWalkComponent;
1267
1268
  'minecraft:npc': EntityNpcComponent;
1268
1269
  'minecraft:onfire': EntityOnFireComponent;
1270
+ 'minecraft:projectile': EntityProjectileComponent;
1269
1271
  'minecraft:push_through': EntityPushThroughComponent;
1270
1272
  'minecraft:rideable': EntityRideableComponent;
1271
1273
  'minecraft:riding': EntityRidingComponent;
@@ -1295,6 +1297,7 @@ export type EntityComponentTypeMap = {
1295
1297
  'navigation.walk': EntityNavigationWalkComponent;
1296
1298
  npc: EntityNpcComponent;
1297
1299
  onfire: EntityOnFireComponent;
1300
+ projectile: EntityProjectileComponent;
1298
1301
  push_through: EntityPushThroughComponent;
1299
1302
  rideable: EntityRideableComponent;
1300
1303
  riding: EntityRidingComponent;
@@ -3545,6 +3548,22 @@ export class ContainerSlot {
3545
3548
  * Throws if the slot's container is invalid.
3546
3549
  */
3547
3550
  readonly typeId?: string;
3551
+ /**
3552
+ * @throws This function can throw errors.
3553
+ */
3554
+ clearDynamicProperties(): void;
3555
+ /**
3556
+ * @throws This function can throw errors.
3557
+ */
3558
+ getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
3559
+ /**
3560
+ * @throws This function can throw errors.
3561
+ */
3562
+ getDynamicPropertyIds(): string[];
3563
+ /**
3564
+ * @throws This function can throw errors.
3565
+ */
3566
+ getDynamicPropertyTotalByteCount(): number;
3548
3567
  /**
3549
3568
  * @remarks
3550
3569
  * Creates an exact copy of the item stack, including any
@@ -3646,6 +3665,10 @@ export class ContainerSlot {
3646
3665
  * any of the provided block identifiers are invalid.
3647
3666
  */
3648
3667
  setCanPlaceOn(blockIdentifiers?: string[]): void;
3668
+ /**
3669
+ * @throws This function can throw errors.
3670
+ */
3671
+ setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void;
3649
3672
  /**
3650
3673
  * @remarks
3651
3674
  * Sets the given ItemStack in the slot, replacing any existing
@@ -4749,7 +4772,7 @@ export class Entity {
4749
4772
  * log("Created a sneaking wolf.", 1);
4750
4773
  * ```
4751
4774
  */
4752
- addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
4775
+ addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
4753
4776
  /**
4754
4777
  * @remarks
4755
4778
  * Adds a specified tag to an entity.
@@ -7054,6 +7077,106 @@ export class EntityOnFireComponent extends EntityComponent {
7054
7077
  static readonly componentId = 'minecraft:onfire';
7055
7078
  }
7056
7079
 
7080
+ /**
7081
+ * @beta
7082
+ */
7083
+ // @ts-ignore Class inheritance allowed for native defined classes
7084
+ export class EntityProjectileComponent extends EntityComponent {
7085
+ private constructor();
7086
+ /**
7087
+ * @remarks
7088
+ * This property can't be edited in read-only mode.
7089
+ *
7090
+ */
7091
+ airInertia: number;
7092
+ /**
7093
+ * @remarks
7094
+ * This property can't be edited in read-only mode.
7095
+ *
7096
+ */
7097
+ catchFireOnHurt: boolean;
7098
+ /**
7099
+ * @remarks
7100
+ * This property can't be edited in read-only mode.
7101
+ *
7102
+ */
7103
+ critParticlesOnProjectileHurt: boolean;
7104
+ /**
7105
+ * @remarks
7106
+ * This property can't be edited in read-only mode.
7107
+ *
7108
+ */
7109
+ destroyOnProjectileHurt: boolean;
7110
+ /**
7111
+ * @remarks
7112
+ * This property can't be edited in read-only mode.
7113
+ *
7114
+ */
7115
+ gravity: number;
7116
+ /**
7117
+ * @remarks
7118
+ * This property can't be edited in read-only mode.
7119
+ *
7120
+ */
7121
+ hitEntitySound?: string;
7122
+ /**
7123
+ * @remarks
7124
+ * This property can't be edited in read-only mode.
7125
+ *
7126
+ */
7127
+ hitGroundSound?: string;
7128
+ /**
7129
+ * @remarks
7130
+ * This property can't be edited in read-only mode.
7131
+ *
7132
+ */
7133
+ hitParticle?: string;
7134
+ /**
7135
+ * @remarks
7136
+ * This property can't be edited in read-only mode.
7137
+ *
7138
+ */
7139
+ lightningStrikeOnHit: boolean;
7140
+ /**
7141
+ * @remarks
7142
+ * This property can't be edited in read-only mode.
7143
+ *
7144
+ */
7145
+ liquidInertia: number;
7146
+ /**
7147
+ * @remarks
7148
+ * This property can't be edited in read-only mode.
7149
+ *
7150
+ */
7151
+ onFireTime: number;
7152
+ /**
7153
+ * @remarks
7154
+ * This property can't be edited in read-only mode.
7155
+ *
7156
+ */
7157
+ owner?: Entity;
7158
+ /**
7159
+ * @remarks
7160
+ * This property can't be edited in read-only mode.
7161
+ *
7162
+ */
7163
+ shouldBounceOnHit: boolean;
7164
+ /**
7165
+ * @remarks
7166
+ * This property can't be edited in read-only mode.
7167
+ *
7168
+ */
7169
+ stopOnHit: boolean;
7170
+ static readonly componentId = 'minecraft:projectile';
7171
+ /**
7172
+ * @remarks
7173
+ * This function can't be called in read-only mode.
7174
+ *
7175
+ * @throws This function can throw errors.
7176
+ */
7177
+ shoot(velocity: Vector3, options?: ProjectileShootOptions): void;
7178
+ }
7179
+
7057
7180
  /**
7058
7181
  * Sets the distance through which the entity can push through.
7059
7182
  */
@@ -8425,6 +8548,10 @@ export class ItemStack {
8425
8548
  * the range of 1-255.
8426
8549
  */
8427
8550
  constructor(itemType: ItemType | string, amount?: number);
8551
+ /**
8552
+ * @beta
8553
+ */
8554
+ clearDynamicProperties(): void;
8428
8555
  /**
8429
8556
  * @remarks
8430
8557
  * Creates an exact copy of the item stack, including any
@@ -8481,6 +8608,18 @@ export class ItemStack {
8481
8608
  *
8482
8609
  */
8483
8610
  getComponents(): ItemComponent[];
8611
+ /**
8612
+ * @beta
8613
+ */
8614
+ getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
8615
+ /**
8616
+ * @beta
8617
+ */
8618
+ getDynamicPropertyIds(): string[];
8619
+ /**
8620
+ * @beta
8621
+ */
8622
+ getDynamicPropertyTotalByteCount(): number;
8484
8623
  /**
8485
8624
  * @remarks
8486
8625
  * Returns the lore value - a secondary display string - for an
@@ -8576,6 +8715,11 @@ export class ItemStack {
8576
8715
  * ```
8577
8716
  */
8578
8717
  setCanPlaceOn(blockIdentifiers?: string[]): void;
8718
+ /**
8719
+ * @beta
8720
+ * @throws This function can throw errors.
8721
+ */
8722
+ setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void;
8579
8723
  /**
8580
8724
  * @remarks
8581
8725
  * Sets the lore value - a secondary display string - for an
@@ -13538,6 +13682,13 @@ export interface PlayerSoundOptions {
13538
13682
  volume?: number;
13539
13683
  }
13540
13684
 
13685
+ /**
13686
+ * @beta
13687
+ */
13688
+ export interface ProjectileShootOptions {
13689
+ uncertainty?: number;
13690
+ }
13691
+
13541
13692
  /**
13542
13693
  * Defines a JSON structure that is used for more flexible.
13543
13694
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.9.0-beta.1.20.60-preview.22",
3
+ "version": "1.9.0-beta.1.20.60-preview.23",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {