@minecraft/server 2.9.0-beta.1.26.30-preview.32 → 2.10.0-beta.1.26.40-preview.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.
Files changed (2) hide show
  1. package/index.d.ts +583 -11
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "2.9.0-beta"
19
+ * "version": "2.10.0-beta"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -52,6 +52,10 @@ export enum BlockComponentTypes {
52
52
  */
53
53
  DynamicProperties = 'minecraft:dynamic_properties',
54
54
  FluidContainer = 'minecraft:fluid_container',
55
+ /**
56
+ * @beta
57
+ */
58
+ Instrument = 'minecraft:instrument_sound',
55
59
  /**
56
60
  * @remarks
57
61
  * Represents the inventory of a block in the world. Used with
@@ -197,6 +201,25 @@ export enum ButtonState {
197
201
  Released = 'Released',
198
202
  }
199
203
 
204
+ /**
205
+ * @beta
206
+ * Represents the type of shake to apply to the camera.
207
+ */
208
+ export enum CameraShakeType {
209
+ /**
210
+ * @remarks
211
+ * A positional shake that moves the camera along its axes.
212
+ *
213
+ */
214
+ Positional = 'Positional',
215
+ /**
216
+ * @remarks
217
+ * A rotational shake that rotates the camera around its axes.
218
+ *
219
+ */
220
+ Rotational = 'Rotational',
221
+ }
222
+
200
223
  /**
201
224
  * The required permission level to execute the custom command.
202
225
  */
@@ -2263,6 +2286,10 @@ export enum InputPermissionCategory {
2263
2286
  * function ItemStack.getComponent.
2264
2287
  */
2265
2288
  export enum ItemComponentTypes {
2289
+ /**
2290
+ * @beta
2291
+ */
2292
+ BlockDynamicProperties = 'minecraft:block_actor_dynamic_properties',
2266
2293
  /**
2267
2294
  * @remarks
2268
2295
  * The minecraft:book component.
@@ -3125,10 +3152,12 @@ export type BlockComponentReturnType<T extends string> = T extends keyof BlockCo
3125
3152
  export type BlockComponentTypeMap = {
3126
3153
  dynamic_properties: BlockDynamicPropertiesComponent;
3127
3154
  fluid_container: BlockFluidContainerComponent;
3155
+ instrument_sound: BlockInstrumentComponent;
3128
3156
  inventory: BlockInventoryComponent;
3129
3157
  map_color: BlockMapColorComponent;
3130
3158
  'minecraft:dynamic_properties': BlockDynamicPropertiesComponent;
3131
3159
  'minecraft:fluid_container': BlockFluidContainerComponent;
3160
+ 'minecraft:instrument_sound': BlockInstrumentComponent;
3132
3161
  'minecraft:inventory': BlockInventoryComponent;
3133
3162
  'minecraft:map_color': BlockMapColorComponent;
3134
3163
  'minecraft:movable': BlockMovableComponent;
@@ -3318,6 +3347,7 @@ export type ItemComponentReturnType<T extends string> = T extends keyof ItemComp
3318
3347
  : ItemCustomComponentInstance;
3319
3348
 
3320
3349
  export type ItemComponentTypeMap = {
3350
+ block_actor_dynamic_properties: ItemBlockDynamicPropertiesComponent;
3321
3351
  book: ItemBookComponent;
3322
3352
  compostable: ItemCompostableComponent;
3323
3353
  cooldown: ItemCooldownComponent;
@@ -3326,6 +3356,7 @@ export type ItemComponentTypeMap = {
3326
3356
  enchantable: ItemEnchantableComponent;
3327
3357
  food: ItemFoodComponent;
3328
3358
  inventory: ItemInventoryComponent;
3359
+ 'minecraft:block_actor_dynamic_properties': ItemBlockDynamicPropertiesComponent;
3329
3360
  'minecraft:book': ItemBookComponent;
3330
3361
  'minecraft:compostable': ItemCompostableComponent;
3331
3362
  'minecraft:cooldown': ItemCooldownComponent;
@@ -5426,6 +5457,58 @@ export class BlockFluidContainerComponent extends BlockComponent {
5426
5457
  setPotion(itemStack: ItemStack): void;
5427
5458
  }
5428
5459
 
5460
+ /**
5461
+ * @beta
5462
+ * Represents the instruments a block can have assigned to it's
5463
+ * up and down faces.
5464
+ */
5465
+ // @ts-ignore Class inheritance allowed for native defined classes
5466
+ export class BlockInstrumentComponent extends BlockComponent {
5467
+ private constructor();
5468
+ static readonly componentId = 'minecraft:instrument_sound';
5469
+ /**
5470
+ * @remarks
5471
+ * A getter method to get the name of an instrument for a given
5472
+ * valid face Direction.
5473
+ *
5474
+ * @param face
5475
+ * the face Direction to get the instrument name for.
5476
+ * @returns
5477
+ * Returns the name of the instrument for a given valid face
5478
+ * Direction.
5479
+ * @throws This function can throw errors.
5480
+ *
5481
+ * {@link minecraftcommon.InvalidArgumentError}
5482
+ *
5483
+ * {@link LocationInUnloadedChunkError}
5484
+ *
5485
+ * {@link LocationOutOfWorldBoundariesError}
5486
+ */
5487
+ getInstrumentName(face: Direction): string;
5488
+ /**
5489
+ * @remarks
5490
+ * plays the instrument sound for a given valid face Direction
5491
+ * at the components block location using optional
5492
+ * WorldSoundOptions.
5493
+ *
5494
+ * This function can't be called in restricted-execution mode.
5495
+ *
5496
+ * @param face
5497
+ * the face Direction for which instrument sound to play.
5498
+ * @param soundOptions
5499
+ * optional WorldSoundOptions to use when playing the
5500
+ * insturment sound; if omitted the default values are used.
5501
+ * @throws This function can throw errors.
5502
+ *
5503
+ * {@link minecraftcommon.InvalidArgumentError}
5504
+ *
5505
+ * {@link LocationInUnloadedChunkError}
5506
+ *
5507
+ * {@link LocationOutOfWorldBoundariesError}
5508
+ */
5509
+ playInstrumentSound(face: Direction, soundOptions?: WorldSoundOptions): void;
5510
+ }
5511
+
5429
5512
  /**
5430
5513
  * Represents the inventory of a block in the world. Used with
5431
5514
  * blocks like chests.
@@ -6601,6 +6684,18 @@ export class Camera {
6601
6684
  *
6602
6685
  */
6603
6686
  readonly isValid: boolean;
6687
+ /**
6688
+ * @beta
6689
+ * @remarks
6690
+ * This function can't be called in restricted-execution mode.
6691
+ *
6692
+ * @throws This function can throw errors.
6693
+ *
6694
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
6695
+ *
6696
+ * {@link InvalidEntityError}
6697
+ */
6698
+ addShake(shakeCameraOptions: CameraShakeOptions): void;
6604
6699
  /**
6605
6700
  * @remarks
6606
6701
  * Attaches the camera to a non-player entity.
@@ -6706,6 +6801,34 @@ export class Camera {
6706
6801
  * @throws This function can throw errors.
6707
6802
  */
6708
6803
  setFov(fovCameraOptions?: CameraFovOptions): void;
6804
+ /**
6805
+ * @beta
6806
+ * @remarks
6807
+ * This function can't be called in restricted-execution mode.
6808
+ *
6809
+ * @throws This function can throw errors.
6810
+ *
6811
+ * {@link InvalidEntityError}
6812
+ */
6813
+ stopShaking(): void;
6814
+ }
6815
+
6816
+ /**
6817
+ * @beta
6818
+ * Loot item function that will try to copy the block entity
6819
+ * data from the destroyed block to the dropped item.
6820
+ */
6821
+ // @ts-ignore Class inheritance allowed for native defined classes
6822
+ export class CarryOverBlockEntityDataFunction extends LootItemFunction {
6823
+ private constructor();
6824
+ /**
6825
+ * @remarks
6826
+ * If true, and if the block entity had dynamic_properties, the
6827
+ * function will copy the dynamic properties from the block
6828
+ * entity to the dropped item.
6829
+ *
6830
+ */
6831
+ readonly dynamicProperties: boolean;
6709
6832
  }
6710
6833
 
6711
6834
  /**
@@ -8472,13 +8595,14 @@ export class Dimension {
8472
8595
  getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
8473
8596
  /**
8474
8597
  * @remarks
8475
- * Gets all the blocks in a volume that satisfy the filter.
8598
+ * Gets all the blocks in a volume that satisfy the block query
8599
+ * options.
8476
8600
  *
8477
8601
  * @param volume
8478
8602
  * Volume of blocks that will be checked.
8479
- * @param filter
8480
- * Block filter that will be checked against each block in the
8481
- * volume.
8603
+ * @param options
8604
+ * Block query options including filter criteria and optional
8605
+ * closest/farthest distance sorting from a location.
8482
8606
  * @param allowUnloadedChunks
8483
8607
  * If set to true will suppress the UnloadedChunksError if some
8484
8608
  * or all of the block volume is outside of the loaded chunks.
@@ -8487,14 +8611,18 @@ export class Dimension {
8487
8611
  * Defaults to: false
8488
8612
  * @returns
8489
8613
  * Returns the ListBlockVolume that contains all the block
8490
- * locations that satisfied the block filter.
8614
+ * locations that satisfied the block query options.
8491
8615
  * @throws This function can throw errors.
8492
8616
  *
8617
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
8618
+ *
8493
8619
  * {@link Error}
8494
8620
  *
8621
+ * {@link minecraftcommon.InvalidArgumentError}
8622
+ *
8495
8623
  * {@link UnloadedChunksError}
8496
8624
  */
8497
- getBlocks(volume: BlockVolumeBase, filter: BlockFilter, allowUnloadedChunks?: boolean): ListBlockVolume;
8625
+ getBlocks(volume: BlockVolumeBase, options: BlockQueryOptions, allowUnloadedChunks?: boolean): ListBlockVolume;
8498
8626
  /**
8499
8627
  * @remarks
8500
8628
  * Returns a set of entities based on a set of conditions
@@ -9635,7 +9763,7 @@ export class Entity {
9635
9763
  */
9636
9764
  readonly location: Vector3;
9637
9765
  /**
9638
- * @beta
9766
+ * @rc
9639
9767
  * @remarks
9640
9768
  * Boolean which determines if the player nameplate should be
9641
9769
  * depth tested for visibility.
@@ -9645,7 +9773,7 @@ export class Entity {
9645
9773
  */
9646
9774
  nameplateDepthTested: boolean;
9647
9775
  /**
9648
- * @beta
9776
+ * @rc
9649
9777
  * @remarks
9650
9778
  * Float that determines the render distance of this entity's
9651
9779
  * nameplate.
@@ -13814,6 +13942,54 @@ export class EntityStartSneakingAfterEventSignal {
13814
13942
  unsubscribe(callback: (arg0: EntityStartSneakingAfterEvent) => void): void;
13815
13943
  }
13816
13944
 
13945
+ /**
13946
+ * @beta
13947
+ * Contains data related to an entity stopping sneaking.
13948
+ */
13949
+ export class EntityStopSneakingAfterEvent {
13950
+ private constructor();
13951
+ /**
13952
+ * @remarks
13953
+ * Entity that has stopped sneaking.
13954
+ *
13955
+ */
13956
+ readonly entity: Entity;
13957
+ }
13958
+
13959
+ /**
13960
+ * @beta
13961
+ * Manages callbacks that are connected to when an entity stops
13962
+ * sneaking.
13963
+ */
13964
+ export class EntityStopSneakingAfterEventSignal {
13965
+ private constructor();
13966
+ /**
13967
+ * @remarks
13968
+ * Adds a callback that will be called when an entity stops
13969
+ * sneaking.
13970
+ *
13971
+ * This function can't be called in restricted-execution mode.
13972
+ *
13973
+ * This function can be called in early-execution mode.
13974
+ *
13975
+ */
13976
+ subscribe(
13977
+ callback: (arg0: EntityStopSneakingAfterEvent) => void,
13978
+ options?: EntitySneakingChangedEventOptions,
13979
+ ): (arg0: EntityStopSneakingAfterEvent) => void;
13980
+ /**
13981
+ * @remarks
13982
+ * Removes a callback from being called when an entity stops
13983
+ * sneaking.
13984
+ *
13985
+ * This function can't be called in restricted-execution mode.
13986
+ *
13987
+ * This function can be called in early-execution mode.
13988
+ *
13989
+ */
13990
+ unsubscribe(callback: (arg0: EntityStopSneakingAfterEvent) => void): void;
13991
+ }
13992
+
13817
13993
  /**
13818
13994
  * Defines the entity's ability to carry items. An entity with
13819
13995
  * a higher strength would have higher potential carry capacity
@@ -13901,6 +14077,44 @@ export class EntityTameableComponent extends EntityComponent {
13901
14077
  tame(player: Player): boolean;
13902
14078
  }
13903
14079
 
14080
+ /**
14081
+ * @beta
14082
+ * Contains data related to an entity being tamed.
14083
+ */
14084
+ export class EntityTamedAfterEvent {
14085
+ private constructor();
14086
+ readonly entity: Entity;
14087
+ readonly tamingEntity: Entity;
14088
+ }
14089
+
14090
+ /**
14091
+ * @beta
14092
+ * Manages callbacks that are connected to when an entity is
14093
+ * tamed.
14094
+ */
14095
+ export class EntityTamedAfterEventSignal {
14096
+ private constructor();
14097
+ /**
14098
+ * @remarks
14099
+ * This function can't be called in restricted-execution mode.
14100
+ *
14101
+ * This function can be called in early-execution mode.
14102
+ *
14103
+ */
14104
+ subscribe(
14105
+ callback: (arg0: EntityTamedAfterEvent) => void,
14106
+ options?: EntityTamedEventFilter,
14107
+ ): (arg0: EntityTamedAfterEvent) => void;
14108
+ /**
14109
+ * @remarks
14110
+ * This function can't be called in restricted-execution mode.
14111
+ *
14112
+ * This function can be called in early-execution mode.
14113
+ *
14114
+ */
14115
+ unsubscribe(callback: (arg0: EntityTamedAfterEvent) => void): void;
14116
+ }
14117
+
13904
14118
  /**
13905
14119
  * Contains options for taming a rideable entity based on the
13906
14120
  * entity that mounts it.
@@ -14764,6 +14978,42 @@ export class ISerializable {
14764
14978
  private constructor();
14765
14979
  }
14766
14980
 
14981
+ /**
14982
+ * @beta
14983
+ * Represents the dynamic properties of a block. Only available
14984
+ * from block entities. Up to 1KBytes of data can be stored per
14985
+ * block entity in their dynamic properties storage.
14986
+ */
14987
+ // @ts-ignore Class inheritance allowed for native defined classes
14988
+ export class ItemBlockDynamicPropertiesComponent extends ItemComponent {
14989
+ private constructor();
14990
+ static readonly componentId = 'minecraft:block_actor_dynamic_properties';
14991
+ /**
14992
+ * @remarks
14993
+ * Returns a DynamicProperty that was stored with the provided
14994
+ * key. Keys are unique to each content pack and cannot be used
14995
+ * to retrieve dynamic properties set from other content packs.
14996
+ * Returns undefined if the key was not found.
14997
+ *
14998
+ * @throws This function can throw errors.
14999
+ *
15000
+ * {@link Error}
15001
+ *
15002
+ * {@link InvalidItemStackError}
15003
+ */
15004
+ get(key: string): boolean | number | string | Vector3 | undefined;
15005
+ /**
15006
+ * @remarks
15007
+ * Returns the current size, in bytes, of the dynamic
15008
+ * properties storage for this block.
15009
+ *
15010
+ * @throws This function can throw errors.
15011
+ *
15012
+ * {@link InvalidItemStackError}
15013
+ */
15014
+ totalByteCount(): number;
15015
+ }
15016
+
14767
15017
  /**
14768
15018
  * When present on an item, this item is a book item. Can
14769
15019
  * access and modify the contents of the book and sign it.
@@ -21832,13 +22082,201 @@ export class SmeltItemFunction extends LootItemFunction {
21832
22082
 
21833
22083
  /**
21834
22084
  * @beta
21835
- * Represents a handle to a sound that has been played.
22085
+ * Contains information about a sound thats declared duration
22086
+ * elapsed.
22087
+ */
22088
+ export class SoundCompletedAfterEvent {
22089
+ private constructor();
22090
+ /**
22091
+ * @remarks
22092
+ * Identifier of the sound instance that completed. Matches the
22093
+ * `id` property of the `SoundInstance` returned when the sound
22094
+ * was played.
22095
+ *
22096
+ */
22097
+ readonly soundInstanceId: string;
22098
+ }
22099
+
22100
+ /**
22101
+ * @beta
22102
+ * Manages callbacks that are invoked when a tracked sound's
22103
+ * declared duration elapses.
22104
+ */
22105
+ export class SoundCompletedAfterEventSignal {
22106
+ private constructor();
22107
+ /**
22108
+ * @remarks
22109
+ * Adds a callback that will be invoked when a tracked sound's
22110
+ * declared duration elapses.
22111
+ *
22112
+ * This function can't be called in restricted-execution mode.
22113
+ *
22114
+ * This function can be called in early-execution mode.
22115
+ *
22116
+ */
22117
+ subscribe(callback: (arg0: SoundCompletedAfterEvent) => void): (arg0: SoundCompletedAfterEvent) => void;
22118
+ /**
22119
+ * @remarks
22120
+ * Removes a callback from being invoked when a tracked sound's
22121
+ * declared duration elapses.
22122
+ *
22123
+ * This function can't be called in restricted-execution mode.
22124
+ *
22125
+ * This function can be called in early-execution mode.
22126
+ *
22127
+ */
22128
+ unsubscribe(callback: (arg0: SoundCompletedAfterEvent) => void): void;
22129
+ }
22130
+
22131
+ /**
22132
+ * @beta
22133
+ * Provides duration and playback information for a sound whose
22134
+ * definition declares a duration.
22135
+ */
22136
+ export class SoundDurationInfo {
22137
+ private constructor();
22138
+ /**
22139
+ * @remarks
22140
+ * Gets the total duration of the sound in seconds.
22141
+ *
22142
+ */
22143
+ readonly duration: number;
22144
+ /**
22145
+ * @remarks
22146
+ * Gets whether the sound is still being tracked.
22147
+ *
22148
+ */
22149
+ readonly isActive: boolean;
22150
+ /**
22151
+ * @remarks
22152
+ * Returns the elapsed playback time of the sound, in seconds,
22153
+ * since it started playing.
22154
+ *
22155
+ * This function can't be called in restricted-execution mode.
22156
+ *
22157
+ * @returns
22158
+ * Elapsed playback time in seconds.
22159
+ */
22160
+ getPlaybackPosition(): number;
22161
+ }
22162
+
22163
+ /**
22164
+ * Represents a handle to a sound that has been played. The
22165
+ * handle is required to control the sound while it is playing
22166
+ * (for example, to call `stop`, `setVolume`, `setPitch`,
22167
+ * `fade`, or `seekTo`). Infinitely-looping sounds (started
22168
+ * with `loop: -1`) stop automatically when the last
22169
+ * `SoundInstance` reference is dropped; retain the handle for
22170
+ * as long as the sound should keep playing.
21836
22171
  */
21837
22172
  export class SoundInstance {
21838
22173
  private constructor();
21839
22174
  /**
22175
+ * @beta
21840
22176
  * @remarks
21841
- * Stops this sound from playing.
22177
+ * Gets duration and playback information for this sound.
22178
+ *
22179
+ */
22180
+ readonly durationInfo?: SoundDurationInfo;
22181
+ /**
22182
+ * @beta
22183
+ * @remarks
22184
+ * Unique identifier of this sound instance.
22185
+ *
22186
+ */
22187
+ readonly id: string;
22188
+ /**
22189
+ * @beta
22190
+ * @remarks
22191
+ * Gets the player this sound was played for.
22192
+ *
22193
+ */
22194
+ readonly recipient?: Player;
22195
+ /**
22196
+ * @beta
22197
+ * @remarks
22198
+ * Gets the identifier of the sound event this instance was
22199
+ * started with.
22200
+ *
22201
+ */
22202
+ readonly soundEventId: string;
22203
+ /**
22204
+ * @beta
22205
+ * @remarks
22206
+ * Fades this sound instance from its current volume to the
22207
+ * target volume over the specified duration. To fade in from
22208
+ * silence, call `setVolume(0.0)` first; to fade out, pass a
22209
+ * target volume of `0.0`.
22210
+ *
22211
+ * This function can't be called in restricted-execution mode.
22212
+ *
22213
+ * @param duration
22214
+ * Duration of the fade in seconds. Must be non-negative.
22215
+ * Minimum value: 0
22216
+ * @param targetVolume
22217
+ * Volume to fade to. Must be non-negative.
22218
+ * Minimum value: 0
22219
+ */
22220
+ fade(duration: number, targetVolume: number): void;
22221
+ /**
22222
+ * @beta
22223
+ * @remarks
22224
+ * Pauses this sound.
22225
+ *
22226
+ * This function can't be called in restricted-execution mode.
22227
+ *
22228
+ */
22229
+ pause(): void;
22230
+ /**
22231
+ * @beta
22232
+ * @remarks
22233
+ * Resumes this sound after a pause.
22234
+ *
22235
+ * This function can't be called in restricted-execution mode.
22236
+ *
22237
+ */
22238
+ resume(): void;
22239
+ /**
22240
+ * @beta
22241
+ * @remarks
22242
+ * Sets the playback position of this sound instance.
22243
+ *
22244
+ * This function can't be called in restricted-execution mode.
22245
+ *
22246
+ * @param seconds
22247
+ * Position to seek to in seconds. Must be non-negative.
22248
+ * Minimum value: 0
22249
+ */
22250
+ seekTo(seconds: number): void;
22251
+ /**
22252
+ * @beta
22253
+ * @remarks
22254
+ * Sets the pitch of this sound instance.
22255
+ *
22256
+ * This function can't be called in restricted-execution mode.
22257
+ *
22258
+ * @param pitch
22259
+ * Pitch multiplier between 0.01 and 10.0. A value of 1.0 is
22260
+ * normal pitch.
22261
+ * Bounds: [0.009999999776482582, 10]
22262
+ */
22263
+ setPitch(pitch: number): void;
22264
+ /**
22265
+ * @beta
22266
+ * @remarks
22267
+ * Sets the volume of this sound instance.
22268
+ *
22269
+ * This function can't be called in restricted-execution mode.
22270
+ *
22271
+ * @param volume
22272
+ * Volume level between 0.0 and 10.0.
22273
+ * Bounds: [0, 10]
22274
+ */
22275
+ setVolume(volume: number): void;
22276
+ /**
22277
+ * @rc
22278
+ * @remarks
22279
+ * Stops this sound instance from playing.
21842
22280
  *
21843
22281
  * This function can't be called in restricted-execution mode.
21844
22282
  *
@@ -23979,6 +24417,24 @@ export class WorldAfterEvents {
23979
24417
  *
23980
24418
  */
23981
24419
  readonly entityStartSneaking: EntityStartSneakingAfterEventSignal;
24420
+ /**
24421
+ * @beta
24422
+ * @remarks
24423
+ * This event fires when an entity stops sneaking.
24424
+ *
24425
+ * This property can be read in early-execution mode.
24426
+ *
24427
+ */
24428
+ readonly entityStopSneaking: EntityStopSneakingAfterEventSignal;
24429
+ /**
24430
+ * @beta
24431
+ * @remarks
24432
+ * This event fires when an entity is tamed.
24433
+ *
24434
+ * This property can be read in early-execution mode.
24435
+ *
24436
+ */
24437
+ readonly entityTamed: EntityTamedAfterEventSignal;
23982
24438
  /**
23983
24439
  * @rc
23984
24440
  * @remarks
@@ -24292,6 +24748,15 @@ export class WorldAfterEvents {
24292
24748
  *
24293
24749
  */
24294
24750
  readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
24751
+ /**
24752
+ * @beta
24753
+ * @remarks
24754
+ * A tracked sound's declared duration elapsed.
24755
+ *
24756
+ * This property can be read in early-execution mode.
24757
+ *
24758
+ */
24759
+ readonly soundCompleted: SoundCompletedAfterEventSignal;
24295
24760
  /**
24296
24761
  * @remarks
24297
24762
  * A target block was hit.
@@ -24833,6 +25298,40 @@ export interface BlockHitInformation {
24833
25298
  faceLocation: Vector3;
24834
25299
  }
24835
25300
 
25301
+ /**
25302
+ * @beta
25303
+ * Options for querying blocks in a volume. Extends BlockFilter
25304
+ * with additional sorting and limiting options based on
25305
+ * distance from a location.
25306
+ */
25307
+ // @ts-ignore Class inheritance allowed for native defined classes
25308
+ export interface BlockQueryOptions extends BlockFilter {
25309
+ /**
25310
+ * @remarks
25311
+ * If specified, returns the closest N blocks to the location.
25312
+ * Must be greater than 0. Cannot be used with farthest.
25313
+ * Requires location to be set.
25314
+ *
25315
+ */
25316
+ closest?: number;
25317
+ /**
25318
+ * @remarks
25319
+ * If specified, returns the farthest N blocks from the
25320
+ * location. Must be greater than 0. Cannot be used with
25321
+ * closest. Requires location to be set.
25322
+ *
25323
+ */
25324
+ farthest?: number;
25325
+ /**
25326
+ * @remarks
25327
+ * Location used as the reference point for closest or farthest
25328
+ * distance calculations. Required when closest or farthest is
25329
+ * specified.
25330
+ *
25331
+ */
25332
+ location?: Vector3;
25333
+ }
25334
+
24836
25335
  /**
24837
25336
  * Contains information for block raycast hit results.
24838
25337
  */
@@ -25003,6 +25502,44 @@ export interface CameraSetRotOptions {
25003
25502
  rotation: Vector2;
25004
25503
  }
25005
25504
 
25505
+ /**
25506
+ * @beta
25507
+ * Options for applying a camera shake effect to a player's
25508
+ * camera via `Camera.addShake`. Each call to `addShake` queues
25509
+ * a new independent shake event for the specified `type`;
25510
+ * positional and rotational shakes are tracked in separate
25511
+ * queues and run concurrently. The rendered intensity at any
25512
+ * moment is the sum of all active events' intensities for that
25513
+ * type, capped at `4.0`. Events expire naturally when their
25514
+ * `duration` elapses.
25515
+ */
25516
+ export interface CameraShakeOptions {
25517
+ /**
25518
+ * @remarks
25519
+ * How long this shake event lasts, in seconds. Must be a
25520
+ * positive value.
25521
+ *
25522
+ */
25523
+ duration: number;
25524
+ /**
25525
+ * @remarks
25526
+ * The intensity of this shake event. Must be a positive value
25527
+ * with a maximum of `4.0`. Multiple active events of the same
25528
+ * `type` are summed, capped at `4.0`.
25529
+ *
25530
+ */
25531
+ intensity: number;
25532
+ /**
25533
+ * @remarks
25534
+ * The type of camera shake to apply. Positional and rotational
25535
+ * shakes maintain separate event queues and are applied
25536
+ * concurrently, so adding a shake of each type does not cause
25537
+ * them to interfere with one another.
25538
+ *
25539
+ */
25540
+ type: CameraShakeType;
25541
+ }
25542
+
25006
25543
  /**
25007
25544
  * Used to target an entity with a free camera.
25008
25545
  */
@@ -26074,6 +26611,15 @@ export interface EntitySneakingChangedEventOptions {
26074
26611
  entityFilter?: EntityFilter;
26075
26612
  }
26076
26613
 
26614
+ /**
26615
+ * @beta
26616
+ * Contains options for filtering entity tamed events.
26617
+ */
26618
+ export interface EntityTamedEventFilter {
26619
+ entityFilter?: EntityFilter;
26620
+ tamingEntityFilter?: EntityFilter;
26621
+ }
26622
+
26077
26623
  /**
26078
26624
  * @rc
26079
26625
  * Controls when a waypoint is visible based on the state of
@@ -26618,6 +27164,19 @@ export interface PlayerSoundOptions {
26618
27164
  *
26619
27165
  */
26620
27166
  location?: Vector3;
27167
+ /**
27168
+ * @beta
27169
+ * @remarks
27170
+ * Number of additional times to repeat the sound after the
27171
+ * initial play. `0` (the default) plays the sound once, `-1`
27172
+ * loops it forever, and a positive integer `N` plays the sound
27173
+ * `N + 1` times in total. For example, `loopCount: 1` plays
27174
+ * the sound twice. The loop count is fixed when the sound
27175
+ * starts and cannot be changed afterward. When using `-1`, see
27176
+ * `SoundInstance` for handle lifetime requirements.
27177
+ *
27178
+ */
27179
+ loopCount?: number;
26621
27180
  /**
26622
27181
  * @remarks
26623
27182
  * Optional pitch of the sound.
@@ -27444,6 +28003,19 @@ export interface WaypointTextureSelector {
27444
28003
  * Contains additional options for a playSound occurrence.
27445
28004
  */
27446
28005
  export interface WorldSoundOptions {
28006
+ /**
28007
+ * @beta
28008
+ * @remarks
28009
+ * Number of additional times to repeat the sound after the
28010
+ * initial play. `0` (the default) plays the sound once, `-1`
28011
+ * loops it forever, and a positive integer `N` plays the sound
28012
+ * `N + 1` times in total. For example, `loopCount: 1` plays
28013
+ * the sound twice. The loop count is fixed when the sound
28014
+ * starts and cannot be changed afterward. When using `-1`, see
28015
+ * `SoundInstance` for handle lifetime requirements.
28016
+ *
28017
+ */
28018
+ loopCount?: number;
27447
28019
  /**
27448
28020
  * @remarks
27449
28021
  * Pitch of the sound played.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.9.0-beta.1.26.30-preview.32",
3
+ "version": "2.10.0-beta.1.26.40-preview.20",
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.30-preview.32"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.20"
18
18
  },
19
19
  "license": "MIT"
20
20
  }