@minecraft/server 2.7.0-rc.1.26.20-preview.22 → 2.7.0-rc.1.26.20-preview.26
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 +48 -16
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -7808,26 +7808,30 @@ export class Dimension {
|
|
|
7808
7808
|
}
|
|
7809
7809
|
|
|
7810
7810
|
/**
|
|
7811
|
-
* Represents a type of dimension.
|
|
7811
|
+
* Represents a type of dimension. Currently only works with
|
|
7812
|
+
* Vanilla dimensions.
|
|
7812
7813
|
*/
|
|
7813
7814
|
export class DimensionType {
|
|
7814
7815
|
private constructor();
|
|
7815
7816
|
/**
|
|
7816
7817
|
* @remarks
|
|
7817
|
-
* Identifier of the dimension type.
|
|
7818
|
+
* Identifier of the dimension type. Currently only works with
|
|
7819
|
+
* Vanilla dimensions.
|
|
7818
7820
|
*
|
|
7819
7821
|
*/
|
|
7820
7822
|
readonly typeId: string;
|
|
7821
7823
|
}
|
|
7822
7824
|
|
|
7823
7825
|
/**
|
|
7824
|
-
* Used for accessing all available dimension types.
|
|
7826
|
+
* Used for accessing all available dimension types. Currently
|
|
7827
|
+
* only works with Vanilla dimensions.
|
|
7825
7828
|
*/
|
|
7826
7829
|
export class DimensionTypes {
|
|
7827
7830
|
private constructor();
|
|
7828
7831
|
/**
|
|
7829
7832
|
* @remarks
|
|
7830
7833
|
* Retrieves a dimension type using a string-based identifier.
|
|
7834
|
+
* Currently only works with Vanilla dimensions.
|
|
7831
7835
|
*
|
|
7832
7836
|
* This function can be called in early-execution mode.
|
|
7833
7837
|
*
|
|
@@ -7835,7 +7839,8 @@ export class DimensionTypes {
|
|
|
7835
7839
|
static get(dimensionTypeId: string): DimensionType | undefined;
|
|
7836
7840
|
/**
|
|
7837
7841
|
* @remarks
|
|
7838
|
-
* Retrieves an array of all dimension types.
|
|
7842
|
+
* Retrieves an array of all dimension types. Currently only
|
|
7843
|
+
* works with Vanilla dimensions.
|
|
7839
7844
|
*
|
|
7840
7845
|
* This function can be called in early-execution mode.
|
|
7841
7846
|
*
|
|
@@ -8409,6 +8414,27 @@ export class Entity {
|
|
|
8409
8414
|
* ```
|
|
8410
8415
|
*/
|
|
8411
8416
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
8417
|
+
/**
|
|
8418
|
+
* @rc
|
|
8419
|
+
* @remarks
|
|
8420
|
+
* Adds an item to the entity's inventory.
|
|
8421
|
+
*
|
|
8422
|
+
* This function can't be called in restricted-execution mode.
|
|
8423
|
+
*
|
|
8424
|
+
* @returns
|
|
8425
|
+
* Returns undefined if the item was fully added or returns an
|
|
8426
|
+
* ItemStack with the remaining count.
|
|
8427
|
+
* @throws This function can throw errors.
|
|
8428
|
+
*
|
|
8429
|
+
* {@link ContainerRulesError}
|
|
8430
|
+
*
|
|
8431
|
+
* {@link Error}
|
|
8432
|
+
*
|
|
8433
|
+
* {@link InvalidEntityComponentError}
|
|
8434
|
+
*
|
|
8435
|
+
* {@link InvalidEntityError}
|
|
8436
|
+
*/
|
|
8437
|
+
addItem(itemStack: ItemStack): ItemStack | undefined;
|
|
8412
8438
|
/**
|
|
8413
8439
|
* @remarks
|
|
8414
8440
|
* Adds a specified tag to an entity.
|
|
@@ -22306,9 +22332,8 @@ export interface EntityHurtBeforeEventOptions {
|
|
|
22306
22332
|
|
|
22307
22333
|
/**
|
|
22308
22334
|
* An interface that is passed into {@link
|
|
22309
|
-
*
|
|
22310
|
-
*
|
|
22311
|
-
* callback.
|
|
22335
|
+
* EntityItemDropAfterEventSignal.subscribe} that filters out
|
|
22336
|
+
* which events are passed to the provided callback.
|
|
22312
22337
|
*/
|
|
22313
22338
|
export interface EntityItemDropEventOptions {
|
|
22314
22339
|
/**
|
|
@@ -22329,11 +22354,9 @@ export interface EntityItemDropEventOptions {
|
|
|
22329
22354
|
|
|
22330
22355
|
/**
|
|
22331
22356
|
* An interface that is passed into {@link
|
|
22332
|
-
*
|
|
22333
|
-
*
|
|
22334
|
-
*
|
|
22335
|
-
* that filters out which events are passed to the provided
|
|
22336
|
-
* callback.
|
|
22357
|
+
* EntityItemPickupAfterEventSignal.subscribe} and {@link
|
|
22358
|
+
* EntityItemPickupBeforeEventSignal.subscribe} that filters
|
|
22359
|
+
* out which events are passed to the provided callback.
|
|
22337
22360
|
*/
|
|
22338
22361
|
export interface EntityItemPickupEventOptions {
|
|
22339
22362
|
/**
|
|
@@ -22810,9 +22833,8 @@ export interface HotbarEventOptions {
|
|
|
22810
22833
|
|
|
22811
22834
|
/**
|
|
22812
22835
|
* An interface that is passed into {@link
|
|
22813
|
-
*
|
|
22814
|
-
*
|
|
22815
|
-
* callback.
|
|
22836
|
+
* PlayerButtonInputAfterEventSignal.subscribe} that filters
|
|
22837
|
+
* out which events are passed to the provided callback.
|
|
22816
22838
|
*/
|
|
22817
22839
|
export interface InputEventOptions {
|
|
22818
22840
|
/**
|
|
@@ -23177,7 +23199,7 @@ export interface PlayerSoundOptions {
|
|
|
23177
23199
|
|
|
23178
23200
|
/**
|
|
23179
23201
|
* An interface that is passed into {@link
|
|
23180
|
-
* @minecraft/
|
|
23202
|
+
* @minecraft/server.PlayerSwingStartAfterEvent.subscribe} that
|
|
23181
23203
|
* filters out which events are passed to the provided
|
|
23182
23204
|
* callback.
|
|
23183
23205
|
*/
|
|
@@ -24079,6 +24101,16 @@ export class InvalidContainerSlotError extends Error {
|
|
|
24079
24101
|
private constructor();
|
|
24080
24102
|
}
|
|
24081
24103
|
|
|
24104
|
+
/**
|
|
24105
|
+
* @rc
|
|
24106
|
+
* This error can occur when accessing components on an entity
|
|
24107
|
+
* that doesn't have them.
|
|
24108
|
+
*/
|
|
24109
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24110
|
+
export class InvalidEntityComponentError extends Error {
|
|
24111
|
+
private constructor();
|
|
24112
|
+
}
|
|
24113
|
+
|
|
24082
24114
|
/**
|
|
24083
24115
|
* The error called when an entity is invalid. This can occur
|
|
24084
24116
|
* when accessing components on a removed entity.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.7.0-rc.1.26.20-preview.
|
|
3
|
+
"version": "2.7.0-rc.1.26.20-preview.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.2.0",
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.20-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.20-preview.26"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|