@minecraft/server 2.10.0-beta.1.26.40-preview.26 → 2.10.0-beta.1.26.40-preview.29
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 +240 -27
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -5238,7 +5238,7 @@ export class BlockCustomComponentInstance extends BlockComponent {
|
|
|
5238
5238
|
* pack, per block entity in their dynamic properties storage.
|
|
5239
5239
|
* @example rememberPlayerInteraction.ts
|
|
5240
5240
|
* ```typescript
|
|
5241
|
-
* import { system } from '@minecraft/server-
|
|
5241
|
+
* import { system } from '@minecraft/server-v2';
|
|
5242
5242
|
*
|
|
5243
5243
|
* system.beforeEvents.startup.subscribe(initEvent => {
|
|
5244
5244
|
* initEvent.blockComponentRegistry.registerCustomComponent('scripting_demo_pack:block_entity_onPlayerInteract', {
|
|
@@ -8376,6 +8376,38 @@ export class Dimension {
|
|
|
8376
8376
|
*
|
|
8377
8377
|
*/
|
|
8378
8378
|
readonly localizationKey: string;
|
|
8379
|
+
/**
|
|
8380
|
+
* @rc
|
|
8381
|
+
* @remarks
|
|
8382
|
+
* Calculates the location of the closest biome of a particular
|
|
8383
|
+
* type from the world seed. Note that
|
|
8384
|
+
* calculateClosestBiomeFromSeed can be an expensive operation,
|
|
8385
|
+
* so avoid using many of these calls within a particular tick.
|
|
8386
|
+
* The result is derived purely from the world generation
|
|
8387
|
+
* algorithm and the world seed, so the returned location may
|
|
8388
|
+
* not reflect the actual current terrain if biomes have been
|
|
8389
|
+
* modified after generation.
|
|
8390
|
+
*
|
|
8391
|
+
* @param pos
|
|
8392
|
+
* Starting location to look for a biome to find.
|
|
8393
|
+
* @param biomeToFind
|
|
8394
|
+
* Identifier of the biome to look for.
|
|
8395
|
+
* @param options
|
|
8396
|
+
* Additional selection criteria for a biome search.
|
|
8397
|
+
* @returns
|
|
8398
|
+
* Returns a location of the biome, or undefined if a biome
|
|
8399
|
+
* could not be found.
|
|
8400
|
+
* @throws This function can throw errors.
|
|
8401
|
+
*
|
|
8402
|
+
* {@link minecraftcommon.EngineError}
|
|
8403
|
+
*
|
|
8404
|
+
* {@link Error}
|
|
8405
|
+
*/
|
|
8406
|
+
calculateClosestBiomeFromSeed(
|
|
8407
|
+
pos: Vector3,
|
|
8408
|
+
biomeToFind: BiomeType | string,
|
|
8409
|
+
options?: BiomeSearchOptions,
|
|
8410
|
+
): Vector3 | undefined;
|
|
8379
8411
|
/**
|
|
8380
8412
|
* @remarks
|
|
8381
8413
|
* Checks if an area contains the specified biomes. If the area
|
|
@@ -8532,30 +8564,6 @@ export class Dimension {
|
|
|
8532
8564
|
block: BlockPermutation | BlockType | string,
|
|
8533
8565
|
options?: BlockFillOptions,
|
|
8534
8566
|
): ListBlockVolume;
|
|
8535
|
-
/**
|
|
8536
|
-
* @beta
|
|
8537
|
-
* @remarks
|
|
8538
|
-
* Finds the location of the closest biome of a particular
|
|
8539
|
-
* type. Note that the findClosestBiome operation can take some
|
|
8540
|
-
* time to complete, so avoid using many of these calls within
|
|
8541
|
-
* a particular tick.
|
|
8542
|
-
*
|
|
8543
|
-
* @param pos
|
|
8544
|
-
* Starting location to look for a biome to find.
|
|
8545
|
-
* @param biomeToFind
|
|
8546
|
-
* Identifier of the biome to look for.
|
|
8547
|
-
* @param options
|
|
8548
|
-
* Additional selection criteria for a biome search.
|
|
8549
|
-
* @returns
|
|
8550
|
-
* Returns a location of the biome, or undefined if a biome
|
|
8551
|
-
* could not be found.
|
|
8552
|
-
* @throws This function can throw errors.
|
|
8553
|
-
*
|
|
8554
|
-
* {@link minecraftcommon.EngineError}
|
|
8555
|
-
*
|
|
8556
|
-
* {@link Error}
|
|
8557
|
-
*/
|
|
8558
|
-
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
8559
8567
|
/**
|
|
8560
8568
|
* @remarks
|
|
8561
8569
|
* Returns the biome type at the specified location.
|
|
@@ -18536,7 +18544,7 @@ export class Player extends Entity {
|
|
|
18536
18544
|
* }
|
|
18537
18545
|
* ```
|
|
18538
18546
|
*/
|
|
18539
|
-
playSound(soundId: string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18547
|
+
playSound(soundId: SoundDefinition | string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18540
18548
|
/**
|
|
18541
18549
|
* @beta
|
|
18542
18550
|
* @remarks
|
|
@@ -22256,6 +22264,73 @@ export class SoundCompletedAfterEventSignal {
|
|
|
22256
22264
|
unsubscribe(callback: (arg0: SoundCompletedAfterEvent) => void): void;
|
|
22257
22265
|
}
|
|
22258
22266
|
|
|
22267
|
+
/**
|
|
22268
|
+
* @beta
|
|
22269
|
+
* Static metadata about a sound declared in a
|
|
22270
|
+
* sound_definitions.json file.
|
|
22271
|
+
*/
|
|
22272
|
+
export class SoundDefinition {
|
|
22273
|
+
private constructor();
|
|
22274
|
+
/**
|
|
22275
|
+
* @remarks
|
|
22276
|
+
* Duration metadata declared for this sound. Undefined when
|
|
22277
|
+
* the sound definition does not specify a duration.
|
|
22278
|
+
*
|
|
22279
|
+
*/
|
|
22280
|
+
readonly durationInfo?: SoundDefinitionDurationInfo;
|
|
22281
|
+
/**
|
|
22282
|
+
* @remarks
|
|
22283
|
+
* Music metadata declared for this sound. Undefined when the
|
|
22284
|
+
* sound definition does not specify a music_info block.
|
|
22285
|
+
*
|
|
22286
|
+
*/
|
|
22287
|
+
readonly musicInfo?: SoundDefinitionMusicInfo;
|
|
22288
|
+
/**
|
|
22289
|
+
* @remarks
|
|
22290
|
+
* Identifier of the sound event this definition declares, in
|
|
22291
|
+
* the form 'namespace:name'.
|
|
22292
|
+
*
|
|
22293
|
+
*/
|
|
22294
|
+
readonly soundEventId: string;
|
|
22295
|
+
/**
|
|
22296
|
+
* @remarks
|
|
22297
|
+
* Tag metadata declared for this sound, as a record mapping
|
|
22298
|
+
* each tag name to its declared values. A tag declared with a
|
|
22299
|
+
* single string value is exposed as a single-element array.
|
|
22300
|
+
* Undefined when the sound definition does not specify any
|
|
22301
|
+
* tags.
|
|
22302
|
+
*
|
|
22303
|
+
*/
|
|
22304
|
+
readonly tags?: Record<string, string[]>;
|
|
22305
|
+
}
|
|
22306
|
+
|
|
22307
|
+
/**
|
|
22308
|
+
* @beta
|
|
22309
|
+
* Provides read-only access to the sound definitions loaded
|
|
22310
|
+
* for the current world.
|
|
22311
|
+
*/
|
|
22312
|
+
export class SoundDefinitionRegistry {
|
|
22313
|
+
private constructor();
|
|
22314
|
+
/**
|
|
22315
|
+
* @remarks
|
|
22316
|
+
* Returns the sound definitions in the registry, optionally
|
|
22317
|
+
* narrowed by a filter.
|
|
22318
|
+
*
|
|
22319
|
+
* @param filter
|
|
22320
|
+
* Optional filter applied to each definition. When omitted,
|
|
22321
|
+
* every definition is returned.
|
|
22322
|
+
* @returns
|
|
22323
|
+
* All sound definitions matching the filter, or every sound
|
|
22324
|
+
* definition when no filter is supplied.
|
|
22325
|
+
* @throws
|
|
22326
|
+
* An error will be thrown if filter.minDuration is greater
|
|
22327
|
+
* than filter.maxDuration.
|
|
22328
|
+
*
|
|
22329
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
22330
|
+
*/
|
|
22331
|
+
getDefinitions(filter?: SoundDefinitionFilter): SoundDefinition[];
|
|
22332
|
+
}
|
|
22333
|
+
|
|
22259
22334
|
/**
|
|
22260
22335
|
* @beta
|
|
22261
22336
|
* Provides duration and playback information for a sound whose
|
|
@@ -23876,6 +23951,14 @@ export class World {
|
|
|
23876
23951
|
*
|
|
23877
23952
|
*/
|
|
23878
23953
|
readonly seed: string;
|
|
23954
|
+
/**
|
|
23955
|
+
* @beta
|
|
23956
|
+
* @remarks
|
|
23957
|
+
* Provides read-only access to the sound definitions loaded
|
|
23958
|
+
* for this world.
|
|
23959
|
+
*
|
|
23960
|
+
*/
|
|
23961
|
+
readonly soundDefinitionRegistry: SoundDefinitionRegistry;
|
|
23879
23962
|
/**
|
|
23880
23963
|
* @remarks
|
|
23881
23964
|
* Returns the manager for {@link Structure} related APIs.
|
|
@@ -25142,7 +25225,7 @@ export interface BiomeFilter {
|
|
|
25142
25225
|
}
|
|
25143
25226
|
|
|
25144
25227
|
/**
|
|
25145
|
-
* @
|
|
25228
|
+
* @rc
|
|
25146
25229
|
* Contains additional options for searches for the
|
|
25147
25230
|
* dimension.findNearestBiome API.
|
|
25148
25231
|
*/
|
|
@@ -27684,6 +27767,136 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
27684
27767
|
namespaces: string[];
|
|
27685
27768
|
}
|
|
27686
27769
|
|
|
27770
|
+
/**
|
|
27771
|
+
* @beta
|
|
27772
|
+
* Duration metadata declared in a sound definition.
|
|
27773
|
+
*/
|
|
27774
|
+
export interface SoundDefinitionDurationInfo {
|
|
27775
|
+
/**
|
|
27776
|
+
* @remarks
|
|
27777
|
+
* Total duration of the sound in seconds, as declared in the
|
|
27778
|
+
* sound definition.
|
|
27779
|
+
*
|
|
27780
|
+
*/
|
|
27781
|
+
duration: number;
|
|
27782
|
+
}
|
|
27783
|
+
|
|
27784
|
+
/**
|
|
27785
|
+
* @beta
|
|
27786
|
+
* Criteria used to narrow a set of sound definitions. Each
|
|
27787
|
+
* field is optional and applies its constraint only when
|
|
27788
|
+
* defined; a definition must satisfy every defined field to
|
|
27789
|
+
* pass.
|
|
27790
|
+
*/
|
|
27791
|
+
export interface SoundDefinitionFilter {
|
|
27792
|
+
/**
|
|
27793
|
+
* @remarks
|
|
27794
|
+
* Artist names to match against the definition's
|
|
27795
|
+
* music_info.artist. Comparison is case-insensitive. When
|
|
27796
|
+
* defined as a non-empty array, a definition passes only when
|
|
27797
|
+
* its declared artist matches one of the supplied values. When
|
|
27798
|
+
* undefined, no constraint on artist is applied.
|
|
27799
|
+
*
|
|
27800
|
+
*/
|
|
27801
|
+
artists?: string[];
|
|
27802
|
+
/**
|
|
27803
|
+
* @remarks
|
|
27804
|
+
* Genres to match against the definition's music_info.genres.
|
|
27805
|
+
* Comparison is case-insensitive. When defined as a non-empty
|
|
27806
|
+
* array, a definition passes only when at least one of its
|
|
27807
|
+
* declared genres matches one of the supplied values. When
|
|
27808
|
+
* undefined, no constraint on genres is applied.
|
|
27809
|
+
*
|
|
27810
|
+
*/
|
|
27811
|
+
genres?: string[];
|
|
27812
|
+
/**
|
|
27813
|
+
* @remarks
|
|
27814
|
+
* Upper bound in seconds, inclusive. When defined, definitions
|
|
27815
|
+
* with a longer duration and definitions without a declared
|
|
27816
|
+
* duration are excluded. When undefined, no upper bound is
|
|
27817
|
+
* applied.
|
|
27818
|
+
*
|
|
27819
|
+
*/
|
|
27820
|
+
maxDuration?: number;
|
|
27821
|
+
/**
|
|
27822
|
+
* @remarks
|
|
27823
|
+
* Lower bound in seconds, inclusive. When defined, definitions
|
|
27824
|
+
* with a shorter duration and definitions without a declared
|
|
27825
|
+
* duration are excluded. When undefined, no lower bound is
|
|
27826
|
+
* applied.
|
|
27827
|
+
*
|
|
27828
|
+
*/
|
|
27829
|
+
minDuration?: number;
|
|
27830
|
+
/**
|
|
27831
|
+
* @remarks
|
|
27832
|
+
* Moods to match against the definition's music_info.moods.
|
|
27833
|
+
* Comparison is case-insensitive. When defined as a non-empty
|
|
27834
|
+
* array, a definition passes only when at least one of its
|
|
27835
|
+
* declared moods matches one of the supplied values. When
|
|
27836
|
+
* undefined, no constraint on moods is applied.
|
|
27837
|
+
*
|
|
27838
|
+
*/
|
|
27839
|
+
moods?: string[];
|
|
27840
|
+
/**
|
|
27841
|
+
* @remarks
|
|
27842
|
+
* Tag constraints to match against the definition's tags.
|
|
27843
|
+
* Comparisons of tag names and values are case-insensitive.
|
|
27844
|
+
* When defined as a non-empty record, a definition passes only
|
|
27845
|
+
* when, for each entry with a non-empty value array, the tag
|
|
27846
|
+
* name is present on the definition with at least one matching
|
|
27847
|
+
* value. When undefined, no constraint on tags is applied.
|
|
27848
|
+
*
|
|
27849
|
+
*/
|
|
27850
|
+
tags?: Record<string, string[]>;
|
|
27851
|
+
/**
|
|
27852
|
+
* @remarks
|
|
27853
|
+
* Titles to match against the definition's music_info.title.
|
|
27854
|
+
* Comparison is case-insensitive. When defined as a non-empty
|
|
27855
|
+
* array, a definition passes only when its declared title
|
|
27856
|
+
* matches one of the supplied values. When undefined, no
|
|
27857
|
+
* constraint on title is applied.
|
|
27858
|
+
*
|
|
27859
|
+
*/
|
|
27860
|
+
titles?: string[];
|
|
27861
|
+
}
|
|
27862
|
+
|
|
27863
|
+
/**
|
|
27864
|
+
* @beta
|
|
27865
|
+
* Music metadata declared on a sound definition. Each field is
|
|
27866
|
+
* optional and is undefined when the sound definition does not
|
|
27867
|
+
* declare a value for it.
|
|
27868
|
+
*/
|
|
27869
|
+
export interface SoundDefinitionMusicInfo {
|
|
27870
|
+
/**
|
|
27871
|
+
* @remarks
|
|
27872
|
+
* Artist declared for this sound. Undefined when no artist was
|
|
27873
|
+
* declared.
|
|
27874
|
+
*
|
|
27875
|
+
*/
|
|
27876
|
+
artist?: string;
|
|
27877
|
+
/**
|
|
27878
|
+
* @remarks
|
|
27879
|
+
* Genres declared for this sound. Undefined when no genres
|
|
27880
|
+
* were declared.
|
|
27881
|
+
*
|
|
27882
|
+
*/
|
|
27883
|
+
genres?: string[];
|
|
27884
|
+
/**
|
|
27885
|
+
* @remarks
|
|
27886
|
+
* Moods declared for this sound. Undefined when no moods were
|
|
27887
|
+
* declared.
|
|
27888
|
+
*
|
|
27889
|
+
*/
|
|
27890
|
+
moods?: string[];
|
|
27891
|
+
/**
|
|
27892
|
+
* @remarks
|
|
27893
|
+
* Title declared for this sound. Undefined when no title was
|
|
27894
|
+
* declared.
|
|
27895
|
+
*
|
|
27896
|
+
*/
|
|
27897
|
+
title?: string;
|
|
27898
|
+
}
|
|
27899
|
+
|
|
27687
27900
|
/**
|
|
27688
27901
|
* Contains additional options for spawning an Entity.
|
|
27689
27902
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.10.0-beta.1.26.40-preview.
|
|
3
|
+
"version": "2.10.0-beta.1.26.40-preview.29",
|
|
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.40-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.29"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|