@minecraft/server 2.0.0-beta.1.21.80-preview.20 → 2.0.0-beta.1.21.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.
- package/index.d.ts +30 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2619,6 +2619,15 @@ export type EntityComponentTypeMap = {
|
|
|
2619
2619
|
wants_jockey: EntityWantsJockeyComponent;
|
|
2620
2620
|
};
|
|
2621
2621
|
|
|
2622
|
+
/**
|
|
2623
|
+
* @beta
|
|
2624
|
+
*/
|
|
2625
|
+
export type EntityIdentifierType<T> = [T] extends [never]
|
|
2626
|
+
? VanillaEntityIdentifier
|
|
2627
|
+
: T extends string
|
|
2628
|
+
? VanillaEntityIdentifier | T
|
|
2629
|
+
: never;
|
|
2630
|
+
|
|
2622
2631
|
/**
|
|
2623
2632
|
* @rc
|
|
2624
2633
|
*/
|
|
@@ -2646,6 +2655,15 @@ export type ItemComponentTypeMap = {
|
|
|
2646
2655
|
potion: ItemPotionComponent;
|
|
2647
2656
|
};
|
|
2648
2657
|
|
|
2658
|
+
/**
|
|
2659
|
+
* @beta
|
|
2660
|
+
*/
|
|
2661
|
+
export type VanillaEntityIdentifier =
|
|
2662
|
+
| EntityType
|
|
2663
|
+
| minecraftvanilladata.MinecraftEntityTypes
|
|
2664
|
+
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
2665
|
+
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
2666
|
+
|
|
2649
2667
|
/**
|
|
2650
2668
|
* @beta
|
|
2651
2669
|
* Handle to an aim-assist category that exists in the
|
|
@@ -3313,7 +3331,7 @@ export class Block {
|
|
|
3313
3331
|
* @remarks
|
|
3314
3332
|
* Checks to see whether it is valid to place the specified
|
|
3315
3333
|
* block type or block permutation, on a specified face on this
|
|
3316
|
-
* block
|
|
3334
|
+
* block.
|
|
3317
3335
|
*
|
|
3318
3336
|
* @param blockToPlace
|
|
3319
3337
|
* Block type or block permutation to check placement for.
|
|
@@ -7093,7 +7111,11 @@ export class Dimension {
|
|
|
7093
7111
|
* }
|
|
7094
7112
|
* ```
|
|
7095
7113
|
*/
|
|
7096
|
-
spawnEntity
|
|
7114
|
+
spawnEntity<T = never>(
|
|
7115
|
+
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
7116
|
+
location: Vector3,
|
|
7117
|
+
options?: SpawnEntityOptions,
|
|
7118
|
+
): Entity;
|
|
7097
7119
|
/**
|
|
7098
7120
|
* @remarks
|
|
7099
7121
|
* Creates a new item stack as an entity at the specified
|
|
@@ -9786,10 +9808,9 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
9786
9808
|
* @remarks
|
|
9787
9809
|
* Value of the mark variant value for this entity.
|
|
9788
9810
|
*
|
|
9789
|
-
* This property can
|
|
9790
|
-
*
|
|
9811
|
+
* @throws This property can throw when used.
|
|
9791
9812
|
*/
|
|
9792
|
-
value: number;
|
|
9813
|
+
readonly value: number;
|
|
9793
9814
|
static readonly componentId = 'minecraft:mark_variant';
|
|
9794
9815
|
}
|
|
9795
9816
|
|
|
@@ -11048,7 +11069,7 @@ export class EntityTypes {
|
|
|
11048
11069
|
* Retrieves an entity type using a string-based identifier.
|
|
11049
11070
|
*
|
|
11050
11071
|
*/
|
|
11051
|
-
static get(identifier:
|
|
11072
|
+
static get<T = never>(identifier: EntityIdentifierType<NoInfer<T>>): EntityType | undefined;
|
|
11052
11073
|
/**
|
|
11053
11074
|
* @remarks
|
|
11054
11075
|
* Retrieves a set of all entity types within this world.
|
|
@@ -13824,7 +13845,7 @@ export class Player extends Entity {
|
|
|
13824
13845
|
*/
|
|
13825
13846
|
addLevels(amount: number): number;
|
|
13826
13847
|
/**
|
|
13827
|
-
* @
|
|
13848
|
+
* @rc
|
|
13828
13849
|
* @remarks
|
|
13829
13850
|
* For this player, removes all overrides of any Entity
|
|
13830
13851
|
* Properties on the target Entity. This change is not applied
|
|
@@ -13983,7 +14004,7 @@ export class Player extends Entity {
|
|
|
13983
14004
|
*/
|
|
13984
14005
|
queueMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
13985
14006
|
/**
|
|
13986
|
-
* @
|
|
14007
|
+
* @rc
|
|
13987
14008
|
* @remarks
|
|
13988
14009
|
* For this player, removes the override on an Entity Property.
|
|
13989
14010
|
* This change is not applied until the next tick and will not
|
|
@@ -14124,7 +14145,7 @@ export class Player extends Entity {
|
|
|
14124
14145
|
*/
|
|
14125
14146
|
setOp(isOp: boolean): void;
|
|
14126
14147
|
/**
|
|
14127
|
-
* @
|
|
14148
|
+
* @rc
|
|
14128
14149
|
* @remarks
|
|
14129
14150
|
* For this player, overrides an Entity Property on the target
|
|
14130
14151
|
* Entity to the provided value. This property must be client
|