@minecraft/server 1.0.0-beta.11940b24 → 1.0.0-beta.preview.1.19.50.20
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 +91 -142
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ```json
|
|
16
16
|
* {
|
|
17
17
|
* "module_name": "@minecraft/server",
|
|
18
|
-
* "version": "0.1.
|
|
18
|
+
* "version": "1.0.0-internal.preview.1.19.50.20"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
@@ -1909,26 +1909,6 @@ export class BlockProperties {
|
|
|
1909
1909
|
static readonly woodType = 'wood_type';
|
|
1910
1910
|
protected constructor();
|
|
1911
1911
|
}
|
|
1912
|
-
/**
|
|
1913
|
-
* Contains additional options for configuring a block raycast
|
|
1914
|
-
* query.
|
|
1915
|
-
*/
|
|
1916
|
-
export class BlockRaycastOptions {
|
|
1917
|
-
/**
|
|
1918
|
-
* If true, liquid blocks will be considered as blocks that
|
|
1919
|
-
* 'stop' the raycast.
|
|
1920
|
-
*/
|
|
1921
|
-
includeLiquidBlocks: boolean;
|
|
1922
|
-
/**
|
|
1923
|
-
* If true, passable blocks like vines and flowers will be
|
|
1924
|
-
* considered as blocks that 'stop' the raycast.
|
|
1925
|
-
*/
|
|
1926
|
-
includePassableBlocks: boolean;
|
|
1927
|
-
/**
|
|
1928
|
-
* Maximum distance, in blocks, to process the raycast.
|
|
1929
|
-
*/
|
|
1930
|
-
maxDistance: number;
|
|
1931
|
-
}
|
|
1932
1912
|
/**
|
|
1933
1913
|
* Represents a block that can play a record.
|
|
1934
1914
|
*/
|
|
@@ -2543,25 +2523,6 @@ export class Dimension {
|
|
|
2543
2523
|
* @throws This function can throw errors.
|
|
2544
2524
|
*/
|
|
2545
2525
|
getPlayers(getPlayers?: EntityQueryOptions): PlayerIterator;
|
|
2546
|
-
/**
|
|
2547
|
-
* @remarks
|
|
2548
|
-
* Runs a particular command from the context of the broader
|
|
2549
|
-
* dimension.
|
|
2550
|
-
* @param commandString
|
|
2551
|
-
* Command to run. Note that command strings should not start
|
|
2552
|
-
* with slash.
|
|
2553
|
-
* @returns
|
|
2554
|
-
* For commands that return data, returns a JSON structure with
|
|
2555
|
-
* command response values.
|
|
2556
|
-
* @throws This function can throw errors.
|
|
2557
|
-
* @example commands.js
|
|
2558
|
-
* ```typescript
|
|
2559
|
-
* world.getDimension("overworld").runCommand("say You got a new high score!");
|
|
2560
|
-
* world.getDimension("overworld").runCommand("scoreboard players set @p score 10");
|
|
2561
|
-
*
|
|
2562
|
-
* ```
|
|
2563
|
-
*/
|
|
2564
|
-
runCommand(commandString: string): any;
|
|
2565
2526
|
/**
|
|
2566
2527
|
* @remarks
|
|
2567
2528
|
* Runs a particular command asynchronously from the context of
|
|
@@ -2930,7 +2891,7 @@ export class Entity {
|
|
|
2930
2891
|
* Current location of the entity.
|
|
2931
2892
|
* @throws This property can throw when used.
|
|
2932
2893
|
*/
|
|
2933
|
-
readonly location:
|
|
2894
|
+
readonly location: IVec3;
|
|
2934
2895
|
/**
|
|
2935
2896
|
* Given name of the entity.
|
|
2936
2897
|
*/
|
|
@@ -3116,24 +3077,6 @@ export class Entity {
|
|
|
3116
3077
|
* @throws This function can throw errors.
|
|
3117
3078
|
*/
|
|
3118
3079
|
removeTag(tag: string): boolean;
|
|
3119
|
-
/**
|
|
3120
|
-
* @remarks
|
|
3121
|
-
* Runs a particular command from the context of this entity.
|
|
3122
|
-
* @param commandString
|
|
3123
|
-
* Command to run. Note that command strings should not start
|
|
3124
|
-
* with slash.
|
|
3125
|
-
* @returns
|
|
3126
|
-
* For commands that return data, returns a JSON structure with
|
|
3127
|
-
* command response values.
|
|
3128
|
-
* @throws This function can throw errors.
|
|
3129
|
-
* @example commands.js
|
|
3130
|
-
* ```typescript
|
|
3131
|
-
* entity.runCommand("say You got a new high score!");
|
|
3132
|
-
* entity.runCommand("scoreboard players set @p score 10");
|
|
3133
|
-
*
|
|
3134
|
-
* ```
|
|
3135
|
-
*/
|
|
3136
|
-
runCommand(commandString: string): any;
|
|
3137
3080
|
/**
|
|
3138
3081
|
* @remarks
|
|
3139
3082
|
* Runs a particular command asynchronously from the context of
|
|
@@ -3491,28 +3434,6 @@ export class EntityCreateEventSignal {
|
|
|
3491
3434
|
unsubscribe(callback: (arg: EntityCreateEvent) => void): void;
|
|
3492
3435
|
protected constructor();
|
|
3493
3436
|
}
|
|
3494
|
-
/**
|
|
3495
|
-
* Specifies additional filters that are used in registering a
|
|
3496
|
-
* data driven trigger event for entities.
|
|
3497
|
-
*/
|
|
3498
|
-
export class EntityDataDrivenTriggerEventOptions {
|
|
3499
|
-
/**
|
|
3500
|
-
* If this value is set, this event will only fire for entities
|
|
3501
|
-
* that match the entities within this collection.
|
|
3502
|
-
*/
|
|
3503
|
-
entities: Entity[];
|
|
3504
|
-
/**
|
|
3505
|
-
* If this value is set, this event will only fire if the
|
|
3506
|
-
* impacted entities' type matches this parameter.
|
|
3507
|
-
*/
|
|
3508
|
-
entityTypes: string[];
|
|
3509
|
-
/**
|
|
3510
|
-
* If this value is set, this event will only fire if the
|
|
3511
|
-
* impacted triggered event matches one of the events listed in
|
|
3512
|
-
* this parameter.
|
|
3513
|
-
*/
|
|
3514
|
-
eventTypes: string[];
|
|
3515
|
-
}
|
|
3516
3437
|
/**
|
|
3517
3438
|
* As part of the Ageable component, represents a set of items
|
|
3518
3439
|
* that can be fed to an entity and the rate at which that
|
|
@@ -3532,22 +3453,6 @@ export class EntityDefinitionFeedItem {
|
|
|
3532
3453
|
readonly item: string;
|
|
3533
3454
|
protected constructor();
|
|
3534
3455
|
}
|
|
3535
|
-
/**
|
|
3536
|
-
* Contains optional parameters for registering an entity
|
|
3537
|
-
* event.
|
|
3538
|
-
*/
|
|
3539
|
-
export class EntityEventOptions {
|
|
3540
|
-
/**
|
|
3541
|
-
* If this value is set, this event will only fire for entities
|
|
3542
|
-
* that match the entities within this collection.
|
|
3543
|
-
*/
|
|
3544
|
-
entities: Entity[];
|
|
3545
|
-
/**
|
|
3546
|
-
* If this value is set, this event will only fire if the
|
|
3547
|
-
* impacted entities' type matches this parameter.
|
|
3548
|
-
*/
|
|
3549
|
-
entityTypes: string[];
|
|
3550
|
-
}
|
|
3551
3456
|
/**
|
|
3552
3457
|
* When added, this component signifies that this entity
|
|
3553
3458
|
* doesn't take damage from fire.
|
|
@@ -6849,6 +6754,7 @@ export class Location {
|
|
|
6849
6754
|
export class MessageReceiveEvent {
|
|
6850
6755
|
readonly id: string;
|
|
6851
6756
|
readonly message: string;
|
|
6757
|
+
readonly player: Player;
|
|
6852
6758
|
readonly sourceType: MessageSourceType;
|
|
6853
6759
|
protected constructor();
|
|
6854
6760
|
}
|
|
@@ -12939,7 +12845,7 @@ export class Player extends Entity {
|
|
|
12939
12845
|
* Current location of the player.
|
|
12940
12846
|
* @throws This property can throw when used.
|
|
12941
12847
|
*/
|
|
12942
|
-
readonly location:
|
|
12848
|
+
readonly location: IVec3;
|
|
12943
12849
|
/**
|
|
12944
12850
|
* Name of the player.
|
|
12945
12851
|
* @throws This property can throw when used.
|
|
@@ -13135,24 +13041,6 @@ export class Player extends Entity {
|
|
|
13135
13041
|
* @throws This function can throw errors.
|
|
13136
13042
|
*/
|
|
13137
13043
|
removeTag(tag: string): boolean;
|
|
13138
|
-
/**
|
|
13139
|
-
* @remarks
|
|
13140
|
-
* Runs a particular command from the context of this player.
|
|
13141
|
-
* @param commandString
|
|
13142
|
-
* Command to run. Note that command strings should not start
|
|
13143
|
-
* with slash.
|
|
13144
|
-
* @returns
|
|
13145
|
-
* For commands that return data, returns a JSON structure with
|
|
13146
|
-
* command response values.
|
|
13147
|
-
* @throws This function can throw errors.
|
|
13148
|
-
* @example commands.js
|
|
13149
|
-
* ```typescript
|
|
13150
|
-
* player.runCommand("say You got a new high score!");
|
|
13151
|
-
* player.runCommand("scoreboard players set @s score 10");
|
|
13152
|
-
*
|
|
13153
|
-
* ```
|
|
13154
|
-
*/
|
|
13155
|
-
runCommand(commandString: string): any;
|
|
13156
13044
|
/**
|
|
13157
13045
|
* @remarks
|
|
13158
13046
|
* Runs a particular command asynchronously from the context of
|
|
@@ -13626,21 +13514,6 @@ export class ScoreboardObjective {
|
|
|
13626
13514
|
getScores(): ScoreboardScoreInfo[];
|
|
13627
13515
|
protected constructor();
|
|
13628
13516
|
}
|
|
13629
|
-
/**
|
|
13630
|
-
* Contains additional options for how a scoreboard should be
|
|
13631
|
-
* displayed within its display slot.
|
|
13632
|
-
*/
|
|
13633
|
-
export class ScoreboardObjectiveDisplayOptions {
|
|
13634
|
-
/**
|
|
13635
|
-
* Objective to be displayed.
|
|
13636
|
-
*/
|
|
13637
|
-
readonly objective: ScoreboardObjective;
|
|
13638
|
-
/**
|
|
13639
|
-
* The sort order to display the objective items within.
|
|
13640
|
-
*/
|
|
13641
|
-
readonly sortOrder: ObjectiveSortOrder;
|
|
13642
|
-
constructor(objective: ScoreboardObjective, sortOrder?: ObjectiveSortOrder);
|
|
13643
|
-
}
|
|
13644
13517
|
/**
|
|
13645
13518
|
* Contains a pair of a scoreboard participant and its
|
|
13646
13519
|
* respective score.
|
|
@@ -13753,12 +13626,16 @@ export class StringBlockProperty extends IBlockProperty {
|
|
|
13753
13626
|
* A class that provides system-level events and functions.
|
|
13754
13627
|
*/
|
|
13755
13628
|
export class System {
|
|
13629
|
+
readonly currentTick: number;
|
|
13756
13630
|
/**
|
|
13757
13631
|
* Contains a set of events that are applicable for the
|
|
13758
13632
|
* lifecycle of items in the Minecraft system.
|
|
13759
13633
|
*/
|
|
13760
13634
|
readonly events: SystemEvents;
|
|
13761
|
-
|
|
13635
|
+
clearRun(runId: number): void;
|
|
13636
|
+
clearRunSchedule(runScheduleId: number): void;
|
|
13637
|
+
run(callback: () => void, tickDelay?: number): number;
|
|
13638
|
+
runSchedule(callback: () => void, tickInterval?: number): number;
|
|
13762
13639
|
protected constructor();
|
|
13763
13640
|
}
|
|
13764
13641
|
/**
|
|
@@ -13875,7 +13752,7 @@ export class Vector {
|
|
|
13875
13752
|
* @param a
|
|
13876
13753
|
* @param b
|
|
13877
13754
|
*/
|
|
13878
|
-
static add(a:
|
|
13755
|
+
static add(a: IVec3, b: IVec3): Vector;
|
|
13879
13756
|
/**
|
|
13880
13757
|
* @remarks
|
|
13881
13758
|
* Creates a new instance of an abstract vector.
|
|
@@ -13893,21 +13770,21 @@ export class Vector {
|
|
|
13893
13770
|
* @param a
|
|
13894
13771
|
* @param b
|
|
13895
13772
|
*/
|
|
13896
|
-
static cross(a:
|
|
13773
|
+
static cross(a: IVec3, b: IVec3): Vector;
|
|
13897
13774
|
/**
|
|
13898
13775
|
* @remarks
|
|
13899
13776
|
* Returns the distance between two vectors.
|
|
13900
13777
|
* @param a
|
|
13901
13778
|
* @param b
|
|
13902
13779
|
*/
|
|
13903
|
-
static distance(a:
|
|
13780
|
+
static distance(a: IVec3, b: IVec3): number;
|
|
13904
13781
|
/**
|
|
13905
13782
|
* @remarks
|
|
13906
13783
|
* Returns the component-wise division of these vectors.
|
|
13907
13784
|
* @param a
|
|
13908
13785
|
* @param b
|
|
13909
13786
|
*/
|
|
13910
|
-
static divide(a:
|
|
13787
|
+
static divide(a: IVec3, b: number | IVec3): Vector;
|
|
13911
13788
|
/**
|
|
13912
13789
|
* @remarks
|
|
13913
13790
|
* Compares this vector and another vector to one another.
|
|
@@ -13935,7 +13812,7 @@ export class Vector {
|
|
|
13935
13812
|
* @param b
|
|
13936
13813
|
* @param t
|
|
13937
13814
|
*/
|
|
13938
|
-
static lerp(a:
|
|
13815
|
+
static lerp(a: IVec3, b: IVec3, t: number): Vector;
|
|
13939
13816
|
/**
|
|
13940
13817
|
* @remarks
|
|
13941
13818
|
* Returns a vector that is made from the largest components of
|
|
@@ -13943,7 +13820,7 @@ export class Vector {
|
|
|
13943
13820
|
* @param a
|
|
13944
13821
|
* @param b
|
|
13945
13822
|
*/
|
|
13946
|
-
static max(a:
|
|
13823
|
+
static max(a: IVec3, b: IVec3): Vector;
|
|
13947
13824
|
/**
|
|
13948
13825
|
* @remarks
|
|
13949
13826
|
* Returns a vector that is made from the smallest components
|
|
@@ -13951,14 +13828,14 @@ export class Vector {
|
|
|
13951
13828
|
* @param a
|
|
13952
13829
|
* @param b
|
|
13953
13830
|
*/
|
|
13954
|
-
static min(a:
|
|
13831
|
+
static min(a: IVec3, b: IVec3): Vector;
|
|
13955
13832
|
/**
|
|
13956
13833
|
* @remarks
|
|
13957
13834
|
* Returns the component-wise product of these vectors.
|
|
13958
13835
|
* @param a
|
|
13959
13836
|
* @param b
|
|
13960
13837
|
*/
|
|
13961
|
-
static multiply(a:
|
|
13838
|
+
static multiply(a: IVec3, b: number | IVec3): Vector;
|
|
13962
13839
|
/**
|
|
13963
13840
|
* @remarks
|
|
13964
13841
|
* Returns this vector as a normalized vector.
|
|
@@ -13972,14 +13849,14 @@ export class Vector {
|
|
|
13972
13849
|
* @param b
|
|
13973
13850
|
* @param s
|
|
13974
13851
|
*/
|
|
13975
|
-
static slerp(a:
|
|
13852
|
+
static slerp(a: IVec3, b: IVec3, s: number): Vector;
|
|
13976
13853
|
/**
|
|
13977
13854
|
* @remarks
|
|
13978
13855
|
* Returns the subtraction of these vectors.
|
|
13979
13856
|
* @param a
|
|
13980
13857
|
* @param b
|
|
13981
13858
|
*/
|
|
13982
|
-
static subtract(a:
|
|
13859
|
+
static subtract(a: IVec3, b: IVec3): Vector;
|
|
13983
13860
|
}
|
|
13984
13861
|
/**
|
|
13985
13862
|
* Contains information related to changes in weather in the
|
|
@@ -14187,6 +14064,64 @@ export class XYRotation {
|
|
|
14187
14064
|
y: number;
|
|
14188
14065
|
protected constructor();
|
|
14189
14066
|
}
|
|
14067
|
+
/**
|
|
14068
|
+
* Contains additional options for configuring a block raycast
|
|
14069
|
+
* query.
|
|
14070
|
+
*/
|
|
14071
|
+
export interface BlockRaycastOptions {
|
|
14072
|
+
/**
|
|
14073
|
+
* If true, liquid blocks will be considered as blocks that
|
|
14074
|
+
* 'stop' the raycast.
|
|
14075
|
+
*/
|
|
14076
|
+
includeLiquidBlocks?: boolean;
|
|
14077
|
+
/**
|
|
14078
|
+
* If true, passable blocks like vines and flowers will be
|
|
14079
|
+
* considered as blocks that 'stop' the raycast.
|
|
14080
|
+
*/
|
|
14081
|
+
includePassableBlocks?: boolean;
|
|
14082
|
+
/**
|
|
14083
|
+
* Maximum distance, in blocks, to process the raycast.
|
|
14084
|
+
*/
|
|
14085
|
+
maxDistance?: number;
|
|
14086
|
+
}
|
|
14087
|
+
/**
|
|
14088
|
+
* Specifies additional filters that are used in registering a
|
|
14089
|
+
* data driven trigger event for entities.
|
|
14090
|
+
*/
|
|
14091
|
+
export interface EntityDataDrivenTriggerEventOptions {
|
|
14092
|
+
/**
|
|
14093
|
+
* If this value is set, this event will only fire for entities
|
|
14094
|
+
* that match the entities within this collection.
|
|
14095
|
+
*/
|
|
14096
|
+
entities?: Entity[];
|
|
14097
|
+
/**
|
|
14098
|
+
* If this value is set, this event will only fire if the
|
|
14099
|
+
* impacted entities' type matches this parameter.
|
|
14100
|
+
*/
|
|
14101
|
+
entityTypes?: string[];
|
|
14102
|
+
/**
|
|
14103
|
+
* If this value is set, this event will only fire if the
|
|
14104
|
+
* impacted triggered event matches one of the events listed in
|
|
14105
|
+
* this parameter.
|
|
14106
|
+
*/
|
|
14107
|
+
eventTypes?: string[];
|
|
14108
|
+
}
|
|
14109
|
+
/**
|
|
14110
|
+
* Contains optional parameters for registering an entity
|
|
14111
|
+
* event.
|
|
14112
|
+
*/
|
|
14113
|
+
export interface EntityEventOptions {
|
|
14114
|
+
/**
|
|
14115
|
+
* If this value is set, this event will only fire for entities
|
|
14116
|
+
* that match the entities within this collection.
|
|
14117
|
+
*/
|
|
14118
|
+
entities?: Entity[];
|
|
14119
|
+
/**
|
|
14120
|
+
* If this value is set, this event will only fire if the
|
|
14121
|
+
* impacted entities' type matches this parameter.
|
|
14122
|
+
*/
|
|
14123
|
+
entityTypes?: string[];
|
|
14124
|
+
}
|
|
14190
14125
|
/**
|
|
14191
14126
|
* Contains options for selecting entities within an area.
|
|
14192
14127
|
*/
|
|
@@ -14398,6 +14333,20 @@ export interface MusicOptions {
|
|
|
14398
14333
|
*/
|
|
14399
14334
|
volume?: number;
|
|
14400
14335
|
}
|
|
14336
|
+
/**
|
|
14337
|
+
* Contains additional options for how a scoreboard should be
|
|
14338
|
+
* displayed within its display slot.
|
|
14339
|
+
*/
|
|
14340
|
+
export interface ScoreboardObjectiveDisplayOptions {
|
|
14341
|
+
/**
|
|
14342
|
+
* Objective to be displayed.
|
|
14343
|
+
*/
|
|
14344
|
+
objective: ScoreboardObjective;
|
|
14345
|
+
/**
|
|
14346
|
+
* The sort order to display the objective items within.
|
|
14347
|
+
*/
|
|
14348
|
+
sortOrder?: ObjectiveSortOrder;
|
|
14349
|
+
}
|
|
14401
14350
|
/**
|
|
14402
14351
|
* Additional configuration options for the {@link
|
|
14403
14352
|
* Player.playSound}/{@link World.playSound} method.
|