@minecraft/server 2.7.0-rc.1.26.20-preview.22 → 2.7.0-rc.1.26.20-preview.23
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 +39 -12
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -8409,6 +8409,27 @@ export class Entity {
|
|
|
8409
8409
|
* ```
|
|
8410
8410
|
*/
|
|
8411
8411
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
8412
|
+
/**
|
|
8413
|
+
* @rc
|
|
8414
|
+
* @remarks
|
|
8415
|
+
* Adds an item to the entity's inventory.
|
|
8416
|
+
*
|
|
8417
|
+
* This function can't be called in restricted-execution mode.
|
|
8418
|
+
*
|
|
8419
|
+
* @returns
|
|
8420
|
+
* Returns undefined if the item was fully added or returns an
|
|
8421
|
+
* ItemStack with the remaining count.
|
|
8422
|
+
* @throws This function can throw errors.
|
|
8423
|
+
*
|
|
8424
|
+
* {@link ContainerRulesError}
|
|
8425
|
+
*
|
|
8426
|
+
* {@link Error}
|
|
8427
|
+
*
|
|
8428
|
+
* {@link InvalidEntityComponentError}
|
|
8429
|
+
*
|
|
8430
|
+
* {@link InvalidEntityError}
|
|
8431
|
+
*/
|
|
8432
|
+
addItem(itemStack: ItemStack): ItemStack | undefined;
|
|
8412
8433
|
/**
|
|
8413
8434
|
* @remarks
|
|
8414
8435
|
* Adds a specified tag to an entity.
|
|
@@ -22306,9 +22327,8 @@ export interface EntityHurtBeforeEventOptions {
|
|
|
22306
22327
|
|
|
22307
22328
|
/**
|
|
22308
22329
|
* An interface that is passed into {@link
|
|
22309
|
-
*
|
|
22310
|
-
*
|
|
22311
|
-
* callback.
|
|
22330
|
+
* EntityItemDropAfterEventSignal.subscribe} that filters out
|
|
22331
|
+
* which events are passed to the provided callback.
|
|
22312
22332
|
*/
|
|
22313
22333
|
export interface EntityItemDropEventOptions {
|
|
22314
22334
|
/**
|
|
@@ -22329,11 +22349,9 @@ export interface EntityItemDropEventOptions {
|
|
|
22329
22349
|
|
|
22330
22350
|
/**
|
|
22331
22351
|
* An interface that is passed into {@link
|
|
22332
|
-
*
|
|
22333
|
-
*
|
|
22334
|
-
*
|
|
22335
|
-
* that filters out which events are passed to the provided
|
|
22336
|
-
* callback.
|
|
22352
|
+
* EntityItemPickupAfterEventSignal.subscribe} and {@link
|
|
22353
|
+
* EntityItemPickupBeforeEventSignal.subscribe} that filters
|
|
22354
|
+
* out which events are passed to the provided callback.
|
|
22337
22355
|
*/
|
|
22338
22356
|
export interface EntityItemPickupEventOptions {
|
|
22339
22357
|
/**
|
|
@@ -22810,9 +22828,8 @@ export interface HotbarEventOptions {
|
|
|
22810
22828
|
|
|
22811
22829
|
/**
|
|
22812
22830
|
* An interface that is passed into {@link
|
|
22813
|
-
*
|
|
22814
|
-
*
|
|
22815
|
-
* callback.
|
|
22831
|
+
* PlayerButtonInputAfterEventSignal.subscribe} that filters
|
|
22832
|
+
* out which events are passed to the provided callback.
|
|
22816
22833
|
*/
|
|
22817
22834
|
export interface InputEventOptions {
|
|
22818
22835
|
/**
|
|
@@ -23177,7 +23194,7 @@ export interface PlayerSoundOptions {
|
|
|
23177
23194
|
|
|
23178
23195
|
/**
|
|
23179
23196
|
* An interface that is passed into {@link
|
|
23180
|
-
* @minecraft/
|
|
23197
|
+
* @minecraft/server.PlayerSwingStartAfterEvent.subscribe} that
|
|
23181
23198
|
* filters out which events are passed to the provided
|
|
23182
23199
|
* callback.
|
|
23183
23200
|
*/
|
|
@@ -24079,6 +24096,16 @@ export class InvalidContainerSlotError extends Error {
|
|
|
24079
24096
|
private constructor();
|
|
24080
24097
|
}
|
|
24081
24098
|
|
|
24099
|
+
/**
|
|
24100
|
+
* @rc
|
|
24101
|
+
* This error can occur when accessing components on an entity
|
|
24102
|
+
* that doesn't have them.
|
|
24103
|
+
*/
|
|
24104
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24105
|
+
export class InvalidEntityComponentError extends Error {
|
|
24106
|
+
private constructor();
|
|
24107
|
+
}
|
|
24108
|
+
|
|
24082
24109
|
/**
|
|
24083
24110
|
* The error called when an entity is invalid. This can occur
|
|
24084
24111
|
* 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.23",
|
|
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.23"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|