@minecraft/server 2.13.0-beta.1.26.70-preview.22 → 2.13.0-beta.1.26.70-preview.24
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 +898 -159
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export enum AimAssistTargetMode {
|
|
|
47
47
|
* function Block.getComponent.
|
|
48
48
|
*/
|
|
49
49
|
export enum BlockComponentTypes {
|
|
50
|
+
/**
|
|
51
|
+
* @beta
|
|
52
|
+
*/
|
|
53
|
+
ClimbableProperties = 'minecraft:climbable',
|
|
50
54
|
DynamicProperties = 'minecraft:dynamic_properties',
|
|
51
55
|
/**
|
|
52
56
|
* @beta
|
|
@@ -96,11 +100,11 @@ export enum BlockComponentTypes {
|
|
|
96
100
|
*/
|
|
97
101
|
PrecipitationInteractions = 'minecraft:precipitation_interactions',
|
|
98
102
|
/**
|
|
99
|
-
* @
|
|
103
|
+
* @rc
|
|
100
104
|
*/
|
|
101
105
|
RecipeCrafting = 'minecraft:recipe_crafting',
|
|
102
106
|
/**
|
|
103
|
-
* @
|
|
107
|
+
* @rc
|
|
104
108
|
*/
|
|
105
109
|
RecipeProcessing = 'minecraft:recipe_processing',
|
|
106
110
|
/**
|
|
@@ -122,7 +126,7 @@ export enum BlockComponentTypes {
|
|
|
122
126
|
*/
|
|
123
127
|
Sign = 'minecraft:sign',
|
|
124
128
|
/**
|
|
125
|
-
* @
|
|
129
|
+
* @rc
|
|
126
130
|
*/
|
|
127
131
|
VibrationProperties = 'minecraft:vibration_properties',
|
|
128
132
|
}
|
|
@@ -2757,6 +2761,39 @@ export enum PlatformType {
|
|
|
2757
2761
|
Mobile = 'Mobile',
|
|
2758
2762
|
}
|
|
2759
2763
|
|
|
2764
|
+
/**
|
|
2765
|
+
* @beta
|
|
2766
|
+
* Describes what caused a player to change dimensions. Sent as
|
|
2767
|
+
* part of {@link PlayerDimensionChangeAfterEvent}.
|
|
2768
|
+
*/
|
|
2769
|
+
export enum PlayerDimensionChangeSource {
|
|
2770
|
+
/**
|
|
2771
|
+
* @remarks
|
|
2772
|
+
* The player respawned in another dimension after dying.
|
|
2773
|
+
*
|
|
2774
|
+
*/
|
|
2775
|
+
PlayerRespawn = 'PlayerRespawn',
|
|
2776
|
+
/**
|
|
2777
|
+
* @remarks
|
|
2778
|
+
* The player changed dimensions through a portal.
|
|
2779
|
+
*
|
|
2780
|
+
*/
|
|
2781
|
+
Portal = 'Portal',
|
|
2782
|
+
/**
|
|
2783
|
+
* @remarks
|
|
2784
|
+
* The player was teleported to another dimension by a command,
|
|
2785
|
+
* such as /tp or /execute, or by a script teleport.
|
|
2786
|
+
*
|
|
2787
|
+
*/
|
|
2788
|
+
TeleportCommand = 'TeleportCommand',
|
|
2789
|
+
/**
|
|
2790
|
+
* @remarks
|
|
2791
|
+
* The cause of the dimension change is not known.
|
|
2792
|
+
*
|
|
2793
|
+
*/
|
|
2794
|
+
Unknown = 'Unknown',
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2760
2797
|
/**
|
|
2761
2798
|
* Specifies the player inventory type.
|
|
2762
2799
|
*/
|
|
@@ -3194,6 +3231,106 @@ export enum TintMethod {
|
|
|
3194
3231
|
Water = 'Water',
|
|
3195
3232
|
}
|
|
3196
3233
|
|
|
3234
|
+
/**
|
|
3235
|
+
* @beta
|
|
3236
|
+
* Why a player's virtual container screen closed.
|
|
3237
|
+
*/
|
|
3238
|
+
export enum VirtualContainerCloseReason {
|
|
3239
|
+
/**
|
|
3240
|
+
* @remarks
|
|
3241
|
+
* The player closed the screen, or their device failed to show
|
|
3242
|
+
* it.
|
|
3243
|
+
*
|
|
3244
|
+
*/
|
|
3245
|
+
PlayerClosed = 'PlayerClosed',
|
|
3246
|
+
/**
|
|
3247
|
+
* @remarks
|
|
3248
|
+
* The player died while the screen was open.
|
|
3249
|
+
*
|
|
3250
|
+
*/
|
|
3251
|
+
PlayerDied = 'PlayerDied',
|
|
3252
|
+
/**
|
|
3253
|
+
* @remarks
|
|
3254
|
+
* The player left the game while the screen was open.
|
|
3255
|
+
*
|
|
3256
|
+
*/
|
|
3257
|
+
PlayerLeft = 'PlayerLeft',
|
|
3258
|
+
/**
|
|
3259
|
+
* @remarks
|
|
3260
|
+
* The player switched to spectator mode while the screen was
|
|
3261
|
+
* open.
|
|
3262
|
+
*
|
|
3263
|
+
*/
|
|
3264
|
+
PlayerSpectating = 'PlayerSpectating',
|
|
3265
|
+
/**
|
|
3266
|
+
* @remarks
|
|
3267
|
+
* The screen was closed by the server, for example by
|
|
3268
|
+
* VirtualContainer.close, or because the player changed
|
|
3269
|
+
* dimension.
|
|
3270
|
+
*
|
|
3271
|
+
*/
|
|
3272
|
+
ServerClosed = 'ServerClosed',
|
|
3273
|
+
/**
|
|
3274
|
+
* @remarks
|
|
3275
|
+
* The player's device did not show the screen because the
|
|
3276
|
+
* player was busy, for example with another menu, or was not
|
|
3277
|
+
* ready to show it. The screen was never shown; try opening it
|
|
3278
|
+
* again later.
|
|
3279
|
+
*
|
|
3280
|
+
*/
|
|
3281
|
+
UserBusy = 'UserBusy',
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* @beta
|
|
3286
|
+
* Reasons that the {@link VirtualContainerOpenError} was
|
|
3287
|
+
* thrown.
|
|
3288
|
+
*/
|
|
3289
|
+
export enum VirtualContainerOpenErrorReason {
|
|
3290
|
+
/**
|
|
3291
|
+
* @remarks
|
|
3292
|
+
* The player already has a container screen open, such as
|
|
3293
|
+
* their inventory, a chest or another virtual container. Try
|
|
3294
|
+
* again after they close it.
|
|
3295
|
+
*
|
|
3296
|
+
*/
|
|
3297
|
+
ContainerScreenOpen = 'ContainerScreenOpen',
|
|
3298
|
+
/**
|
|
3299
|
+
* @remarks
|
|
3300
|
+
* The player is dead. Try again after they respawn.
|
|
3301
|
+
*
|
|
3302
|
+
*/
|
|
3303
|
+
PlayerDead = 'PlayerDead',
|
|
3304
|
+
/**
|
|
3305
|
+
* @remarks
|
|
3306
|
+
* The player is still loading into the world, is changing
|
|
3307
|
+
* dimension, or is standing in a portal. Try again on a later
|
|
3308
|
+
* tick.
|
|
3309
|
+
*
|
|
3310
|
+
*/
|
|
3311
|
+
PlayerNotReady = 'PlayerNotReady',
|
|
3312
|
+
/**
|
|
3313
|
+
* @remarks
|
|
3314
|
+
* The player is sleeping. Try again after they wake up.
|
|
3315
|
+
*
|
|
3316
|
+
*/
|
|
3317
|
+
PlayerSleeping = 'PlayerSleeping',
|
|
3318
|
+
/**
|
|
3319
|
+
* @remarks
|
|
3320
|
+
* The player is in spectator mode.
|
|
3321
|
+
*
|
|
3322
|
+
*/
|
|
3323
|
+
PlayerSpectating = 'PlayerSpectating',
|
|
3324
|
+
/**
|
|
3325
|
+
* @remarks
|
|
3326
|
+
* The player's previous container screen is still closing.
|
|
3327
|
+
* Open the next container once the virtualContainerClose event
|
|
3328
|
+
* for the previous one arrives, or try again on a later tick.
|
|
3329
|
+
*
|
|
3330
|
+
*/
|
|
3331
|
+
PreviousScreenClosing = 'PreviousScreenClosing',
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3197
3334
|
/**
|
|
3198
3335
|
* @beta
|
|
3199
3336
|
* An enumeration with the reason that a watchdog is deciding
|
|
@@ -3278,6 +3415,7 @@ export type BlockComponentReturnType<T extends string> = T extends keyof BlockCo
|
|
|
3278
3415
|
: BlockCustomComponentInstance;
|
|
3279
3416
|
|
|
3280
3417
|
export type BlockComponentTypeMap = {
|
|
3418
|
+
climbable: BlockClimbablePropertiesComponent;
|
|
3281
3419
|
dynamic_properties: BlockDynamicPropertiesComponent;
|
|
3282
3420
|
entity_storage: BlockEntityStorageComponent;
|
|
3283
3421
|
fluid_container: BlockFluidContainerComponent;
|
|
@@ -3285,6 +3423,7 @@ export type BlockComponentTypeMap = {
|
|
|
3285
3423
|
inventory: BlockInventoryComponent;
|
|
3286
3424
|
item_frame: BlockItemFrameComponent;
|
|
3287
3425
|
map_color: BlockMapColorComponent;
|
|
3426
|
+
'minecraft:climbable': BlockClimbablePropertiesComponent;
|
|
3288
3427
|
'minecraft:dynamic_properties': BlockDynamicPropertiesComponent;
|
|
3289
3428
|
'minecraft:entity_storage': BlockEntityStorageComponent;
|
|
3290
3429
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
@@ -4398,7 +4537,7 @@ export class Block {
|
|
|
4398
4537
|
*/
|
|
4399
4538
|
east(steps?: number): Block | undefined;
|
|
4400
4539
|
/**
|
|
4401
|
-
* @
|
|
4540
|
+
* @rc
|
|
4402
4541
|
* @remarks
|
|
4403
4542
|
* Returns the named tick events scheduled at this block by the
|
|
4404
4543
|
* calling script pack.
|
|
@@ -4525,7 +4664,7 @@ export class Block {
|
|
|
4525
4664
|
*/
|
|
4526
4665
|
getRedstonePower(): number | undefined;
|
|
4527
4666
|
/**
|
|
4528
|
-
* @
|
|
4667
|
+
* @rc
|
|
4529
4668
|
* @remarks
|
|
4530
4669
|
* Returns the number of named tick events scheduled at this
|
|
4531
4670
|
* block, regardless of which script pack scheduled them.
|
|
@@ -4586,7 +4725,7 @@ export class Block {
|
|
|
4586
4725
|
*/
|
|
4587
4726
|
hasComponent(componentId: string): boolean;
|
|
4588
4727
|
/**
|
|
4589
|
-
* @
|
|
4728
|
+
* @rc
|
|
4590
4729
|
* @throws This function can throw errors.
|
|
4591
4730
|
*
|
|
4592
4731
|
* {@link LocationInUnloadedChunkError}
|
|
@@ -4735,7 +4874,7 @@ export class Block {
|
|
|
4735
4874
|
*/
|
|
4736
4875
|
offset(offset: Vector3): Block | undefined;
|
|
4737
4876
|
/**
|
|
4738
|
-
* @
|
|
4877
|
+
* @rc
|
|
4739
4878
|
* @remarks
|
|
4740
4879
|
* Removes all scheduled named tick events from this block with
|
|
4741
4880
|
* the specified event name.
|
|
@@ -4752,7 +4891,7 @@ export class Block {
|
|
|
4752
4891
|
*/
|
|
4753
4892
|
removeScheduledNamedTicks(eventName: string): void;
|
|
4754
4893
|
/**
|
|
4755
|
-
* @
|
|
4894
|
+
* @rc
|
|
4756
4895
|
* @remarks
|
|
4757
4896
|
* Schedules a named tick event for this block. The event will
|
|
4758
4897
|
* be delivered to block custom components registered with the
|
|
@@ -5012,6 +5151,44 @@ export class BlockBoundingBoxUtils {
|
|
|
5012
5151
|
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
5013
5152
|
}
|
|
5014
5153
|
|
|
5154
|
+
/**
|
|
5155
|
+
* @beta
|
|
5156
|
+
* Represents the climbable properties of a block with a
|
|
5157
|
+
* 'minecraft:climbable' component.
|
|
5158
|
+
*/
|
|
5159
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5160
|
+
export class BlockClimbablePropertiesComponent extends BlockComponent {
|
|
5161
|
+
private constructor();
|
|
5162
|
+
/**
|
|
5163
|
+
* @remarks
|
|
5164
|
+
* Returns whether an entity can climb this block when its feet
|
|
5165
|
+
* are sharing the same position as the block. Returns false
|
|
5166
|
+
* when the block does not define a 'minecraft:climbable'
|
|
5167
|
+
* component.
|
|
5168
|
+
*
|
|
5169
|
+
* @throws This property can throw when used.
|
|
5170
|
+
*
|
|
5171
|
+
* {@link LocationInUnloadedChunkError}
|
|
5172
|
+
*
|
|
5173
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
5174
|
+
*/
|
|
5175
|
+
readonly canClimb: boolean;
|
|
5176
|
+
/**
|
|
5177
|
+
* @remarks
|
|
5178
|
+
* Returns whether a player on this block can stop descending
|
|
5179
|
+
* and hold their position when sneaking. Returns false when
|
|
5180
|
+
* the block does not define a 'minecraft:climbable' component
|
|
5181
|
+
*
|
|
5182
|
+
* @throws This property can throw when used.
|
|
5183
|
+
*
|
|
5184
|
+
* {@link LocationInUnloadedChunkError}
|
|
5185
|
+
*
|
|
5186
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
5187
|
+
*/
|
|
5188
|
+
readonly canHoldPositionWhileSneaking: boolean;
|
|
5189
|
+
static readonly componentId = 'minecraft:climbable';
|
|
5190
|
+
}
|
|
5191
|
+
|
|
5015
5192
|
/**
|
|
5016
5193
|
* Base type for components associated with blocks.
|
|
5017
5194
|
*/
|
|
@@ -5119,7 +5296,7 @@ export class BlockComponentEntityFallOnEvent extends BlockEvent {
|
|
|
5119
5296
|
}
|
|
5120
5297
|
|
|
5121
5298
|
/**
|
|
5122
|
-
* @
|
|
5299
|
+
* @rc
|
|
5123
5300
|
* Contains information regarding a named tick event for a
|
|
5124
5301
|
* specific block.
|
|
5125
5302
|
*/
|
|
@@ -5145,7 +5322,7 @@ export class BlockComponentNamedTickEvent extends BlockEvent {
|
|
|
5145
5322
|
}
|
|
5146
5323
|
|
|
5147
5324
|
/**
|
|
5148
|
-
* @
|
|
5325
|
+
* @rc
|
|
5149
5326
|
* Contains information regarding neighboring block changes for
|
|
5150
5327
|
* a specific block.
|
|
5151
5328
|
*/
|
|
@@ -5590,9 +5767,11 @@ export class BlockDynamicPropertiesComponent extends BlockComponent {
|
|
|
5590
5767
|
* pack definition enables entity storage with the
|
|
5591
5768
|
* `minecraft:block_entity` component. Stored entities are
|
|
5592
5769
|
* serialized and removed from the world until they are
|
|
5593
|
-
* released or
|
|
5594
|
-
*
|
|
5595
|
-
* accessing
|
|
5770
|
+
* released, transferred, or permanently removed. A block can
|
|
5771
|
+
* store up to four entities across all content packs. Entity
|
|
5772
|
+
* storage operations are scoped to the content pack accessing
|
|
5773
|
+
* it, except for totalSize, which counts entities across all
|
|
5774
|
+
* content packs.
|
|
5596
5775
|
*/
|
|
5597
5776
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5598
5777
|
export class BlockEntityStorageComponent extends BlockComponent {
|
|
@@ -5653,6 +5832,34 @@ export class BlockEntityStorageComponent extends BlockComponent {
|
|
|
5653
5832
|
* {@link LocationOutOfWorldBoundariesError}
|
|
5654
5833
|
*/
|
|
5655
5834
|
release(entityId: string): Entity;
|
|
5835
|
+
/**
|
|
5836
|
+
* @remarks
|
|
5837
|
+
* Permanently removes a stored entity from the current content
|
|
5838
|
+
* pack's storage without releasing it into the world. No
|
|
5839
|
+
* entity, experience, or item drops are spawned.
|
|
5840
|
+
*
|
|
5841
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
5842
|
+
*
|
|
5843
|
+
* @param entityId
|
|
5844
|
+
* The unique ID of an entity stored by the current content
|
|
5845
|
+
* pack. Use the value returned by
|
|
5846
|
+
* {@link BlockEntityStorageComponent.store} or the `uniqueId`
|
|
5847
|
+
* property from {@link BlockEntityStorageInfo}.
|
|
5848
|
+
* @throws
|
|
5849
|
+
* Throws if the entity ID is invalid or does not identify an
|
|
5850
|
+
* entity stored by the current content pack, if the block
|
|
5851
|
+
* entity is invalid, or if the block's location is not loaded
|
|
5852
|
+
* or is outside the world boundaries.
|
|
5853
|
+
*
|
|
5854
|
+
* {@link Error}
|
|
5855
|
+
*
|
|
5856
|
+
* {@link InvalidBlockComponentError}
|
|
5857
|
+
*
|
|
5858
|
+
* {@link LocationInUnloadedChunkError}
|
|
5859
|
+
*
|
|
5860
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
5861
|
+
*/
|
|
5862
|
+
remove(entityId: string): void;
|
|
5656
5863
|
/**
|
|
5657
5864
|
* @remarks
|
|
5658
5865
|
* Returns the number of entities stored in this block's entity
|
|
@@ -5701,6 +5908,26 @@ export class BlockEntityStorageComponent extends BlockComponent {
|
|
|
5701
5908
|
* {@link LocationOutOfWorldBoundariesError}
|
|
5702
5909
|
*/
|
|
5703
5910
|
store(entity: Entity): string;
|
|
5911
|
+
/**
|
|
5912
|
+
* @remarks
|
|
5913
|
+
* Returns the total number of entities stored in this block's
|
|
5914
|
+
* entity storage across all content packs.
|
|
5915
|
+
*
|
|
5916
|
+
* @returns
|
|
5917
|
+
* The number of stored entities across all content packs.
|
|
5918
|
+
* @throws
|
|
5919
|
+
* Throws if the block entity is invalid or the block's
|
|
5920
|
+
* location is not loaded or is outside the world boundaries.
|
|
5921
|
+
*
|
|
5922
|
+
* {@link Error}
|
|
5923
|
+
*
|
|
5924
|
+
* {@link InvalidBlockComponentError}
|
|
5925
|
+
*
|
|
5926
|
+
* {@link LocationInUnloadedChunkError}
|
|
5927
|
+
*
|
|
5928
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
5929
|
+
*/
|
|
5930
|
+
totalSize(): number;
|
|
5704
5931
|
/**
|
|
5705
5932
|
* @remarks
|
|
5706
5933
|
* Moves a stored entity from this block's entity storage to
|
|
@@ -6264,7 +6491,7 @@ export class BlockPermutation {
|
|
|
6264
6491
|
* Gets a state for the permutation.
|
|
6265
6492
|
*
|
|
6266
6493
|
* @param stateName
|
|
6267
|
-
* Name of the block state
|
|
6494
|
+
* Name of the block state whose value is to be returned.
|
|
6268
6495
|
* @returns
|
|
6269
6496
|
* Returns the state if the permutation has it, else
|
|
6270
6497
|
* `undefined`.
|
|
@@ -6502,7 +6729,7 @@ export class BlockPrecipitationInteractionsComponent extends BlockComponent {
|
|
|
6502
6729
|
}
|
|
6503
6730
|
|
|
6504
6731
|
/**
|
|
6505
|
-
* @
|
|
6732
|
+
* @rc
|
|
6506
6733
|
* Represents a block component that provides access to recipe
|
|
6507
6734
|
* crafting.
|
|
6508
6735
|
*/
|
|
@@ -6537,7 +6764,7 @@ export class BlockRecipeCraftingComponent extends BlockComponent {
|
|
|
6537
6764
|
}
|
|
6538
6765
|
|
|
6539
6766
|
/**
|
|
6540
|
-
* @
|
|
6767
|
+
* @rc
|
|
6541
6768
|
* Represents a block component that provides access to recipe
|
|
6542
6769
|
* processing inputs and output.
|
|
6543
6770
|
*/
|
|
@@ -7057,7 +7284,7 @@ export class BlockTypes {
|
|
|
7057
7284
|
}
|
|
7058
7285
|
|
|
7059
7286
|
/**
|
|
7060
|
-
* @
|
|
7287
|
+
* @rc
|
|
7061
7288
|
* Represents the vibration properties of a block with a
|
|
7062
7289
|
* 'minecraft:vibration_properties' component.
|
|
7063
7290
|
*/
|
|
@@ -9436,7 +9663,7 @@ export class Dimension {
|
|
|
9436
9663
|
*
|
|
9437
9664
|
* {@link minecraftcommon.PropertyOutOfBoundsError}
|
|
9438
9665
|
*/
|
|
9439
|
-
playSound(soundId: string, location: Vector3, soundOptions?: WorldSoundOptions): SoundInstance;
|
|
9666
|
+
playSound(soundId: string, location: Entity | Vector3, soundOptions?: WorldSoundOptions): SoundInstance;
|
|
9440
9667
|
/**
|
|
9441
9668
|
* @remarks
|
|
9442
9669
|
* Runs a command synchronously using the context of the
|
|
@@ -15683,10 +15910,13 @@ export class ItemBlockDynamicPropertiesComponent extends ItemComponent {
|
|
|
15683
15910
|
* @beta
|
|
15684
15911
|
* Stores serialized non-player mobs on an item stack. Each
|
|
15685
15912
|
* calling behavior pack can only access its manifest UUID
|
|
15686
|
-
* bucket
|
|
15687
|
-
*
|
|
15688
|
-
*
|
|
15689
|
-
*
|
|
15913
|
+
* bucket, except for totalSize, which counts entities across
|
|
15914
|
+
* all packs. All buckets share a four-entity limit. Stored
|
|
15915
|
+
* entities can be permanently removed without spawning them.
|
|
15916
|
+
* Available on item stacks even when empty. Destroying the
|
|
15917
|
+
* item discards its storage without spawning entities. Data is
|
|
15918
|
+
* compatible with entity-storage block carry-over and
|
|
15919
|
+
* placement.
|
|
15690
15920
|
*/
|
|
15691
15921
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15692
15922
|
export class ItemBlockEntityStorageComponent extends ItemComponent {
|
|
@@ -15739,6 +15969,27 @@ export class ItemBlockEntityStorageComponent extends ItemComponent {
|
|
|
15739
15969
|
* {@link LocationOutOfWorldBoundariesError}
|
|
15740
15970
|
*/
|
|
15741
15971
|
release(entityId: string, location: DimensionLocation): Entity;
|
|
15972
|
+
/**
|
|
15973
|
+
* @remarks
|
|
15974
|
+
* Permanently removes a stored entity from the calling pack's
|
|
15975
|
+
* bucket without releasing it into the world. No entity,
|
|
15976
|
+
* experience, or item drops are spawned. The removal is saved
|
|
15977
|
+
* to the item stack.
|
|
15978
|
+
*
|
|
15979
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
15980
|
+
*
|
|
15981
|
+
* @param entityId
|
|
15982
|
+
* A stored entity ID in the calling pack's bucket.
|
|
15983
|
+
* @throws
|
|
15984
|
+
* Throws if the item stack or entity ID is invalid, or the
|
|
15985
|
+
* entity is not stored by the calling pack. Failed removals
|
|
15986
|
+
* preserve serialized storage.
|
|
15987
|
+
*
|
|
15988
|
+
* {@link Error}
|
|
15989
|
+
*
|
|
15990
|
+
* {@link InvalidItemStackError}
|
|
15991
|
+
*/
|
|
15992
|
+
remove(entityId: string): void;
|
|
15742
15993
|
/**
|
|
15743
15994
|
* @remarks
|
|
15744
15995
|
* Returns the number of serialized entities in the calling
|
|
@@ -15780,6 +16031,21 @@ export class ItemBlockEntityStorageComponent extends ItemComponent {
|
|
|
15780
16031
|
* {@link InvalidItemStackError}
|
|
15781
16032
|
*/
|
|
15782
16033
|
store(entity: Entity): string;
|
|
16034
|
+
/**
|
|
16035
|
+
* @remarks
|
|
16036
|
+
* Returns the total number of entities stored on this item
|
|
16037
|
+
* stack across all content packs.
|
|
16038
|
+
*
|
|
16039
|
+
* @returns
|
|
16040
|
+
* The number of stored entities across all content packs.
|
|
16041
|
+
* @throws
|
|
16042
|
+
* Throws if the item stack is invalid.
|
|
16043
|
+
*
|
|
16044
|
+
* {@link Error}
|
|
16045
|
+
*
|
|
16046
|
+
* {@link InvalidItemStackError}
|
|
16047
|
+
*/
|
|
16048
|
+
totalSize(): number;
|
|
15783
16049
|
/**
|
|
15784
16050
|
* @remarks
|
|
15785
16051
|
* Moves serialized ownership from the calling pack's item
|
|
@@ -16267,6 +16533,34 @@ export class ItemComponentRegistry {
|
|
|
16267
16533
|
registerCustomComponent(name: string, itemCustomComponent: ItemCustomComponent): void;
|
|
16268
16534
|
}
|
|
16269
16535
|
|
|
16536
|
+
/**
|
|
16537
|
+
* @beta
|
|
16538
|
+
* Contains information about the release of an item being used
|
|
16539
|
+
* through a custom item component.
|
|
16540
|
+
*/
|
|
16541
|
+
export class ItemComponentReleaseUseEvent {
|
|
16542
|
+
private constructor();
|
|
16543
|
+
/**
|
|
16544
|
+
* @remarks
|
|
16545
|
+
* The item stack that was released.
|
|
16546
|
+
*
|
|
16547
|
+
*/
|
|
16548
|
+
readonly itemStack: ItemStack;
|
|
16549
|
+
/**
|
|
16550
|
+
* @remarks
|
|
16551
|
+
* The remaining use duration, in ticks, when the item was
|
|
16552
|
+
* released.
|
|
16553
|
+
*
|
|
16554
|
+
*/
|
|
16555
|
+
readonly remainingUseDuration: number;
|
|
16556
|
+
/**
|
|
16557
|
+
* @remarks
|
|
16558
|
+
* The player who released the item.
|
|
16559
|
+
*
|
|
16560
|
+
*/
|
|
16561
|
+
readonly source: Player;
|
|
16562
|
+
}
|
|
16563
|
+
|
|
16270
16564
|
/**
|
|
16271
16565
|
* Contains information regarding the use of an item.
|
|
16272
16566
|
*/
|
|
@@ -19851,7 +20145,7 @@ export class PlayerCancelBreakingBlockAfterEventSignal {
|
|
|
19851
20145
|
}
|
|
19852
20146
|
|
|
19853
20147
|
/**
|
|
19854
|
-
* @
|
|
20148
|
+
* @rc
|
|
19855
20149
|
* Contains information regarding a player crafting a recipe.
|
|
19856
20150
|
*/
|
|
19857
20151
|
export class PlayerCraftRecipeAfterEvent {
|
|
@@ -19877,7 +20171,7 @@ export class PlayerCraftRecipeAfterEvent {
|
|
|
19877
20171
|
}
|
|
19878
20172
|
|
|
19879
20173
|
/**
|
|
19880
|
-
* @
|
|
20174
|
+
* @rc
|
|
19881
20175
|
* Manages callbacks that are connected to when a player crafts
|
|
19882
20176
|
* a recipe.
|
|
19883
20177
|
*/
|
|
@@ -19944,7 +20238,7 @@ export class PlayerCursorInventoryComponent extends EntityComponent {
|
|
|
19944
20238
|
}
|
|
19945
20239
|
|
|
19946
20240
|
/**
|
|
19947
|
-
* @
|
|
20241
|
+
* @rc
|
|
19948
20242
|
* Contains information about an item moved from a container to
|
|
19949
20243
|
* a player's cursor.
|
|
19950
20244
|
*/
|
|
@@ -19965,7 +20259,7 @@ export class PlayerCursorItemGrabAfterEvent {
|
|
|
19965
20259
|
}
|
|
19966
20260
|
|
|
19967
20261
|
/**
|
|
19968
|
-
* @
|
|
20262
|
+
* @rc
|
|
19969
20263
|
* Manages callbacks for items grabbed from a container to a
|
|
19970
20264
|
* player's cursor.
|
|
19971
20265
|
*/
|
|
@@ -19999,7 +20293,7 @@ export class PlayerCursorItemGrabAfterEventSignal {
|
|
|
19999
20293
|
}
|
|
20000
20294
|
|
|
20001
20295
|
/**
|
|
20002
|
-
* @
|
|
20296
|
+
* @rc
|
|
20003
20297
|
* Contains information about an item moved from a player's
|
|
20004
20298
|
* cursor to a container.
|
|
20005
20299
|
*/
|
|
@@ -20020,7 +20314,7 @@ export class PlayerCursorItemReleaseAfterEvent {
|
|
|
20020
20314
|
}
|
|
20021
20315
|
|
|
20022
20316
|
/**
|
|
20023
|
-
* @
|
|
20317
|
+
* @rc
|
|
20024
20318
|
* Manages callbacks for items released from a player's cursor
|
|
20025
20319
|
* to a container.
|
|
20026
20320
|
*/
|
|
@@ -20079,6 +20373,14 @@ export class PlayerDimensionChangeAfterEvent {
|
|
|
20079
20373
|
*
|
|
20080
20374
|
*/
|
|
20081
20375
|
readonly player: Player;
|
|
20376
|
+
/**
|
|
20377
|
+
* @beta
|
|
20378
|
+
* @remarks
|
|
20379
|
+
* What caused the player to change dimensions, see
|
|
20380
|
+
* {@link PlayerDimensionChangeSource}.
|
|
20381
|
+
*
|
|
20382
|
+
*/
|
|
20383
|
+
readonly source: PlayerDimensionChangeSource;
|
|
20082
20384
|
/**
|
|
20083
20385
|
* @remarks
|
|
20084
20386
|
* The dimension that the player is changing to.
|
|
@@ -20879,127 +21181,41 @@ export class PlayerInventoryItemChangeAfterEventSignal {
|
|
|
20879
21181
|
}
|
|
20880
21182
|
|
|
20881
21183
|
/**
|
|
20882
|
-
*
|
|
20883
|
-
*
|
|
20884
|
-
*
|
|
20885
|
-
*
|
|
21184
|
+
* Contains information regarding a player that has joined.
|
|
21185
|
+
* See the playerSpawn event for more detailed information that
|
|
21186
|
+
* could be returned after the first time a player has spawned
|
|
21187
|
+
* within the game.
|
|
20886
21188
|
*/
|
|
20887
|
-
export class
|
|
21189
|
+
export class PlayerJoinAfterEvent {
|
|
20888
21190
|
private constructor();
|
|
20889
21191
|
/**
|
|
20890
21192
|
* @remarks
|
|
20891
|
-
*
|
|
20892
|
-
* For standard client-initiated transaction attacks, this
|
|
20893
|
-
* direction is derived from the client-provided hit position
|
|
20894
|
-
* and the player's server-side eye position. Other attack
|
|
20895
|
-
* paths can provide a server-derived direction. This property
|
|
20896
|
-
* is undefined when the attack path does not provide an aim
|
|
20897
|
-
* direction.
|
|
21193
|
+
* Opaque string identifier of the player that joined the game.
|
|
20898
21194
|
*
|
|
20899
21195
|
*/
|
|
20900
|
-
readonly
|
|
21196
|
+
readonly playerId: string;
|
|
20901
21197
|
/**
|
|
20902
21198
|
* @remarks
|
|
20903
|
-
*
|
|
20904
|
-
* authoritative attack effects.
|
|
21199
|
+
* Name of the player that has joined.
|
|
20905
21200
|
*
|
|
20906
21201
|
*/
|
|
20907
|
-
|
|
21202
|
+
readonly playerName: string;
|
|
21203
|
+
}
|
|
21204
|
+
|
|
21205
|
+
/**
|
|
21206
|
+
* Manages callbacks that are connected to a player joining the
|
|
21207
|
+
* world.
|
|
21208
|
+
*/
|
|
21209
|
+
export class PlayerJoinAfterEventSignal {
|
|
21210
|
+
private constructor();
|
|
20908
21211
|
/**
|
|
20909
21212
|
* @remarks
|
|
20910
|
-
*
|
|
20911
|
-
*
|
|
20912
|
-
*
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
* @remarks
|
|
20917
|
-
* The player that initiated the attack.
|
|
20918
|
-
*
|
|
20919
|
-
*/
|
|
20920
|
-
readonly player: Player;
|
|
20921
|
-
/**
|
|
20922
|
-
* @remarks
|
|
20923
|
-
* The entity targeted by the attack.
|
|
20924
|
-
*
|
|
20925
|
-
*/
|
|
20926
|
-
readonly target: Entity;
|
|
20927
|
-
}
|
|
20928
|
-
|
|
20929
|
-
/**
|
|
20930
|
-
* @beta
|
|
20931
|
-
* Manages callbacks that run before a player attacks an entity
|
|
20932
|
-
* through an item interaction.
|
|
20933
|
-
*/
|
|
20934
|
-
export class PlayerItemAttackEntityBeforeEventSignal {
|
|
20935
|
-
private constructor();
|
|
20936
|
-
/**
|
|
20937
|
-
* @remarks
|
|
20938
|
-
* Adds a callback that runs before a player attacks an entity
|
|
20939
|
-
* through an item interaction.
|
|
20940
|
-
*
|
|
20941
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20942
|
-
*
|
|
20943
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20944
|
-
*
|
|
20945
|
-
* @param callback
|
|
20946
|
-
* This closure is called with restricted-execution privilege.
|
|
20947
|
-
* @returns
|
|
20948
|
-
* Closure that is called with restricted-execution privilege.
|
|
20949
|
-
*/
|
|
20950
|
-
subscribe(
|
|
20951
|
-
callback: (arg0: PlayerItemAttackEntityBeforeEvent) => void,
|
|
20952
|
-
): (arg0: PlayerItemAttackEntityBeforeEvent) => void;
|
|
20953
|
-
/**
|
|
20954
|
-
* @remarks
|
|
20955
|
-
* Removes a callback from this event signal.
|
|
20956
|
-
*
|
|
20957
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20958
|
-
*
|
|
20959
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20960
|
-
*
|
|
20961
|
-
* @param callback
|
|
20962
|
-
* This closure is called with restricted-execution privilege.
|
|
20963
|
-
*/
|
|
20964
|
-
unsubscribe(callback: (arg0: PlayerItemAttackEntityBeforeEvent) => void): void;
|
|
20965
|
-
}
|
|
20966
|
-
|
|
20967
|
-
/**
|
|
20968
|
-
* Contains information regarding a player that has joined.
|
|
20969
|
-
* See the playerSpawn event for more detailed information that
|
|
20970
|
-
* could be returned after the first time a player has spawned
|
|
20971
|
-
* within the game.
|
|
20972
|
-
*/
|
|
20973
|
-
export class PlayerJoinAfterEvent {
|
|
20974
|
-
private constructor();
|
|
20975
|
-
/**
|
|
20976
|
-
* @remarks
|
|
20977
|
-
* Opaque string identifier of the player that joined the game.
|
|
20978
|
-
*
|
|
20979
|
-
*/
|
|
20980
|
-
readonly playerId: string;
|
|
20981
|
-
/**
|
|
20982
|
-
* @remarks
|
|
20983
|
-
* Name of the player that has joined.
|
|
20984
|
-
*
|
|
20985
|
-
*/
|
|
20986
|
-
readonly playerName: string;
|
|
20987
|
-
}
|
|
20988
|
-
|
|
20989
|
-
/**
|
|
20990
|
-
* Manages callbacks that are connected to a player joining the
|
|
20991
|
-
* world.
|
|
20992
|
-
*/
|
|
20993
|
-
export class PlayerJoinAfterEventSignal {
|
|
20994
|
-
private constructor();
|
|
20995
|
-
/**
|
|
20996
|
-
* @remarks
|
|
20997
|
-
* Adds a callback that will be called when a player joins the
|
|
20998
|
-
* world.
|
|
20999
|
-
*
|
|
21000
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
21001
|
-
*
|
|
21002
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
21213
|
+
* Adds a callback that will be called when a player joins the
|
|
21214
|
+
* world.
|
|
21215
|
+
*
|
|
21216
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
21217
|
+
*
|
|
21218
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
21003
21219
|
*
|
|
21004
21220
|
*/
|
|
21005
21221
|
subscribe(callback: (arg0: PlayerJoinAfterEvent) => void): (arg0: PlayerJoinAfterEvent) => void;
|
|
@@ -21833,6 +22049,63 @@ export class PoiManager {
|
|
|
21833
22049
|
readonly blocks: PoiBlockManager;
|
|
21834
22050
|
}
|
|
21835
22051
|
|
|
22052
|
+
/**
|
|
22053
|
+
* @beta
|
|
22054
|
+
* Contains information about a successfully activated Nether
|
|
22055
|
+
* portal, including its dimension, ignition location, and
|
|
22056
|
+
* initiating player (when known).
|
|
22057
|
+
*/
|
|
22058
|
+
export class PortalActivateAfterEvent {
|
|
22059
|
+
private constructor();
|
|
22060
|
+
/**
|
|
22061
|
+
* @remarks
|
|
22062
|
+
* The dimension in which the portal was activated, not its
|
|
22063
|
+
* destination dimension.
|
|
22064
|
+
*
|
|
22065
|
+
*/
|
|
22066
|
+
readonly dimension: Dimension;
|
|
22067
|
+
/**
|
|
22068
|
+
* @remarks
|
|
22069
|
+
* The coordinates of the ignition position used to activate
|
|
22070
|
+
* the portal. This is not necessarily the center or corner of
|
|
22071
|
+
* the portal.
|
|
22072
|
+
*
|
|
22073
|
+
*/
|
|
22074
|
+
readonly location: Vector3;
|
|
22075
|
+
/**
|
|
22076
|
+
* @remarks
|
|
22077
|
+
* The player who directly activated the portal using an item,
|
|
22078
|
+
* if known. Undefined for fire-based activation without a
|
|
22079
|
+
* known initiating player, including dispenser-fired fire
|
|
22080
|
+
* charges. Nearby players are not used for attribution.
|
|
22081
|
+
*
|
|
22082
|
+
*/
|
|
22083
|
+
readonly player?: Player;
|
|
22084
|
+
}
|
|
22085
|
+
|
|
22086
|
+
/**
|
|
22087
|
+
* @beta
|
|
22088
|
+
*/
|
|
22089
|
+
export class PortalActivateAfterEventSignal {
|
|
22090
|
+
private constructor();
|
|
22091
|
+
/**
|
|
22092
|
+
* @remarks
|
|
22093
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22094
|
+
*
|
|
22095
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
22096
|
+
*
|
|
22097
|
+
*/
|
|
22098
|
+
subscribe(callback: (arg0: PortalActivateAfterEvent) => void): (arg0: PortalActivateAfterEvent) => void;
|
|
22099
|
+
/**
|
|
22100
|
+
* @remarks
|
|
22101
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22102
|
+
*
|
|
22103
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
22104
|
+
*
|
|
22105
|
+
*/
|
|
22106
|
+
unsubscribe(callback: (arg0: PortalActivateAfterEvent) => void): void;
|
|
22107
|
+
}
|
|
22108
|
+
|
|
21836
22109
|
/**
|
|
21837
22110
|
* Represents how the potion effect is delivered.
|
|
21838
22111
|
*/
|
|
@@ -22476,7 +22749,7 @@ export class RandomRegionalDifficultyChanceCondition extends LootItemCondition {
|
|
|
22476
22749
|
}
|
|
22477
22750
|
|
|
22478
22751
|
/**
|
|
22479
|
-
* @
|
|
22752
|
+
* @rc
|
|
22480
22753
|
* Provides access to the slots and recipe of a players active
|
|
22481
22754
|
* crafting UI ie. stonecutter.
|
|
22482
22755
|
*/
|
|
@@ -23726,6 +23999,14 @@ export class SoundDurationInfo {
|
|
|
23726
23999
|
*/
|
|
23727
24000
|
export class SoundInstance {
|
|
23728
24001
|
private constructor();
|
|
24002
|
+
/**
|
|
24003
|
+
* @beta
|
|
24004
|
+
* @remarks
|
|
24005
|
+
* The attached entity, or undefined if the sound is not
|
|
24006
|
+
* attached to an entity.
|
|
24007
|
+
*
|
|
24008
|
+
*/
|
|
24009
|
+
readonly attachedEntity?: Entity;
|
|
23729
24010
|
/**
|
|
23730
24011
|
* @remarks
|
|
23731
24012
|
* Gets duration and playback information for this sound.
|
|
@@ -25000,6 +25281,278 @@ export class TripWireTripAfterEventSignal {
|
|
|
25000
25281
|
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
25001
25282
|
}
|
|
25002
25283
|
|
|
25284
|
+
/**
|
|
25285
|
+
* @beta
|
|
25286
|
+
* A container that only exists in memory. It is not tied to a
|
|
25287
|
+
* block, an entity or the world, is never saved, and is
|
|
25288
|
+
* destroyed once the script no longer references it and no
|
|
25289
|
+
* player is viewing it. It supports the full Container API and
|
|
25290
|
+
* can be shown to any number of players at once with open.
|
|
25291
|
+
* When the world shuts down or scripts reload, open screens
|
|
25292
|
+
* close without raising close events; save the contents from
|
|
25293
|
+
* system.beforeEvents.shutdown if they need to outlive the
|
|
25294
|
+
* session.
|
|
25295
|
+
*/
|
|
25296
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25297
|
+
export class VirtualContainer extends Container {
|
|
25298
|
+
private constructor();
|
|
25299
|
+
/**
|
|
25300
|
+
* @remarks
|
|
25301
|
+
* The heading shown on the container screen. It is localized
|
|
25302
|
+
* when it names a localization key.
|
|
25303
|
+
*
|
|
25304
|
+
*/
|
|
25305
|
+
readonly title: string;
|
|
25306
|
+
/**
|
|
25307
|
+
* @remarks
|
|
25308
|
+
* Requests closure of the container screen of a player, or of
|
|
25309
|
+
* every player viewing this container when no player is given.
|
|
25310
|
+
* From then on, those players can no longer change the
|
|
25311
|
+
* container through their screens. Each screen raises a
|
|
25312
|
+
* VirtualContainerCloseAfterEvent with the ServerClosed reason
|
|
25313
|
+
* after the client has closed its UI and pending inventory
|
|
25314
|
+
* requests have finished. Closure may complete on a later
|
|
25315
|
+
* tick.
|
|
25316
|
+
*
|
|
25317
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25318
|
+
*
|
|
25319
|
+
* @param player
|
|
25320
|
+
* The player whose screen to close. When omitted, every
|
|
25321
|
+
* viewer's screen is closed.
|
|
25322
|
+
* @returns
|
|
25323
|
+
* The number of screens asked to close. A screen that is
|
|
25324
|
+
* already closing is not counted again.
|
|
25325
|
+
* @throws
|
|
25326
|
+
* Throws if the given player is no longer valid.
|
|
25327
|
+
*
|
|
25328
|
+
* {@link InvalidEntityError}
|
|
25329
|
+
*/
|
|
25330
|
+
close(player?: Player): number;
|
|
25331
|
+
/**
|
|
25332
|
+
* @remarks
|
|
25333
|
+
* Gets the players currently viewing this container.
|
|
25334
|
+
*
|
|
25335
|
+
* @returns
|
|
25336
|
+
* The players that have a screen open onto this container.
|
|
25337
|
+
*/
|
|
25338
|
+
getViewers(): Player[];
|
|
25339
|
+
/**
|
|
25340
|
+
* @remarks
|
|
25341
|
+
* Shows a chest style screen onto this container to a player.
|
|
25342
|
+
* Only that player sees the screen; any number of players can
|
|
25343
|
+
* view the same container at once, each with a screen of their
|
|
25344
|
+
* own. Changing dimension closes the screen with the
|
|
25345
|
+
* ServerClosed reason, dying closes it with the PlayerDied
|
|
25346
|
+
* reason, and switching to spectator mode closes it with the
|
|
25347
|
+
* PlayerSpectating reason.
|
|
25348
|
+
*
|
|
25349
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25350
|
+
*
|
|
25351
|
+
* @param player
|
|
25352
|
+
* The player to show the container to.
|
|
25353
|
+
* @throws
|
|
25354
|
+
* Throws VirtualContainerOpenError when the screen request
|
|
25355
|
+
* cannot be sent, with a reason that names why, such as the
|
|
25356
|
+
* player still loading or already having a container screen
|
|
25357
|
+
* open; try again later. Not throwing means the request was
|
|
25358
|
+
* sent, not that the screen has already appeared: the player's
|
|
25359
|
+
* device can still decline to show it, which closes it with
|
|
25360
|
+
* the UserBusy reason. Throws InvalidEntityError if the player
|
|
25361
|
+
* is no longer valid or is leaving the game.
|
|
25362
|
+
*
|
|
25363
|
+
* {@link minecraftcommon.EngineError}
|
|
25364
|
+
*
|
|
25365
|
+
* {@link InvalidEntityError}
|
|
25366
|
+
*
|
|
25367
|
+
* {@link VirtualContainerOpenError}
|
|
25368
|
+
*/
|
|
25369
|
+
open(player: Player): void;
|
|
25370
|
+
}
|
|
25371
|
+
|
|
25372
|
+
/**
|
|
25373
|
+
* @beta
|
|
25374
|
+
* Contains information about a player's virtual container
|
|
25375
|
+
* screen that closed, including the contents of the container
|
|
25376
|
+
* at that moment.
|
|
25377
|
+
*/
|
|
25378
|
+
export class VirtualContainerCloseAfterEvent {
|
|
25379
|
+
private constructor();
|
|
25380
|
+
/**
|
|
25381
|
+
* @remarks
|
|
25382
|
+
* The container whose screen closed.
|
|
25383
|
+
*
|
|
25384
|
+
*/
|
|
25385
|
+
readonly container: VirtualContainer;
|
|
25386
|
+
/**
|
|
25387
|
+
* @remarks
|
|
25388
|
+
* The contents of every slot of the container when the screen
|
|
25389
|
+
* closed. Empty slots are undefined. Storage items such as
|
|
25390
|
+
* bundles hold their contents as they were at that moment.
|
|
25391
|
+
*
|
|
25392
|
+
*/
|
|
25393
|
+
readonly items: (ItemStack | undefined)[];
|
|
25394
|
+
/**
|
|
25395
|
+
* @remarks
|
|
25396
|
+
* The player whose screen closed. When the reason is
|
|
25397
|
+
* PlayerLeft the player is no longer valid.
|
|
25398
|
+
*
|
|
25399
|
+
*/
|
|
25400
|
+
readonly player: Player;
|
|
25401
|
+
/**
|
|
25402
|
+
* @remarks
|
|
25403
|
+
* Why the screen closed.
|
|
25404
|
+
*
|
|
25405
|
+
*/
|
|
25406
|
+
readonly reason: VirtualContainerCloseReason;
|
|
25407
|
+
}
|
|
25408
|
+
|
|
25409
|
+
/**
|
|
25410
|
+
* @beta
|
|
25411
|
+
* Manages callbacks that are invoked when a player's virtual
|
|
25412
|
+
* container screen closes.
|
|
25413
|
+
*/
|
|
25414
|
+
export class VirtualContainerCloseAfterEventSignal {
|
|
25415
|
+
private constructor();
|
|
25416
|
+
/**
|
|
25417
|
+
* @remarks
|
|
25418
|
+
* Adds a callback that will be called when a player's virtual
|
|
25419
|
+
* container screen closes.
|
|
25420
|
+
*
|
|
25421
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25422
|
+
*
|
|
25423
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25424
|
+
*
|
|
25425
|
+
* @param callback
|
|
25426
|
+
* Function callback that is called when this event fires.
|
|
25427
|
+
* @param options
|
|
25428
|
+
* Additional filtering options for the event subscription.
|
|
25429
|
+
*/
|
|
25430
|
+
subscribe(
|
|
25431
|
+
callback: (arg0: VirtualContainerCloseAfterEvent) => void,
|
|
25432
|
+
options?: VirtualContainerEventOptions,
|
|
25433
|
+
): (arg0: VirtualContainerCloseAfterEvent) => void;
|
|
25434
|
+
/**
|
|
25435
|
+
* @remarks
|
|
25436
|
+
* Removes a callback from being called when a player's virtual
|
|
25437
|
+
* container screen closes.
|
|
25438
|
+
*
|
|
25439
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25440
|
+
*
|
|
25441
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25442
|
+
*
|
|
25443
|
+
*/
|
|
25444
|
+
unsubscribe(callback: (arg0: VirtualContainerCloseAfterEvent) => void): void;
|
|
25445
|
+
}
|
|
25446
|
+
|
|
25447
|
+
/**
|
|
25448
|
+
* @beta
|
|
25449
|
+
* Contains information about a slot of a virtual container
|
|
25450
|
+
* that a player changed through its screen. Changes made by
|
|
25451
|
+
* scripts do not raise this event.
|
|
25452
|
+
*/
|
|
25453
|
+
export class VirtualContainerItemChangeAfterEvent {
|
|
25454
|
+
private constructor();
|
|
25455
|
+
/**
|
|
25456
|
+
* @remarks
|
|
25457
|
+
* The item that was in the slot before the change, if any. A
|
|
25458
|
+
* storage item such as a bundle holds its contents as they
|
|
25459
|
+
* were at the change, unless it was dropped from the slot onto
|
|
25460
|
+
* the ground: its contents then go to the dropped item.
|
|
25461
|
+
*
|
|
25462
|
+
*/
|
|
25463
|
+
readonly beforeItemStack?: ItemStack;
|
|
25464
|
+
/**
|
|
25465
|
+
* @remarks
|
|
25466
|
+
* The container that changed.
|
|
25467
|
+
*
|
|
25468
|
+
*/
|
|
25469
|
+
readonly container: VirtualContainer;
|
|
25470
|
+
/**
|
|
25471
|
+
* @remarks
|
|
25472
|
+
* The item in the slot after the change, if any. A storage
|
|
25473
|
+
* item such as a bundle holds its contents as they were at the
|
|
25474
|
+
* change.
|
|
25475
|
+
*
|
|
25476
|
+
*/
|
|
25477
|
+
readonly itemStack?: ItemStack;
|
|
25478
|
+
/**
|
|
25479
|
+
* @remarks
|
|
25480
|
+
* The player who made the change.
|
|
25481
|
+
*
|
|
25482
|
+
*/
|
|
25483
|
+
readonly player: Player;
|
|
25484
|
+
/**
|
|
25485
|
+
* @remarks
|
|
25486
|
+
* The slot that changed.
|
|
25487
|
+
*
|
|
25488
|
+
*/
|
|
25489
|
+
readonly slot: number;
|
|
25490
|
+
}
|
|
25491
|
+
|
|
25492
|
+
/**
|
|
25493
|
+
* @beta
|
|
25494
|
+
* Manages callbacks that are invoked when a player changes a
|
|
25495
|
+
* slot of a virtual container.
|
|
25496
|
+
*/
|
|
25497
|
+
export class VirtualContainerItemChangeAfterEventSignal {
|
|
25498
|
+
private constructor();
|
|
25499
|
+
/**
|
|
25500
|
+
* @remarks
|
|
25501
|
+
* Adds a callback that will be called when a player changes a
|
|
25502
|
+
* slot of a virtual container.
|
|
25503
|
+
*
|
|
25504
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25505
|
+
*
|
|
25506
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25507
|
+
*
|
|
25508
|
+
* @param callback
|
|
25509
|
+
* Function callback that is called when this event fires.
|
|
25510
|
+
* @param options
|
|
25511
|
+
* Additional filtering options for the event subscription.
|
|
25512
|
+
*/
|
|
25513
|
+
subscribe(
|
|
25514
|
+
callback: (arg0: VirtualContainerItemChangeAfterEvent) => void,
|
|
25515
|
+
options?: VirtualContainerEventOptions,
|
|
25516
|
+
): (arg0: VirtualContainerItemChangeAfterEvent) => void;
|
|
25517
|
+
/**
|
|
25518
|
+
* @remarks
|
|
25519
|
+
* Removes a callback from being called when a player changes a
|
|
25520
|
+
* slot of a virtual container.
|
|
25521
|
+
*
|
|
25522
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25523
|
+
*
|
|
25524
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25525
|
+
*
|
|
25526
|
+
*/
|
|
25527
|
+
unsubscribe(callback: (arg0: VirtualContainerItemChangeAfterEvent) => void): void;
|
|
25528
|
+
}
|
|
25529
|
+
|
|
25530
|
+
/**
|
|
25531
|
+
* @beta
|
|
25532
|
+
* Creates virtual containers: containers that only exist in
|
|
25533
|
+
* memory and belong to the script that created them.
|
|
25534
|
+
*/
|
|
25535
|
+
export class VirtualContainerManager {
|
|
25536
|
+
private constructor();
|
|
25537
|
+
/**
|
|
25538
|
+
* @remarks
|
|
25539
|
+
* Creates a new, empty virtual container.
|
|
25540
|
+
*
|
|
25541
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25542
|
+
*
|
|
25543
|
+
* @param options
|
|
25544
|
+
* The number of slots and the title of the container.
|
|
25545
|
+
* @returns
|
|
25546
|
+
* The new container.
|
|
25547
|
+
* @throws
|
|
25548
|
+
* Throws if the size is not between 1 and 54, or if the title
|
|
25549
|
+
* is longer than 256 bytes.
|
|
25550
|
+
*
|
|
25551
|
+
* {@link minecraftcommon.PropertyOutOfBoundsError}
|
|
25552
|
+
*/
|
|
25553
|
+
create(options: VirtualContainerOptions): VirtualContainer;
|
|
25554
|
+
}
|
|
25555
|
+
|
|
25003
25556
|
/**
|
|
25004
25557
|
* @beta
|
|
25005
25558
|
* Contains information related to a script watchdog
|
|
@@ -25373,6 +25926,14 @@ export class World {
|
|
|
25373
25926
|
*
|
|
25374
25927
|
*/
|
|
25375
25928
|
readonly tickingAreaManager: TickingAreaManager;
|
|
25929
|
+
/**
|
|
25930
|
+
* @beta
|
|
25931
|
+
* @remarks
|
|
25932
|
+
* Manager for creating virtual containers, containers that
|
|
25933
|
+
* only exist in memory.
|
|
25934
|
+
*
|
|
25935
|
+
*/
|
|
25936
|
+
readonly virtualContainerManager: VirtualContainerManager;
|
|
25376
25937
|
/**
|
|
25377
25938
|
* @beta
|
|
25378
25939
|
* @remarks
|
|
@@ -26199,7 +26760,7 @@ export class WorldAfterEvents {
|
|
|
26199
26760
|
*/
|
|
26200
26761
|
readonly playerCancelBreakingBlock: PlayerCancelBreakingBlockAfterEventSignal;
|
|
26201
26762
|
/**
|
|
26202
|
-
* @
|
|
26763
|
+
* @rc
|
|
26203
26764
|
* @remarks
|
|
26204
26765
|
* This event fires when a player crafts a recipe.
|
|
26205
26766
|
*
|
|
@@ -26208,7 +26769,7 @@ export class WorldAfterEvents {
|
|
|
26208
26769
|
*/
|
|
26209
26770
|
readonly playerCraftRecipe: PlayerCraftRecipeAfterEventSignal;
|
|
26210
26771
|
/**
|
|
26211
|
-
* @
|
|
26772
|
+
* @rc
|
|
26212
26773
|
* @remarks
|
|
26213
26774
|
* Event signal that fires when a player grabs an item from a
|
|
26214
26775
|
* container to their cursor.
|
|
@@ -26218,7 +26779,7 @@ export class WorldAfterEvents {
|
|
|
26218
26779
|
*/
|
|
26219
26780
|
readonly playerCursorItemGrab: PlayerCursorItemGrabAfterEventSignal;
|
|
26220
26781
|
/**
|
|
26221
|
-
* @
|
|
26782
|
+
* @rc
|
|
26222
26783
|
* @remarks
|
|
26223
26784
|
* Event signal that fires when a player releases an item from
|
|
26224
26785
|
* their cursor into a container.
|
|
@@ -26356,6 +26917,19 @@ export class WorldAfterEvents {
|
|
|
26356
26917
|
*
|
|
26357
26918
|
*/
|
|
26358
26919
|
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
26920
|
+
/**
|
|
26921
|
+
* @beta
|
|
26922
|
+
* @remarks
|
|
26923
|
+
* Fires after a portal is successfully activated, with an
|
|
26924
|
+
* initiating player when known. Currently fires for Nether
|
|
26925
|
+
* portals only, including activation by fire without a player.
|
|
26926
|
+
* Does not fire merely for frame construction or for failed
|
|
26927
|
+
* activation attempts.
|
|
26928
|
+
*
|
|
26929
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
26930
|
+
*
|
|
26931
|
+
*/
|
|
26932
|
+
readonly portalActivate: PortalActivateAfterEventSignal;
|
|
26359
26933
|
/**
|
|
26360
26934
|
* @remarks
|
|
26361
26935
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -26414,6 +26988,26 @@ export class WorldAfterEvents {
|
|
|
26414
26988
|
*
|
|
26415
26989
|
*/
|
|
26416
26990
|
readonly tripWireTrip: TripWireTripAfterEventSignal;
|
|
26991
|
+
/**
|
|
26992
|
+
* @beta
|
|
26993
|
+
* @remarks
|
|
26994
|
+
* This event fires when a player's virtual container screen
|
|
26995
|
+
* closes, with the container's contents at that moment.
|
|
26996
|
+
*
|
|
26997
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
26998
|
+
*
|
|
26999
|
+
*/
|
|
27000
|
+
readonly virtualContainerClose: VirtualContainerCloseAfterEventSignal;
|
|
27001
|
+
/**
|
|
27002
|
+
* @beta
|
|
27003
|
+
* @remarks
|
|
27004
|
+
* This event fires when a player changes a slot of a virtual
|
|
27005
|
+
* container through its screen.
|
|
27006
|
+
*
|
|
27007
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
27008
|
+
*
|
|
27009
|
+
*/
|
|
27010
|
+
readonly virtualContainerItemChange: VirtualContainerItemChangeAfterEventSignal;
|
|
26417
27011
|
/**
|
|
26418
27012
|
* @remarks
|
|
26419
27013
|
* This event will be triggered when the weather changes within
|
|
@@ -26607,13 +27201,6 @@ export class WorldBeforeEvents {
|
|
|
26607
27201
|
*
|
|
26608
27202
|
*/
|
|
26609
27203
|
readonly playerInteractWithEntity: PlayerInteractWithEntityBeforeEventSignal;
|
|
26610
|
-
/**
|
|
26611
|
-
* @beta
|
|
26612
|
-
* @remarks
|
|
26613
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
26614
|
-
*
|
|
26615
|
-
*/
|
|
26616
|
-
readonly playerItemAttackEntity: PlayerItemAttackEntityBeforeEventSignal;
|
|
26617
27204
|
/**
|
|
26618
27205
|
* @remarks
|
|
26619
27206
|
* Fires when a player leaves the game.
|
|
@@ -27133,10 +27720,57 @@ export interface AnimationOptions {
|
|
|
27133
27720
|
totalTimeSeconds: number;
|
|
27134
27721
|
}
|
|
27135
27722
|
|
|
27723
|
+
/**
|
|
27724
|
+
* Options to include or exclude biomes based on biome names,
|
|
27725
|
+
* tags, or namespaces. If no include options are added it will
|
|
27726
|
+
* select all biomes that are not rejected by the exclude
|
|
27727
|
+
* options. If at least one include option is added the biome
|
|
27728
|
+
* must match one of the include options to not be rejected.
|
|
27729
|
+
*/
|
|
27136
27730
|
export interface BiomeFilter {
|
|
27731
|
+
/**
|
|
27732
|
+
* @remarks
|
|
27733
|
+
* Array of biome names that the filter should reject if any
|
|
27734
|
+
* matches.
|
|
27735
|
+
*
|
|
27736
|
+
*/
|
|
27137
27737
|
excludeBiomes?: string[];
|
|
27738
|
+
/**
|
|
27739
|
+
* @beta
|
|
27740
|
+
* @remarks
|
|
27741
|
+
* Array of namespaces that the filter should reject if the
|
|
27742
|
+
* biome belongs to at least one.
|
|
27743
|
+
*
|
|
27744
|
+
*/
|
|
27745
|
+
excludeNamespaces?: string[];
|
|
27746
|
+
/**
|
|
27747
|
+
* @remarks
|
|
27748
|
+
* Array of biome tags that the filter should reject if any
|
|
27749
|
+
* matches.
|
|
27750
|
+
*
|
|
27751
|
+
*/
|
|
27138
27752
|
excludeTags?: string[];
|
|
27753
|
+
/**
|
|
27754
|
+
* @remarks
|
|
27755
|
+
* Array of biome names that the filter should select if at
|
|
27756
|
+
* least one matches.
|
|
27757
|
+
*
|
|
27758
|
+
*/
|
|
27139
27759
|
includeBiomes?: string[];
|
|
27760
|
+
/**
|
|
27761
|
+
* @beta
|
|
27762
|
+
* @remarks
|
|
27763
|
+
* Array of namespaces that the filter should select if the
|
|
27764
|
+
* biome belongs to at least one.
|
|
27765
|
+
*
|
|
27766
|
+
*/
|
|
27767
|
+
includeNamespaces?: string[];
|
|
27768
|
+
/**
|
|
27769
|
+
* @remarks
|
|
27770
|
+
* Array of biome tags that the filter should select if at
|
|
27771
|
+
* least one matches.
|
|
27772
|
+
*
|
|
27773
|
+
*/
|
|
27140
27774
|
includeTags?: string[];
|
|
27141
27775
|
}
|
|
27142
27776
|
|
|
@@ -27247,11 +27881,11 @@ export interface BlockCustomComponent {
|
|
|
27247
27881
|
*/
|
|
27248
27882
|
onEntityFallOn?: (arg0: BlockComponentEntityFallOnEvent, arg1: CustomComponentParameters) => void;
|
|
27249
27883
|
/**
|
|
27250
|
-
* @
|
|
27884
|
+
* @rc
|
|
27251
27885
|
*/
|
|
27252
27886
|
onNamedTick?: (arg0: BlockComponentNamedTickEvent, arg1: CustomComponentParameters) => void;
|
|
27253
27887
|
/**
|
|
27254
|
-
* @
|
|
27888
|
+
* @rc
|
|
27255
27889
|
*/
|
|
27256
27890
|
onNeighborChanged?: (arg0: BlockComponentNeighborChangedAfterEvent, arg1: CustomComponentParameters) => void;
|
|
27257
27891
|
/**
|
|
@@ -27350,13 +27984,22 @@ export interface BlockFillOptions {
|
|
|
27350
27984
|
}
|
|
27351
27985
|
|
|
27352
27986
|
/**
|
|
27353
|
-
* Options to include or exclude blocks based on type, tag
|
|
27354
|
-
* permutation. If no include options are added
|
|
27355
|
-
* all blocks that are not rejected by the
|
|
27356
|
-
* at least one include option is added the
|
|
27357
|
-
* one of the include options to not be
|
|
27987
|
+
* Options to include or exclude blocks based on type, tag,
|
|
27988
|
+
* permutation, or namespaces. If no include options are added
|
|
27989
|
+
* it will select all blocks that are not rejected by the
|
|
27990
|
+
* exclude options. If at least one include option is added the
|
|
27991
|
+
* block must match one of the include options to not be
|
|
27992
|
+
* rejected.
|
|
27358
27993
|
*/
|
|
27359
27994
|
export interface BlockFilter {
|
|
27995
|
+
/**
|
|
27996
|
+
* @beta
|
|
27997
|
+
* @remarks
|
|
27998
|
+
* Array of namespaces that the filter should reject if the
|
|
27999
|
+
* block belongs to at least one.
|
|
28000
|
+
*
|
|
28001
|
+
*/
|
|
28002
|
+
excludeNamespaces?: string[];
|
|
27360
28003
|
/**
|
|
27361
28004
|
* @remarks
|
|
27362
28005
|
* Array of block permutations that the filter should reject if
|
|
@@ -27378,6 +28021,14 @@ export interface BlockFilter {
|
|
|
27378
28021
|
*
|
|
27379
28022
|
*/
|
|
27380
28023
|
excludeTypes?: string[];
|
|
28024
|
+
/**
|
|
28025
|
+
* @beta
|
|
28026
|
+
* @remarks
|
|
28027
|
+
* Array of namespaces that the filter should select if the
|
|
28028
|
+
* block belongs to at least one.
|
|
28029
|
+
*
|
|
28030
|
+
*/
|
|
28031
|
+
includeNamespaces?: string[];
|
|
27381
28032
|
/**
|
|
27382
28033
|
* @remarks
|
|
27383
28034
|
* Array of block permutations that the filter should select if
|
|
@@ -28171,6 +28822,14 @@ export interface EntityFilter {
|
|
|
28171
28822
|
*
|
|
28172
28823
|
*/
|
|
28173
28824
|
excludeNames?: string[];
|
|
28825
|
+
/**
|
|
28826
|
+
* @beta
|
|
28827
|
+
* @remarks
|
|
28828
|
+
* Excludes entities that have a namespace that matches one of
|
|
28829
|
+
* the specified values.
|
|
28830
|
+
*
|
|
28831
|
+
*/
|
|
28832
|
+
excludeNamespaces?: string[];
|
|
28174
28833
|
/**
|
|
28175
28834
|
* @remarks
|
|
28176
28835
|
* Excludes entities with a tag that matches one of the
|
|
@@ -28246,6 +28905,13 @@ export interface EntityFilter {
|
|
|
28246
28905
|
*
|
|
28247
28906
|
*/
|
|
28248
28907
|
name?: string;
|
|
28908
|
+
/**
|
|
28909
|
+
* @beta
|
|
28910
|
+
* @remarks
|
|
28911
|
+
* Includes entities with the specified namespace.
|
|
28912
|
+
*
|
|
28913
|
+
*/
|
|
28914
|
+
namespaces?: string[];
|
|
28249
28915
|
propertyOptions?: EntityQueryPropertyOptions[];
|
|
28250
28916
|
/**
|
|
28251
28917
|
* @remarks
|
|
@@ -29037,6 +29703,15 @@ export interface ItemCustomComponent {
|
|
|
29037
29703
|
*
|
|
29038
29704
|
*/
|
|
29039
29705
|
onMineBlock?: (arg0: ItemComponentMineBlockEvent, arg1: CustomComponentParameters) => void;
|
|
29706
|
+
/**
|
|
29707
|
+
* @beta
|
|
29708
|
+
* @remarks
|
|
29709
|
+
* This function will be called when a player releases use of
|
|
29710
|
+
* an item containing this component. It will only be called if
|
|
29711
|
+
* the item has the minecraft:use_duration component.
|
|
29712
|
+
*
|
|
29713
|
+
*/
|
|
29714
|
+
onReleaseUse?: (arg0: ItemComponentReleaseUseEvent, arg1: CustomComponentParameters) => void;
|
|
29040
29715
|
/**
|
|
29041
29716
|
* @remarks
|
|
29042
29717
|
* This function will be called when an item containing this
|
|
@@ -29179,7 +29854,7 @@ export interface MusicOptions {
|
|
|
29179
29854
|
}
|
|
29180
29855
|
|
|
29181
29856
|
/**
|
|
29182
|
-
* @
|
|
29857
|
+
* @rc
|
|
29183
29858
|
* Contains information regarding a block change in one
|
|
29184
29859
|
* neighboring direction.
|
|
29185
29860
|
*/
|
|
@@ -29316,7 +29991,7 @@ export interface PlayerBreakingBlockEventOptions {
|
|
|
29316
29991
|
}
|
|
29317
29992
|
|
|
29318
29993
|
/**
|
|
29319
|
-
* @
|
|
29994
|
+
* @rc
|
|
29320
29995
|
* Contains options for filtering player craft recipe events.
|
|
29321
29996
|
*/
|
|
29322
29997
|
export interface PlayerCraftRecipeEventOptions {
|
|
@@ -29809,7 +30484,7 @@ export interface RotationKeyFrame {
|
|
|
29809
30484
|
}
|
|
29810
30485
|
|
|
29811
30486
|
/**
|
|
29812
|
-
* @
|
|
30487
|
+
* @rc
|
|
29813
30488
|
*/
|
|
29814
30489
|
export interface ScheduledNamedTick {
|
|
29815
30490
|
eventName: string;
|
|
@@ -30382,6 +31057,50 @@ export interface VectorXZ {
|
|
|
30382
31057
|
z: number;
|
|
30383
31058
|
}
|
|
30384
31059
|
|
|
31060
|
+
/**
|
|
31061
|
+
* @beta
|
|
31062
|
+
* Contains optional parameters for registering a virtual
|
|
31063
|
+
* container event.
|
|
31064
|
+
*/
|
|
31065
|
+
export interface VirtualContainerEventOptions {
|
|
31066
|
+
/**
|
|
31067
|
+
* @remarks
|
|
31068
|
+
* If this value is set, this event will only fire for the
|
|
31069
|
+
* virtual containers within this collection.
|
|
31070
|
+
*
|
|
31071
|
+
*/
|
|
31072
|
+
containers?: VirtualContainer[];
|
|
31073
|
+
}
|
|
31074
|
+
|
|
31075
|
+
/**
|
|
31076
|
+
* @beta
|
|
31077
|
+
* Options for creating a virtual container with
|
|
31078
|
+
* VirtualContainerManager.create. The size sets its number of
|
|
31079
|
+
* slots, from 1 to 54, which its screen lays out nine per row.
|
|
31080
|
+
* The optional title is the heading on its screen, which is
|
|
31081
|
+
* empty by default. A title can be up to 256 bytes and is
|
|
31082
|
+
* localized when it names a localization key, in which case
|
|
31083
|
+
* the limit applies to the key rather than the localized text.
|
|
31084
|
+
* Neither can be changed once the container is created.
|
|
31085
|
+
*/
|
|
31086
|
+
export interface VirtualContainerOptions {
|
|
31087
|
+
/**
|
|
31088
|
+
* @remarks
|
|
31089
|
+
* The number of slots in the container, from 1 to 54. The
|
|
31090
|
+
* screen lays them out nine per row.
|
|
31091
|
+
*
|
|
31092
|
+
*/
|
|
31093
|
+
size: number;
|
|
31094
|
+
/**
|
|
31095
|
+
* @remarks
|
|
31096
|
+
* The heading shown on the container screen, up to 256 bytes.
|
|
31097
|
+
* It is localized when it names a localization key. Defaults
|
|
31098
|
+
* to no heading.
|
|
31099
|
+
*
|
|
31100
|
+
*/
|
|
31101
|
+
title?: string;
|
|
31102
|
+
}
|
|
31103
|
+
|
|
30385
31104
|
/**
|
|
30386
31105
|
* Defines a texture and the distance range in which it should
|
|
30387
31106
|
* be displayed. Used within a {@link WaypointTextureSelector}
|
|
@@ -30793,7 +31512,7 @@ export class InvalidPotionEffectTypeError extends Error {
|
|
|
30793
31512
|
}
|
|
30794
31513
|
|
|
30795
31514
|
/**
|
|
30796
|
-
* @
|
|
31515
|
+
* @rc
|
|
30797
31516
|
* Thrown when an invalid recipe identifier is used.
|
|
30798
31517
|
*/
|
|
30799
31518
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -30963,6 +31682,26 @@ export class UnloadedChunksError extends Error {
|
|
|
30963
31682
|
private constructor();
|
|
30964
31683
|
}
|
|
30965
31684
|
|
|
31685
|
+
/**
|
|
31686
|
+
* @beta
|
|
31687
|
+
* Error thrown when a virtual container cannot be shown to a
|
|
31688
|
+
* player. Contains a reason code indicating why the screen
|
|
31689
|
+
* request was not sent.
|
|
31690
|
+
*/
|
|
31691
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
31692
|
+
export class VirtualContainerOpenError extends Error {
|
|
31693
|
+
private constructor();
|
|
31694
|
+
/**
|
|
31695
|
+
* @remarks
|
|
31696
|
+
* The {@link VirtualContainerOpenErrorReason} code that
|
|
31697
|
+
* indicates why the screen request was not sent.
|
|
31698
|
+
*
|
|
31699
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
31700
|
+
*
|
|
31701
|
+
*/
|
|
31702
|
+
readonly reason: VirtualContainerOpenErrorReason;
|
|
31703
|
+
}
|
|
31704
|
+
|
|
30966
31705
|
/**
|
|
30967
31706
|
* Error thrown by {@link WorldClock.addTimeMarker} when
|
|
30968
31707
|
* failing to add a time marker to a world clock.
|