@minecraft/server 1.7.0-rc.1.20.60-preview.21 → 1.7.0

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 +26 -152
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * ```json
16
16
  * {
17
17
  * "module_name": "@minecraft/server",
18
- * "version": "1.6.0"
18
+ * "version": "1.7.0"
19
19
  * }
20
20
  * ```
21
21
  *
@@ -788,7 +788,6 @@ export class Block {
788
788
  */
789
789
  readonly z: number;
790
790
  /**
791
- * @beta
792
791
  * @remarks
793
792
  * Returns the {@link Block} above this block (positive in the
794
793
  * Y direction).
@@ -803,7 +802,6 @@ export class Block {
803
802
  */
804
803
  above(steps?: number): Block | undefined;
805
804
  /**
806
- * @beta
807
805
  * @remarks
808
806
  * Returns the {@link Block} below this block (negative in the
809
807
  * Y direction).
@@ -818,7 +816,6 @@ export class Block {
818
816
  */
819
817
  below(steps?: number): Block | undefined;
820
818
  /**
821
- * @beta
822
819
  * @remarks
823
820
  * Returns the {@link @minecraft/server.Location} of the center
824
821
  * of this block on the X and Z axis.
@@ -826,7 +823,6 @@ export class Block {
826
823
  */
827
824
  bottomCenter(): Vector3;
828
825
  /**
829
- * @beta
830
826
  * @remarks
831
827
  * Returns the {@link @minecraft/server.Location} of the center
832
828
  * of this block on the X, Y, and Z axis.
@@ -834,7 +830,6 @@ export class Block {
834
830
  */
835
831
  center(): Vector3;
836
832
  /**
837
- * @beta
838
833
  * @remarks
839
834
  * Returns the {@link Block} to the east of this block
840
835
  * (positive in the X direction).
@@ -880,7 +875,6 @@ export class Block {
880
875
  */
881
876
  isValid(): boolean;
882
877
  /**
883
- * @beta
884
878
  * @remarks
885
879
  * Returns the {@link Block} to the north of this block
886
880
  * (negative in the Z direction).
@@ -895,7 +889,6 @@ export class Block {
895
889
  */
896
890
  north(steps?: number): Block | undefined;
897
891
  /**
898
- * @beta
899
892
  * @remarks
900
893
  * Returns a block at an offset relative vector to this block.
901
894
  *
@@ -931,7 +924,6 @@ export class Block {
931
924
  */
932
925
  setPermutation(permutation: BlockPermutation): void;
933
926
  /**
934
- * @beta
935
927
  * @remarks
936
928
  * Returns the {@link Block} to the south of this block
937
929
  * (positive in the Z direction).
@@ -946,7 +938,6 @@ export class Block {
946
938
  */
947
939
  south(steps?: number): Block | undefined;
948
940
  /**
949
- * @beta
950
941
  * @remarks
951
942
  * Returns the {@link Block} to the west of this block
952
943
  * (negative in the X direction).
@@ -1384,7 +1375,6 @@ export class Container {
1384
1375
  export class Dimension {
1385
1376
  private constructor();
1386
1377
  /**
1387
- * @beta
1388
1378
  * @remarks
1389
1379
  * Height range of the dimension.
1390
1380
  *
@@ -2100,7 +2090,6 @@ export class Entity {
2100
2090
  */
2101
2091
  applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
2102
2092
  /**
2103
- * @beta
2104
2093
  * @remarks
2105
2094
  * Clears all dynamic properties that have been set on this
2106
2095
  * entity.
@@ -2166,7 +2155,6 @@ export class Entity {
2166
2155
  */
2167
2156
  getComponents(): EntityComponent[];
2168
2157
  /**
2169
- * @beta
2170
2158
  * @remarks
2171
2159
  * Returns a property value.
2172
2160
  *
@@ -2179,7 +2167,6 @@ export class Entity {
2179
2167
  */
2180
2168
  getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
2181
2169
  /**
2182
- * @beta
2183
2170
  * @remarks
2184
2171
  * Returns the available set of dynamic property identifiers
2185
2172
  * that have been used on this entity.
@@ -2190,7 +2177,6 @@ export class Entity {
2190
2177
  */
2191
2178
  getDynamicPropertyIds(): string[];
2192
2179
  /**
2193
- * @beta
2194
2180
  * @remarks
2195
2181
  * Returns the total size, in bytes, of all the dynamic
2196
2182
  * properties that are currently stored for this entity. This
@@ -2379,7 +2365,6 @@ export class Entity {
2379
2365
  */
2380
2366
  kill(): boolean;
2381
2367
  /**
2382
- * @beta
2383
2368
  * @remarks
2384
2369
  * Matches the entity against the passed in options. Uses the
2385
2370
  * location of the entity for matching if the location is not
@@ -2392,7 +2377,6 @@ export class Entity {
2392
2377
  */
2393
2378
  matches(options: EntityQueryOptions): boolean;
2394
2379
  /**
2395
- * @beta
2396
2380
  * @remarks
2397
2381
  * Immediately removes the entity from the world. The removed
2398
2382
  * entity will not perform a death animation or drop loot upon
@@ -2489,7 +2473,6 @@ export class Entity {
2489
2473
  */
2490
2474
  runCommandAsync(commandString: string): Promise<CommandResult>;
2491
2475
  /**
2492
- * @beta
2493
2476
  * @remarks
2494
2477
  * Sets a specified property to a value.
2495
2478
  *
@@ -2833,6 +2816,8 @@ export class EntityEquippableComponent extends EntityComponent {
2833
2816
  * @remarks
2834
2817
  * Gets the equipped item for the given EquipmentSlot.
2835
2818
  *
2819
+ * This function can't be called in read-only mode.
2820
+ *
2836
2821
  * @param equipmentSlot
2837
2822
  * The equipment slot. e.g. "head", "chest", "offhand"
2838
2823
  * @returns
@@ -3784,115 +3769,6 @@ export class EntityWantsJockeyComponent extends EntityComponent {
3784
3769
  static readonly componentId = 'minecraft:wants_jockey';
3785
3770
  }
3786
3771
 
3787
- /**
3788
- * @beta
3789
- * Contains information regarding an explosion that has
3790
- * happened.
3791
- */
3792
- export class ExplosionAfterEvent {
3793
- private constructor();
3794
- /**
3795
- * @remarks
3796
- * Dimension where the explosion has occurred.
3797
- *
3798
- */
3799
- readonly dimension: Dimension;
3800
- /**
3801
- * @remarks
3802
- * Optional source of the explosion.
3803
- *
3804
- */
3805
- readonly source?: Entity;
3806
- /**
3807
- * @remarks
3808
- * A collection of blocks impacted by this explosion event.
3809
- *
3810
- */
3811
- getImpactedBlocks(): Block[];
3812
- }
3813
-
3814
- /**
3815
- * @beta
3816
- * Manages callbacks that are connected to when an explosion
3817
- * occurs.
3818
- */
3819
- export class ExplosionAfterEventSignal {
3820
- private constructor();
3821
- /**
3822
- * @remarks
3823
- * Adds a callback that will be called when an explosion
3824
- * occurs.
3825
- *
3826
- * This function can't be called in read-only mode.
3827
- *
3828
- */
3829
- subscribe(callback: (arg: ExplosionAfterEvent) => void): (arg: ExplosionAfterEvent) => void;
3830
- /**
3831
- * @remarks
3832
- * Removes a callback from being called when an explosion
3833
- * occurs.
3834
- *
3835
- * This function can't be called in read-only mode.
3836
- *
3837
- * @throws This function can throw errors.
3838
- */
3839
- unsubscribe(callback: (arg: ExplosionAfterEvent) => void): void;
3840
- }
3841
-
3842
- /**
3843
- * @beta
3844
- * Contains information regarding an explosion that has
3845
- * happened.
3846
- */
3847
- // @ts-ignore Class inheritance allowed for native defined classes
3848
- export class ExplosionBeforeEvent extends ExplosionAfterEvent {
3849
- private constructor();
3850
- /**
3851
- * @remarks
3852
- * If set to true, cancels the explosion event.
3853
- *
3854
- */
3855
- cancel: boolean;
3856
- /**
3857
- * @remarks
3858
- * Updates a collection of blocks impacted by this explosion
3859
- * event.
3860
- *
3861
- * @param blocks
3862
- * New list of blocks that are impacted by this explosion.
3863
- */
3864
- setImpactedBlocks(blocks: Block[]): void;
3865
- }
3866
-
3867
- /**
3868
- * @beta
3869
- * Manages callbacks that are connected to before an explosion
3870
- * occurs.
3871
- */
3872
- export class ExplosionBeforeEventSignal {
3873
- private constructor();
3874
- /**
3875
- * @remarks
3876
- * Adds a callback that will be called when before an explosion
3877
- * occurs. The callback can optionally change or cancel
3878
- * explosion behavior.
3879
- *
3880
- * This function can't be called in read-only mode.
3881
- *
3882
- */
3883
- subscribe(callback: (arg: ExplosionBeforeEvent) => void): (arg: ExplosionBeforeEvent) => void;
3884
- /**
3885
- * @remarks
3886
- * Removes a callback from being called from before when an
3887
- * explosion would occur.
3888
- *
3889
- * This function can't be called in read-only mode.
3890
- *
3891
- * @throws This function can throw errors.
3892
- */
3893
- unsubscribe(callback: (arg: ExplosionBeforeEvent) => void): void;
3894
- }
3895
-
3896
3772
  /**
3897
3773
  * As part of the Healable component, represents a specific
3898
3774
  * item that can be fed to an entity to cause health effects.
@@ -4159,7 +4035,7 @@ export class ItemReleaseUseAfterEvent {
4159
4035
  * Returns the item stack that triggered this item event.
4160
4036
  *
4161
4037
  */
4162
- readonly itemStack?: ItemStack;
4038
+ readonly itemStack: ItemStack;
4163
4039
  /**
4164
4040
  * @remarks
4165
4041
  * Returns the source entity that triggered this item event.
@@ -5496,7 +5372,6 @@ export class PlayerDimensionChangeAfterEventSignal {
5496
5372
  }
5497
5373
 
5498
5374
  /**
5499
- * @beta
5500
5375
  * Contains information regarding an event after a player
5501
5376
  * interacts with a block.
5502
5377
  */
@@ -5537,7 +5412,6 @@ export class PlayerInteractWithBlockAfterEvent {
5537
5412
  }
5538
5413
 
5539
5414
  /**
5540
- * @beta
5541
5415
  * Manages callbacks that are connected to after a player
5542
5416
  * interacts with a block.
5543
5417
  */
@@ -5567,7 +5441,6 @@ export class PlayerInteractWithBlockAfterEventSignal {
5567
5441
  }
5568
5442
 
5569
5443
  /**
5570
- * @beta
5571
5444
  * Contains information regarding an event before a player
5572
5445
  * interacts with a block.
5573
5446
  */
@@ -5614,7 +5487,6 @@ export class PlayerInteractWithBlockBeforeEvent {
5614
5487
  }
5615
5488
 
5616
5489
  /**
5617
- * @beta
5618
5490
  * Manages callbacks that are connected to before a player
5619
5491
  * interacts with a block.
5620
5492
  */
@@ -5644,7 +5516,6 @@ export class PlayerInteractWithBlockBeforeEventSignal {
5644
5516
  }
5645
5517
 
5646
5518
  /**
5647
- * @beta
5648
5519
  * Contains information regarding an event after a player
5649
5520
  * interacts with an entity.
5650
5521
  */
@@ -5672,7 +5543,6 @@ export class PlayerInteractWithEntityAfterEvent {
5672
5543
  }
5673
5544
 
5674
5545
  /**
5675
- * @beta
5676
5546
  * Manages callbacks that are connected to after a player
5677
5547
  * interacts with an entity.
5678
5548
  */
@@ -5702,7 +5572,6 @@ export class PlayerInteractWithEntityAfterEventSignal {
5702
5572
  }
5703
5573
 
5704
5574
  /**
5705
- * @beta
5706
5575
  * Contains information regarding an event before a player
5707
5576
  * interacts with an entity.
5708
5577
  */
@@ -5736,7 +5605,6 @@ export class PlayerInteractWithEntityBeforeEvent {
5736
5605
  }
5737
5606
 
5738
5607
  /**
5739
- * @beta
5740
5608
  * Manages callbacks that are connected to before a player
5741
5609
  * interacts with an entity.
5742
5610
  */
@@ -5826,17 +5694,11 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
5826
5694
  private constructor();
5827
5695
  }
5828
5696
 
5829
- /**
5830
- * @beta
5831
- */
5832
5697
  export class PlayerLeaveBeforeEvent {
5833
5698
  private constructor();
5834
5699
  readonly player: Player;
5835
5700
  }
5836
5701
 
5837
- /**
5838
- * @beta
5839
- */
5840
5702
  export class PlayerLeaveBeforeEventSignal {
5841
5703
  private constructor();
5842
5704
  /**
@@ -6830,7 +6692,6 @@ export class World {
6830
6692
  */
6831
6693
  readonly scoreboard: Scoreboard;
6832
6694
  /**
6833
- * @beta
6834
6695
  * @remarks
6835
6696
  * Clears the set of dynamic properties declared for this
6836
6697
  * behavior pack within the world.
@@ -6883,7 +6744,6 @@ export class World {
6883
6744
  */
6884
6745
  getDimension(dimensionId: string): Dimension;
6885
6746
  /**
6886
- * @beta
6887
6747
  * @remarks
6888
6748
  * Returns a property value.
6889
6749
  *
@@ -6950,7 +6810,6 @@ export class World {
6950
6810
  */
6951
6811
  getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
6952
6812
  /**
6953
- * @beta
6954
6813
  * @remarks
6955
6814
  * Gets a set of dynamic property identifiers that have been
6956
6815
  * set in this world.
@@ -6960,7 +6819,6 @@ export class World {
6960
6819
  */
6961
6820
  getDynamicPropertyIds(): string[];
6962
6821
  /**
6963
- * @beta
6964
6822
  * @remarks
6965
6823
  * Gets the total byte count of dynamic properties. This could
6966
6824
  * potentially be used for your own analytics to ensure you're
@@ -6969,7 +6827,6 @@ export class World {
6969
6827
  */
6970
6828
  getDynamicPropertyTotalByteCount(): number;
6971
6829
  /**
6972
- * @beta
6973
6830
  * @remarks
6974
6831
  * Returns an entity based on the provided id.
6975
6832
  *
@@ -7162,7 +7019,6 @@ export class World {
7162
7019
  */
7163
7020
  setDefaultSpawnLocation(spawnLocation: Vector3): void;
7164
7021
  /**
7165
- * @beta
7166
7022
  * @remarks
7167
7023
  * Sets a specified property to a value.
7168
7024
  *
@@ -7493,7 +7349,6 @@ export class WorldBeforeEvents {
7493
7349
  */
7494
7350
  readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
7495
7351
  /**
7496
- * @beta
7497
7352
  * @remarks
7498
7353
  * Fires when a player leaves the game.
7499
7354
  *
@@ -8201,8 +8056,7 @@ export interface RGB {
8201
8056
  /**
8202
8057
  * Represents a fully customizable color within Minecraft.
8203
8058
  */
8204
- // @ts-ignore Class inheritance allowed for native defined classes
8205
- export interface RGBA extends RGB {
8059
+ export interface RGBA {
8206
8060
  /**
8207
8061
  * @remarks
8208
8062
  * Determines a color's alpha (opacity) component. Valid values
@@ -8210,6 +8064,27 @@ export interface RGBA extends RGB {
8210
8064
  *
8211
8065
  */
8212
8066
  alpha: number;
8067
+ /**
8068
+ * @remarks
8069
+ * Determines a color's blue component. Valid values are
8070
+ * between 0 and 1.0.
8071
+ *
8072
+ */
8073
+ blue: number;
8074
+ /**
8075
+ * @remarks
8076
+ * Determines a color's green component. Valid values are
8077
+ * between 0 and 1.0.
8078
+ *
8079
+ */
8080
+ green: number;
8081
+ /**
8082
+ * @remarks
8083
+ * Determines a color's red component. Valid values are between
8084
+ * 0 and 1.0.
8085
+ *
8086
+ */
8087
+ red: number;
8213
8088
  }
8214
8089
 
8215
8090
  /**
@@ -8405,7 +8280,6 @@ export class LocationOutOfWorldBoundariesError extends Error {
8405
8280
  */
8406
8281
  export const MoonPhaseCount = 8;
8407
8282
  /**
8408
- * @beta
8409
8283
  * @remarks
8410
8284
  * How many times the server ticks per second of real time.
8411
8285
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.7.0-rc.1.20.60-preview.21",
3
+ "version": "1.7.0",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "dependencies": {
16
- "@minecraft/common": "^1.1.0-rc.1.20.60-preview.21"
16
+ "@minecraft/common": "^1.1.0"
17
17
  },
18
18
  "license": "MIT"
19
19
  }