@minecraft/server 1.9.0-rc.1.20.80-preview.21 → 1.9.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.
- package/index.d.ts +1 -65
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -15,40 +15,35 @@
|
|
|
15
15
|
* ```json
|
|
16
16
|
* {
|
|
17
17
|
* "module_name": "@minecraft/server",
|
|
18
|
-
* "version": "1.
|
|
18
|
+
* "version": "1.9.0"
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
import * as minecraftcommon from '@minecraft/common';
|
|
24
24
|
/**
|
|
25
|
-
* @beta
|
|
26
25
|
* An enumeration describing the state of a block piston.
|
|
27
26
|
*/
|
|
28
27
|
export enum BlockPistonState {
|
|
29
28
|
/**
|
|
30
|
-
* @beta
|
|
31
29
|
* @remarks
|
|
32
30
|
* Whether the piston is fully expanded.
|
|
33
31
|
*
|
|
34
32
|
*/
|
|
35
33
|
Expanded = 'Expanded',
|
|
36
34
|
/**
|
|
37
|
-
* @beta
|
|
38
35
|
* @remarks
|
|
39
36
|
* Whether the piston is in the process of expanding.
|
|
40
37
|
*
|
|
41
38
|
*/
|
|
42
39
|
Expanding = 'Expanding',
|
|
43
40
|
/**
|
|
44
|
-
* @beta
|
|
45
41
|
* @remarks
|
|
46
42
|
* Whether the piston is fully retracted.
|
|
47
43
|
*
|
|
48
44
|
*/
|
|
49
45
|
Retracted = 'Retracted',
|
|
50
46
|
/**
|
|
51
|
-
* @beta
|
|
52
47
|
* @remarks
|
|
53
48
|
* Whether the piston is in the process of retracting.
|
|
54
49
|
*
|
|
@@ -123,117 +118,100 @@ export enum DisplaySlotId {
|
|
|
123
118
|
}
|
|
124
119
|
|
|
125
120
|
/**
|
|
126
|
-
* @beta
|
|
127
121
|
* Specifies different colors for use as dye.
|
|
128
122
|
*/
|
|
129
123
|
export enum DyeColor {
|
|
130
124
|
/**
|
|
131
|
-
* @beta
|
|
132
125
|
* @remarks
|
|
133
126
|
* Black dye color.
|
|
134
127
|
*
|
|
135
128
|
*/
|
|
136
129
|
Black = 'Black',
|
|
137
130
|
/**
|
|
138
|
-
* @beta
|
|
139
131
|
* @remarks
|
|
140
132
|
* Blue dye color.
|
|
141
133
|
*
|
|
142
134
|
*/
|
|
143
135
|
Blue = 'Blue',
|
|
144
136
|
/**
|
|
145
|
-
* @beta
|
|
146
137
|
* @remarks
|
|
147
138
|
* Brown dye color.
|
|
148
139
|
*
|
|
149
140
|
*/
|
|
150
141
|
Brown = 'Brown',
|
|
151
142
|
/**
|
|
152
|
-
* @beta
|
|
153
143
|
* @remarks
|
|
154
144
|
* Cyan dye color.
|
|
155
145
|
*
|
|
156
146
|
*/
|
|
157
147
|
Cyan = 'Cyan',
|
|
158
148
|
/**
|
|
159
|
-
* @beta
|
|
160
149
|
* @remarks
|
|
161
150
|
* Gray dye color.
|
|
162
151
|
*
|
|
163
152
|
*/
|
|
164
153
|
Gray = 'Gray',
|
|
165
154
|
/**
|
|
166
|
-
* @beta
|
|
167
155
|
* @remarks
|
|
168
156
|
* Green dye color.
|
|
169
157
|
*
|
|
170
158
|
*/
|
|
171
159
|
Green = 'Green',
|
|
172
160
|
/**
|
|
173
|
-
* @beta
|
|
174
161
|
* @remarks
|
|
175
162
|
* Light blue dye color.
|
|
176
163
|
*
|
|
177
164
|
*/
|
|
178
165
|
LightBlue = 'LightBlue',
|
|
179
166
|
/**
|
|
180
|
-
* @beta
|
|
181
167
|
* @remarks
|
|
182
168
|
* Lime dye color.
|
|
183
169
|
*
|
|
184
170
|
*/
|
|
185
171
|
Lime = 'Lime',
|
|
186
172
|
/**
|
|
187
|
-
* @beta
|
|
188
173
|
* @remarks
|
|
189
174
|
* Magenta dye color.
|
|
190
175
|
*
|
|
191
176
|
*/
|
|
192
177
|
Magenta = 'Magenta',
|
|
193
178
|
/**
|
|
194
|
-
* @beta
|
|
195
179
|
* @remarks
|
|
196
180
|
* Orange dye color.
|
|
197
181
|
*
|
|
198
182
|
*/
|
|
199
183
|
Orange = 'Orange',
|
|
200
184
|
/**
|
|
201
|
-
* @beta
|
|
202
185
|
* @remarks
|
|
203
186
|
* Pink dye color.
|
|
204
187
|
*
|
|
205
188
|
*/
|
|
206
189
|
Pink = 'Pink',
|
|
207
190
|
/**
|
|
208
|
-
* @beta
|
|
209
191
|
* @remarks
|
|
210
192
|
* Purple dye color.
|
|
211
193
|
*
|
|
212
194
|
*/
|
|
213
195
|
Purple = 'Purple',
|
|
214
196
|
/**
|
|
215
|
-
* @beta
|
|
216
197
|
* @remarks
|
|
217
198
|
* Red dye color.
|
|
218
199
|
*
|
|
219
200
|
*/
|
|
220
201
|
Red = 'Red',
|
|
221
202
|
/**
|
|
222
|
-
* @beta
|
|
223
203
|
* @remarks
|
|
224
204
|
* Silver dye color.
|
|
225
205
|
*
|
|
226
206
|
*/
|
|
227
207
|
Silver = 'Silver',
|
|
228
208
|
/**
|
|
229
|
-
* @beta
|
|
230
209
|
* @remarks
|
|
231
210
|
* White dye color.
|
|
232
211
|
*
|
|
233
212
|
*/
|
|
234
213
|
White = 'White',
|
|
235
214
|
/**
|
|
236
|
-
* @beta
|
|
237
215
|
* @remarks
|
|
238
216
|
* Yellow dye color.
|
|
239
217
|
*
|
|
@@ -823,19 +801,16 @@ export enum ScriptEventSource {
|
|
|
823
801
|
}
|
|
824
802
|
|
|
825
803
|
/**
|
|
826
|
-
* @beta
|
|
827
804
|
* Represents a side of a sign.
|
|
828
805
|
*/
|
|
829
806
|
export enum SignSide {
|
|
830
807
|
/**
|
|
831
|
-
* @beta
|
|
832
808
|
* @remarks
|
|
833
809
|
* The back of the sign.
|
|
834
810
|
*
|
|
835
811
|
*/
|
|
836
812
|
Back = 'Back',
|
|
837
813
|
/**
|
|
838
|
-
* @beta
|
|
839
814
|
* @remarks
|
|
840
815
|
* The front of the sign.
|
|
841
816
|
*
|
|
@@ -1305,7 +1280,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
1305
1280
|
export class BlockPermutation {
|
|
1306
1281
|
private constructor();
|
|
1307
1282
|
/**
|
|
1308
|
-
* @beta
|
|
1309
1283
|
* @remarks
|
|
1310
1284
|
* Returns all available block states associated with this
|
|
1311
1285
|
* block.
|
|
@@ -1402,7 +1376,6 @@ export class BlockPermutation {
|
|
|
1402
1376
|
}
|
|
1403
1377
|
|
|
1404
1378
|
/**
|
|
1405
|
-
* @beta
|
|
1406
1379
|
* When present, this block has piston-like behavior. Contains
|
|
1407
1380
|
* additional properties for discovering block piston state.
|
|
1408
1381
|
*/
|
|
@@ -1444,7 +1417,6 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
1444
1417
|
}
|
|
1445
1418
|
|
|
1446
1419
|
/**
|
|
1447
|
-
* @beta
|
|
1448
1420
|
* Represents a block that can display text on it.
|
|
1449
1421
|
* @example addTwoSidedSign.ts
|
|
1450
1422
|
* ```typescript
|
|
@@ -1676,7 +1648,6 @@ export class BlockSignComponent extends BlockComponent {
|
|
|
1676
1648
|
}
|
|
1677
1649
|
|
|
1678
1650
|
/**
|
|
1679
|
-
* @beta
|
|
1680
1651
|
* Enumerates all {@link BlockStateType}s.
|
|
1681
1652
|
*/
|
|
1682
1653
|
export class BlockStates {
|
|
@@ -1699,7 +1670,6 @@ export class BlockStates {
|
|
|
1699
1670
|
}
|
|
1700
1671
|
|
|
1701
1672
|
/**
|
|
1702
|
-
* @beta
|
|
1703
1673
|
* Represents a configurable state value of a block instance.
|
|
1704
1674
|
* For example, the facing direction of stairs is accessible as
|
|
1705
1675
|
* a block state.
|
|
@@ -1996,7 +1966,6 @@ export class Container {
|
|
|
1996
1966
|
*/
|
|
1997
1967
|
getItem(slot: number): ItemStack | undefined;
|
|
1998
1968
|
/**
|
|
1999
|
-
* @beta
|
|
2000
1969
|
* @remarks
|
|
2001
1970
|
* Returns a container slot. This acts as a reference to a slot
|
|
2002
1971
|
* at the given index for this container.
|
|
@@ -2138,7 +2107,6 @@ export class Container {
|
|
|
2138
2107
|
}
|
|
2139
2108
|
|
|
2140
2109
|
/**
|
|
2141
|
-
* @beta
|
|
2142
2110
|
* Represents a slot within a broader container (e.g., entity
|
|
2143
2111
|
* inventory.)
|
|
2144
2112
|
*/
|
|
@@ -2562,7 +2530,6 @@ export class Dimension {
|
|
|
2562
2530
|
*/
|
|
2563
2531
|
readonly id: string;
|
|
2564
2532
|
/**
|
|
2565
|
-
* @beta
|
|
2566
2533
|
* @remarks
|
|
2567
2534
|
* Creates an explosion at the specified location.
|
|
2568
2535
|
*
|
|
@@ -2920,7 +2887,6 @@ export class Dimension {
|
|
|
2920
2887
|
}
|
|
2921
2888
|
|
|
2922
2889
|
/**
|
|
2923
|
-
* @beta
|
|
2924
2890
|
* Represents a type of dimension.
|
|
2925
2891
|
*/
|
|
2926
2892
|
export class DimensionType {
|
|
@@ -2934,7 +2900,6 @@ export class DimensionType {
|
|
|
2934
2900
|
}
|
|
2935
2901
|
|
|
2936
2902
|
/**
|
|
2937
|
-
* @beta
|
|
2938
2903
|
* Used for accessing all available dimension types.
|
|
2939
2904
|
*/
|
|
2940
2905
|
export class DimensionTypes {
|
|
@@ -3127,7 +3092,6 @@ export class EffectType {
|
|
|
3127
3092
|
}
|
|
3128
3093
|
|
|
3129
3094
|
/**
|
|
3130
|
-
* @beta
|
|
3131
3095
|
* Represents a type of effect - like poison - that can be
|
|
3132
3096
|
* applied to an entity.
|
|
3133
3097
|
*/
|
|
@@ -3497,7 +3461,6 @@ export class Entity {
|
|
|
3497
3461
|
*/
|
|
3498
3462
|
clearVelocity(): void;
|
|
3499
3463
|
/**
|
|
3500
|
-
* @beta
|
|
3501
3464
|
* @remarks
|
|
3502
3465
|
* Extinguishes the fire if the entity is on fire. Note that
|
|
3503
3466
|
* you can call getComponent('minecraft:onfire') and, if
|
|
@@ -3807,7 +3770,6 @@ export class Entity {
|
|
|
3807
3770
|
*/
|
|
3808
3771
|
matches(options: EntityQueryOptions): boolean;
|
|
3809
3772
|
/**
|
|
3810
|
-
* @beta
|
|
3811
3773
|
* @remarks
|
|
3812
3774
|
* Cause the entity to play the given animation.
|
|
3813
3775
|
*
|
|
@@ -3929,7 +3891,6 @@ export class Entity {
|
|
|
3929
3891
|
*/
|
|
3930
3892
|
setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void;
|
|
3931
3893
|
/**
|
|
3932
|
-
* @beta
|
|
3933
3894
|
* @remarks
|
|
3934
3895
|
* Sets an entity on fire (if it is not in water or rain). Note
|
|
3935
3896
|
* that you can call getComponent('minecraft:onfire') and, if
|
|
@@ -4354,7 +4315,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
4354
4315
|
*/
|
|
4355
4316
|
getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
|
|
4356
4317
|
/**
|
|
4357
|
-
* @beta
|
|
4358
4318
|
* @remarks
|
|
4359
4319
|
* Gets the ContainerSlot corresponding to the given
|
|
4360
4320
|
* EquipmentSlot.
|
|
@@ -5100,7 +5060,6 @@ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
|
5100
5060
|
}
|
|
5101
5061
|
|
|
5102
5062
|
/**
|
|
5103
|
-
* @beta
|
|
5104
5063
|
* When present on an entity, this entity is on fire.
|
|
5105
5064
|
* @example setEntityOnFire.ts
|
|
5106
5065
|
* ```typescript
|
|
@@ -5759,7 +5718,6 @@ export class ItemComponent extends Component {
|
|
|
5759
5718
|
}
|
|
5760
5719
|
|
|
5761
5720
|
/**
|
|
5762
|
-
* @beta
|
|
5763
5721
|
* When present on an item, this item can take damage in the
|
|
5764
5722
|
* process of being used. Note that this component only applies
|
|
5765
5723
|
* to data-driven items.
|
|
@@ -5813,7 +5771,6 @@ export class ItemDurabilityComponent extends ItemComponent {
|
|
|
5813
5771
|
}
|
|
5814
5772
|
|
|
5815
5773
|
/**
|
|
5816
|
-
* @beta
|
|
5817
5774
|
* When present on an item, this item is consumable by
|
|
5818
5775
|
* entities. Note that this component only applies to
|
|
5819
5776
|
* data-driven items.
|
|
@@ -6059,7 +6016,6 @@ export class ItemStack {
|
|
|
6059
6016
|
*/
|
|
6060
6017
|
constructor(itemType: ItemType | string, amount?: number);
|
|
6061
6018
|
/**
|
|
6062
|
-
* @beta
|
|
6063
6019
|
* @remarks
|
|
6064
6020
|
* Clears all dynamic properties that have been set on this
|
|
6065
6021
|
* item stack.
|
|
@@ -6137,7 +6093,6 @@ export class ItemStack {
|
|
|
6137
6093
|
*/
|
|
6138
6094
|
getComponents(): ItemComponent[];
|
|
6139
6095
|
/**
|
|
6140
|
-
* @beta
|
|
6141
6096
|
* @remarks
|
|
6142
6097
|
* Returns a property value.
|
|
6143
6098
|
*
|
|
@@ -6149,7 +6104,6 @@ export class ItemStack {
|
|
|
6149
6104
|
*/
|
|
6150
6105
|
getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
|
|
6151
6106
|
/**
|
|
6152
|
-
* @beta
|
|
6153
6107
|
* @remarks
|
|
6154
6108
|
* Returns the available set of dynamic property identifiers
|
|
6155
6109
|
* that have been used on this entity.
|
|
@@ -6159,7 +6113,6 @@ export class ItemStack {
|
|
|
6159
6113
|
*/
|
|
6160
6114
|
getDynamicPropertyIds(): string[];
|
|
6161
6115
|
/**
|
|
6162
|
-
* @beta
|
|
6163
6116
|
* @remarks
|
|
6164
6117
|
* Returns the total size, in bytes, of all the dynamic
|
|
6165
6118
|
* properties that are currently stored for this entity. This
|
|
@@ -6293,7 +6246,6 @@ export class ItemStack {
|
|
|
6293
6246
|
*/
|
|
6294
6247
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
6295
6248
|
/**
|
|
6296
|
-
* @beta
|
|
6297
6249
|
* @remarks
|
|
6298
6250
|
* Sets a specified property to a value. Note: This function
|
|
6299
6251
|
* only works with non-stackable items.
|
|
@@ -6949,7 +6901,6 @@ export class MolangVariableMap {
|
|
|
6949
6901
|
}
|
|
6950
6902
|
|
|
6951
6903
|
/**
|
|
6952
|
-
* @beta
|
|
6953
6904
|
* Contains information related to changes to a piston
|
|
6954
6905
|
* expanding or retracting.
|
|
6955
6906
|
* @example pistonAfterEvent.ts
|
|
@@ -6981,7 +6932,6 @@ export class PistonActivateAfterEvent extends BlockEvent {
|
|
|
6981
6932
|
}
|
|
6982
6933
|
|
|
6983
6934
|
/**
|
|
6984
|
-
* @beta
|
|
6985
6935
|
* Manages callbacks that are connected to piston activations.
|
|
6986
6936
|
* @example pistonAfterEvent.ts
|
|
6987
6937
|
* ```typescript
|
|
@@ -8833,7 +8783,6 @@ export class TripWireTripAfterEventSignal {
|
|
|
8833
8783
|
}
|
|
8834
8784
|
|
|
8835
8785
|
/**
|
|
8836
|
-
* @beta
|
|
8837
8786
|
* Contains information related to changes in weather in the
|
|
8838
8787
|
* environment.
|
|
8839
8788
|
*/
|
|
@@ -8860,7 +8809,6 @@ export class WeatherChangeAfterEvent {
|
|
|
8860
8809
|
}
|
|
8861
8810
|
|
|
8862
8811
|
/**
|
|
8863
|
-
* @beta
|
|
8864
8812
|
* Manages callbacks that are connected to weather changing.
|
|
8865
8813
|
*/
|
|
8866
8814
|
export class WeatherChangeAfterEventSignal {
|
|
@@ -9401,7 +9349,6 @@ export class WorldAfterEvents {
|
|
|
9401
9349
|
*/
|
|
9402
9350
|
readonly dataDrivenEntityTrigger: DataDrivenEntityTriggerAfterEventSignal;
|
|
9403
9351
|
/**
|
|
9404
|
-
* @beta
|
|
9405
9352
|
* @remarks
|
|
9406
9353
|
* This event fires when an effect, like poisoning, is added to
|
|
9407
9354
|
* an entity.
|
|
@@ -9460,7 +9407,6 @@ export class WorldAfterEvents {
|
|
|
9460
9407
|
*/
|
|
9461
9408
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
9462
9409
|
/**
|
|
9463
|
-
* @beta
|
|
9464
9410
|
* @remarks
|
|
9465
9411
|
* This event is fired after an explosion occurs.
|
|
9466
9412
|
*
|
|
@@ -9530,7 +9476,6 @@ export class WorldAfterEvents {
|
|
|
9530
9476
|
*/
|
|
9531
9477
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
9532
9478
|
/**
|
|
9533
|
-
* @beta
|
|
9534
9479
|
* @remarks
|
|
9535
9480
|
* This event fires when a piston expands or retracts.
|
|
9536
9481
|
*
|
|
@@ -9615,7 +9560,6 @@ export class WorldAfterEvents {
|
|
|
9615
9560
|
*/
|
|
9616
9561
|
readonly tripWireTrip: TripWireTripAfterEventSignal;
|
|
9617
9562
|
/**
|
|
9618
|
-
* @beta
|
|
9619
9563
|
* @remarks
|
|
9620
9564
|
* This event will be triggered when the weather changes within
|
|
9621
9565
|
* Minecraft.
|
|
@@ -9634,7 +9578,6 @@ export class WorldAfterEvents {
|
|
|
9634
9578
|
export class WorldBeforeEvents {
|
|
9635
9579
|
private constructor();
|
|
9636
9580
|
/**
|
|
9637
|
-
* @beta
|
|
9638
9581
|
* @remarks
|
|
9639
9582
|
* This event is triggered after an event has been added to an
|
|
9640
9583
|
* entity.
|
|
@@ -9649,7 +9592,6 @@ export class WorldBeforeEvents {
|
|
|
9649
9592
|
*/
|
|
9650
9593
|
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
9651
9594
|
/**
|
|
9652
|
-
* @beta
|
|
9653
9595
|
* @remarks
|
|
9654
9596
|
* This event is fired after an explosion occurs.
|
|
9655
9597
|
*
|
|
@@ -10449,7 +10391,6 @@ export interface EntityRaycastOptions {
|
|
|
10449
10391
|
}
|
|
10450
10392
|
|
|
10451
10393
|
/**
|
|
10452
|
-
* @beta
|
|
10453
10394
|
* Additional configuration options for the {@link
|
|
10454
10395
|
* Dimension.createExplosion} method.
|
|
10455
10396
|
* @example createExplosions.ts
|
|
@@ -10524,7 +10465,6 @@ export interface MusicOptions {
|
|
|
10524
10465
|
}
|
|
10525
10466
|
|
|
10526
10467
|
/**
|
|
10527
|
-
* @beta
|
|
10528
10468
|
* Contains additional options for how an animation is played.
|
|
10529
10469
|
*/
|
|
10530
10470
|
export interface PlayAnimationOptions {
|
|
@@ -10709,7 +10649,6 @@ export interface RawMessageScore {
|
|
|
10709
10649
|
}
|
|
10710
10650
|
|
|
10711
10651
|
/**
|
|
10712
|
-
* @beta
|
|
10713
10652
|
* A `RawMessage` with only the `rawtext` property. When a
|
|
10714
10653
|
* `RawMessage` is serialized the contents are put into a
|
|
10715
10654
|
* rawtext property, so this is useful when reading saved
|
|
@@ -10966,9 +10905,6 @@ export class CommandError extends Error {
|
|
|
10966
10905
|
private constructor();
|
|
10967
10906
|
}
|
|
10968
10907
|
|
|
10969
|
-
/**
|
|
10970
|
-
* @beta
|
|
10971
|
-
*/
|
|
10972
10908
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10973
10909
|
export class InvalidContainerSlotError extends Error {
|
|
10974
10910
|
private constructor();
|