@minecraft/server 1.2.0-rc.1.20.0-preview.23 → 1.2.0-rc.1.20.0-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 (2) hide show
  1. package/index.d.ts +37 -2
  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.3.0-internal.1.20.0-preview.23"
19
+ * "version": "1.4.0-internal.1.20.0-preview.24"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -592,6 +592,9 @@ export class Entity {
592
592
  *
593
593
  * @param tag
594
594
  * Content of the tag to add.
595
+ * @returns
596
+ * Returns true if the tag was added successfully. This can
597
+ * fail if the tag already exists on the entity.
595
598
  * @throws This function can throw errors.
596
599
  */
597
600
  addTag(tag: string): boolean;
@@ -608,6 +611,10 @@ export class Entity {
608
611
  * Additional options about the source of damage, which may add
609
612
  * additional effects or spur additional behaviors on this
610
613
  * entity.
614
+ * @returns
615
+ * Whether the entity takes any damage. This can return false
616
+ * if the entity is invulnerable or if the damage applied is
617
+ * less than or equal to 0.
611
618
  * @throws This function can throw errors.
612
619
  */
613
620
  applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
@@ -665,6 +672,9 @@ export class Entity {
665
672
  * to retrieve. If no namespace prefix is specified,
666
673
  * 'minecraft:' is assumed. If the component is not present on
667
674
  * the entity, undefined is returned.
675
+ * @returns
676
+ * Returns the component if it exists on the entity, otherwise
677
+ * undefined.
668
678
  */
669
679
  getComponent(componentId: string): EntityComponent | undefined;
670
680
  /**
@@ -673,6 +683,9 @@ export class Entity {
673
683
  * Returns all components that are both present on this entity
674
684
  * and supported by the API.
675
685
  *
686
+ * @returns
687
+ * Returns all components that are both present on this entity
688
+ * and supported by the API.
676
689
  */
677
690
  getComponents(): EntityComponent[];
678
691
  /**
@@ -681,6 +694,9 @@ export class Entity {
681
694
  * Returns the current location of the head component of this
682
695
  * entity.
683
696
  *
697
+ * @returns
698
+ * Returns the current location of the head component of this
699
+ * entity.
684
700
  * @throws This function can throw errors.
685
701
  */
686
702
  getHeadLocation(): Vector3;
@@ -689,6 +705,8 @@ export class Entity {
689
705
  * @remarks
690
706
  * Returns all tags associated with an entity.
691
707
  *
708
+ * @returns
709
+ * Returns the current rotation component of this entity.
692
710
  * @throws This function can throw errors.
693
711
  */
694
712
  getTags(): string[];
@@ -697,6 +715,8 @@ export class Entity {
697
715
  * @remarks
698
716
  * Returns the current velocity vector of the entity.
699
717
  *
718
+ * @returns
719
+ * Returns the current velocity vector of the entity.
700
720
  * @throws This function can throw errors.
701
721
  */
702
722
  getVelocity(): Vector3;
@@ -705,6 +725,8 @@ export class Entity {
705
725
  * @remarks
706
726
  * Returns the current view direction of the entity.
707
727
  *
728
+ * @returns
729
+ * Returns the current view direction of the entity.
708
730
  * @throws This function can throw errors.
709
731
  */
710
732
  getViewDirection(): Vector3;
@@ -718,15 +740,20 @@ export class Entity {
718
740
  * The identifier of the component (e.g., 'minecraft:rideable')
719
741
  * to retrieve. If no namespace prefix is specified,
720
742
  * 'minecraft:' is assumed.
743
+ * @returns
744
+ * Returns true if the specified component is present on this
745
+ * entity.
721
746
  */
722
747
  hasComponent(componentId: string): boolean;
723
748
  /**
724
749
  * @beta
725
750
  * @remarks
726
- * Tests whether an entity has a particular tag.
751
+ * Returns whether an entity has a particular tag.
727
752
  *
728
753
  * @param tag
729
754
  * Identifier of the tag to test for.
755
+ * @returns
756
+ * Returns whether an entity has a particular tag.
730
757
  * @throws This function can throw errors.
731
758
  */
732
759
  hasTag(tag: string): boolean;
@@ -752,6 +779,8 @@ export class Entity {
752
779
  *
753
780
  * @param tag
754
781
  * Content of the tag to remove.
782
+ * @returns
783
+ * Returns whether the tag existed on the entity.
755
784
  * @throws This function can throw errors.
756
785
  */
757
786
  removeTag(tag: string): boolean;
@@ -762,6 +791,12 @@ export class Entity {
762
791
  *
763
792
  * This function can't be called in read-only mode.
764
793
  *
794
+ * @param commandString
795
+ * The command string. Note: This should not include a leading
796
+ * forward slash.
797
+ * @returns
798
+ * A command result containing whether the command was
799
+ * successful.
765
800
  * @throws This function can throw errors.
766
801
  */
767
802
  runCommand(commandString: string): CommandResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.2.0-rc.1.20.0-preview.23",
3
+ "version": "1.2.0-rc.1.20.0-preview.24",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {