@minecraft/server 2.11.0-rc.1.26.60-preview.21 → 2.11.0-rc.1.26.60-preview.25

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 +102 -59
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -47,14 +47,8 @@ export enum AimAssistTargetMode {
47
47
  * function Block.getComponent.
48
48
  */
49
49
  export enum BlockComponentTypes {
50
- /**
51
- * @rc
52
- */
53
50
  DynamicProperties = 'minecraft:dynamic_properties',
54
51
  FluidContainer = 'minecraft:fluid_container',
55
- /**
56
- * @rc
57
- */
58
52
  Instrument = 'minecraft:instrument_sound',
59
53
  /**
60
54
  * @remarks
@@ -202,7 +196,6 @@ export enum ButtonState {
202
196
  }
203
197
 
204
198
  /**
205
- * @rc
206
199
  * Represents the type of shake to apply to the camera.
207
200
  */
208
201
  export enum CameraShakeType {
@@ -221,7 +214,6 @@ export enum CameraShakeType {
221
214
  }
222
215
 
223
216
  /**
224
- * @rc
225
217
  * An enumeration for the clone modes used when cloning blocks.
226
218
  */
227
219
  export enum CloneMode {
@@ -2222,9 +2214,6 @@ export enum InputPermissionCategory {
2222
2214
  * function ItemStack.getComponent.
2223
2215
  */
2224
2216
  export enum ItemComponentTypes {
2225
- /**
2226
- * @rc
2227
- */
2228
2217
  BlockDynamicProperties = 'minecraft:block_actor_dynamic_properties',
2229
2218
  /**
2230
2219
  * @remarks
@@ -4883,7 +4872,6 @@ export class BlockCustomComponentInstance extends BlockComponent {
4883
4872
  }
4884
4873
 
4885
4874
  /**
4886
- * @rc
4887
4875
  * Represents the dynamic properties of a block in the world.
4888
4876
  * Only available with block entities. Up to 1KB per content
4889
4877
  * pack, per block entity in their dynamic properties storage.
@@ -5123,7 +5111,6 @@ export class BlockFluidContainerComponent extends BlockComponent {
5123
5111
  }
5124
5112
 
5125
5113
  /**
5126
- * @rc
5127
5114
  * Represents the instruments a block can have assigned to it's
5128
5115
  * up and down faces.
5129
5116
  */
@@ -6169,7 +6156,6 @@ export class BlockVolumeBase {
6169
6156
  */
6170
6157
  getCapacity(): number;
6171
6158
  /**
6172
- * @rc
6173
6159
  * @remarks
6174
6160
  * Returns a list of block positions within the volume that are
6175
6161
  * closest to a given location, sorted by distance (nearest
@@ -6185,7 +6171,6 @@ export class BlockVolumeBase {
6185
6171
  */
6186
6172
  getClosest(count: number, location: Vector3): Vector3[];
6187
6173
  /**
6188
- * @rc
6189
6174
  * @remarks
6190
6175
  * Returns a list of block positions within the volume that are
6191
6176
  * farthest from a given location, sorted by distance (farthest
@@ -6360,7 +6345,6 @@ export class Camera {
6360
6345
  */
6361
6346
  readonly isValid: boolean;
6362
6347
  /**
6363
- * @rc
6364
6348
  * @remarks
6365
6349
  * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
6366
6350
  *
@@ -6460,7 +6444,6 @@ export class Camera {
6460
6444
  */
6461
6445
  setFov(fovCameraOptions?: CameraFovOptions): void;
6462
6446
  /**
6463
- * @rc
6464
6447
  * @remarks
6465
6448
  * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
6466
6449
  *
@@ -7589,7 +7572,6 @@ export class Dimension {
7589
7572
  options?: BiomeSearchOptions,
7590
7573
  ): Vector3 | undefined;
7591
7574
  /**
7592
- * @rc
7593
7575
  * @remarks
7594
7576
  * Clones a region of blocks from one area of the dimension to
7595
7577
  * another.
@@ -7860,7 +7842,6 @@ export class Dimension {
7860
7842
  */
7861
7843
  getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
7862
7844
  /**
7863
- * @rc
7864
7845
  * @remarks
7865
7846
  * Gets all the blocks in a volume that satisfy the filter.
7866
7847
  *
@@ -12898,7 +12879,6 @@ export class EntitySpawnAfterEventSignal {
12898
12879
  }
12899
12880
 
12900
12881
  /**
12901
- * @rc
12902
12882
  * Contains data related to an entity beginning to sneak.
12903
12883
  */
12904
12884
  export class EntityStartSneakingAfterEvent {
@@ -12912,7 +12892,6 @@ export class EntityStartSneakingAfterEvent {
12912
12892
  }
12913
12893
 
12914
12894
  /**
12915
- * @rc
12916
12895
  * Manages callbacks that are connected to when an entity
12917
12896
  * begins sneaking.
12918
12897
  */
@@ -12946,7 +12925,6 @@ export class EntityStartSneakingAfterEventSignal {
12946
12925
  }
12947
12926
 
12948
12927
  /**
12949
- * @rc
12950
12928
  * Contains data related to an entity stopping sneaking.
12951
12929
  */
12952
12930
  export class EntityStopSneakingAfterEvent {
@@ -12960,7 +12938,6 @@ export class EntityStopSneakingAfterEvent {
12960
12938
  }
12961
12939
 
12962
12940
  /**
12963
- * @rc
12964
12941
  * Manages callbacks that are connected to when an entity stops
12965
12942
  * sneaking.
12966
12943
  */
@@ -13081,7 +13058,6 @@ export class EntityTameableComponent extends EntityComponent {
13081
13058
  }
13082
13059
 
13083
13060
  /**
13084
- * @rc
13085
13061
  * Contains data related to an entity being tamed.
13086
13062
  */
13087
13063
  export class EntityTamedAfterEvent {
@@ -13091,7 +13067,6 @@ export class EntityTamedAfterEvent {
13091
13067
  }
13092
13068
 
13093
13069
  /**
13094
- * @rc
13095
13070
  * Manages callbacks that are connected to when an entity is
13096
13071
  * tamed.
13097
13072
  */
@@ -13119,7 +13094,6 @@ export class EntityTamedAfterEventSignal {
13119
13094
  }
13120
13095
 
13121
13096
  /**
13122
- * @rc
13123
13097
  * Contains information regarding an event before an entity is
13124
13098
  * tamed.
13125
13099
  */
@@ -13146,7 +13120,6 @@ export class EntityTamedBeforeEvent {
13146
13120
  }
13147
13121
 
13148
13122
  /**
13149
- * @rc
13150
13123
  * Manages callbacks that are connected to before an entity is
13151
13124
  * tamed.
13152
13125
  */
@@ -13697,7 +13670,6 @@ export class FluidContainer {
13697
13670
  }
13698
13671
 
13699
13672
  /**
13700
- * @rc
13701
13673
  * Provides access to the fog definitions stack of a player
13702
13674
  * entity, allowing scripts to push, pop, remove, and query
13703
13675
  * active fog definitions.
@@ -14172,7 +14144,6 @@ export class ISerializable {
14172
14144
  }
14173
14145
 
14174
14146
  /**
14175
- * @rc
14176
14147
  * Represents the dynamic properties of a block. Only available
14177
14148
  * from block entities. Up to 1KBytes of data can be stored per
14178
14149
  * content pack per block entity in their dynamic properties
@@ -17184,7 +17155,6 @@ export class Player extends Entity {
17184
17155
  */
17185
17156
  commandPermissionLevel: CommandPermissionLevel;
17186
17157
  /**
17187
- * @rc
17188
17158
  * @remarks
17189
17159
  * Contains methods for manipulating the render distance fog
17190
17160
  * settings of a Player.
@@ -19643,7 +19613,6 @@ export class PrimitiveShapesManager {
19643
19613
  */
19644
19614
  addText(text: TextPrimitive, dimension?: Dimension): void;
19645
19615
  /**
19646
- * @rc
19647
19616
  * @remarks
19648
19617
  * Fetches and queries all primitive shapes stored in the
19649
19618
  * manager and returns the results as an array of shape
@@ -20891,7 +20860,6 @@ export class SmeltItemFunction extends LootItemFunction {
20891
20860
  }
20892
20861
 
20893
20862
  /**
20894
- * @rc
20895
20863
  * Contains information about a sound thats declared duration
20896
20864
  * elapsed.
20897
20865
  */
@@ -20908,7 +20876,6 @@ export class SoundCompletedAfterEvent {
20908
20876
  }
20909
20877
 
20910
20878
  /**
20911
- * @rc
20912
20879
  * Manages callbacks that are invoked when a tracked sound's
20913
20880
  * declared duration elapses.
20914
20881
  */
@@ -20945,7 +20912,6 @@ export class SoundCompletedAfterEventSignal {
20945
20912
  export class SoundDefinition {
20946
20913
  private constructor();
20947
20914
  /**
20948
- * @rc
20949
20915
  * @remarks
20950
20916
  * Duration metadata declared for this sound. Undefined when
20951
20917
  * the sound definition does not specify a duration.
@@ -20953,7 +20919,6 @@ export class SoundDefinition {
20953
20919
  */
20954
20920
  readonly durationInfo?: SoundDefinitionDurationInfo;
20955
20921
  /**
20956
- * @rc
20957
20922
  * @remarks
20958
20923
  * Music metadata declared for this sound. Undefined when the
20959
20924
  * sound definition does not specify a music_info block.
@@ -20961,7 +20926,6 @@ export class SoundDefinition {
20961
20926
  */
20962
20927
  readonly musicInfo?: SoundDefinitionMusicInfo;
20963
20928
  /**
20964
- * @rc
20965
20929
  * @remarks
20966
20930
  * Identifier of the sound event this definition declares, in
20967
20931
  * the form 'namespace:name'.
@@ -20969,7 +20933,6 @@ export class SoundDefinition {
20969
20933
  */
20970
20934
  readonly soundEventId: string;
20971
20935
  /**
20972
- * @rc
20973
20936
  * @remarks
20974
20937
  * Tag metadata declared for this sound, as a record mapping
20975
20938
  * each tag name to its declared values. A tag declared with a
@@ -20982,7 +20945,6 @@ export class SoundDefinition {
20982
20945
  }
20983
20946
 
20984
20947
  /**
20985
- * @rc
20986
20948
  * Provides read-only access to the sound definitions loaded
20987
20949
  * for the current world.
20988
20950
  */
@@ -21009,7 +20971,6 @@ export class SoundDefinitionRegistry {
21009
20971
  }
21010
20972
 
21011
20973
  /**
21012
- * @rc
21013
20974
  * Provides duration and playback information for a sound whose
21014
20975
  * definition declares a duration.
21015
20976
  */
@@ -21053,34 +21014,108 @@ export class SoundDurationInfo {
21053
21014
  export class SoundInstance {
21054
21015
  private constructor();
21055
21016
  /**
21056
- * @rc
21057
21017
  * @remarks
21058
21018
  * Gets duration and playback information for this sound.
21059
21019
  *
21060
21020
  */
21061
21021
  readonly durationInfo?: SoundDurationInfo;
21062
21022
  /**
21063
- * @rc
21064
21023
  * @remarks
21065
21024
  * Unique identifier of this sound instance.
21066
21025
  *
21067
21026
  */
21068
21027
  readonly id: string;
21069
21028
  /**
21070
- * @rc
21071
21029
  * @remarks
21072
21030
  * Gets the player this sound was played for.
21073
21031
  *
21074
21032
  */
21075
21033
  readonly recipient?: Player;
21076
21034
  /**
21077
- * @rc
21078
21035
  * @remarks
21079
21036
  * Gets the identifier of the sound event this instance was
21080
21037
  * started with.
21081
21038
  *
21082
21039
  */
21083
21040
  readonly soundEventId: string;
21041
+ /**
21042
+ * @rc
21043
+ * @remarks
21044
+ * Fades this sound instance from its current volume to the
21045
+ * target volume over the specified duration. To fade in from
21046
+ * silence, call `setVolume(0.0)` first; to fade out, pass a
21047
+ * target volume of `0.0`.
21048
+ *
21049
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21050
+ *
21051
+ * @param duration
21052
+ * Duration of the fade in seconds. Must be non-negative.
21053
+ * Minimum value: 0
21054
+ * @param targetVolume
21055
+ * Volume to fade to. Must be non-negative.
21056
+ * Minimum value: 0
21057
+ */
21058
+ fade(duration: number, targetVolume: number): void;
21059
+ /**
21060
+ * @rc
21061
+ * @remarks
21062
+ * Pauses this sound.
21063
+ *
21064
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21065
+ *
21066
+ */
21067
+ pause(): void;
21068
+ /**
21069
+ * @rc
21070
+ * @remarks
21071
+ * Resumes this sound after a pause.
21072
+ *
21073
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21074
+ *
21075
+ */
21076
+ resume(): void;
21077
+ /**
21078
+ * @rc
21079
+ * @remarks
21080
+ * Sets the playback position of this sound instance.
21081
+ *
21082
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21083
+ *
21084
+ * @param seconds
21085
+ * Position to seek to in seconds. Must be non-negative.
21086
+ * Bounds: [0, 107374184]
21087
+ * @throws
21088
+ * Throws if `seconds` is negative, or if the sound has a known
21089
+ * duration and `seconds` is greater than that duration.
21090
+ *
21091
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
21092
+ */
21093
+ seekTo(seconds: number): void;
21094
+ /**
21095
+ * @rc
21096
+ * @remarks
21097
+ * Sets the pitch of this sound instance.
21098
+ *
21099
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21100
+ *
21101
+ * @param pitch
21102
+ * Pitch multiplier between 0.01 and 10.0. A value of 1.0 is
21103
+ * normal pitch.
21104
+ * Bounds: [0.009999999776482582, 10]
21105
+ */
21106
+ setPitch(pitch: number): void;
21107
+ /**
21108
+ * @rc
21109
+ * @remarks
21110
+ * Sets the volume of this sound instance.
21111
+ *
21112
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
21113
+ *
21114
+ * @param volume
21115
+ * Volume level between 0.0 and 10.0.
21116
+ * Bounds: [0, 10]
21117
+ */
21118
+ setVolume(volume: number): void;
21084
21119
  /**
21085
21120
  * @remarks
21086
21121
  * Stops this sound instance from playing.
@@ -22478,7 +22513,6 @@ export class World {
22478
22513
  */
22479
22514
  readonly seed: string;
22480
22515
  /**
22481
- * @rc
22482
22516
  * @remarks
22483
22517
  * Provides read-only access to the sound definitions loaded
22484
22518
  * for this world.
@@ -23112,7 +23146,6 @@ export class WorldAfterEvents {
23112
23146
  */
23113
23147
  readonly entitySpawn: EntitySpawnAfterEventSignal;
23114
23148
  /**
23115
- * @rc
23116
23149
  * @remarks
23117
23150
  * This event fires when an entity starts sneaking.
23118
23151
  *
@@ -23121,7 +23154,6 @@ export class WorldAfterEvents {
23121
23154
  */
23122
23155
  readonly entityStartSneaking: EntityStartSneakingAfterEventSignal;
23123
23156
  /**
23124
- * @rc
23125
23157
  * @remarks
23126
23158
  * This event fires when an entity stops sneaking.
23127
23159
  *
@@ -23130,7 +23162,6 @@ export class WorldAfterEvents {
23130
23162
  */
23131
23163
  readonly entityStopSneaking: EntityStopSneakingAfterEventSignal;
23132
23164
  /**
23133
- * @rc
23134
23165
  * @remarks
23135
23166
  * This event fires when an entity is tamed.
23136
23167
  *
@@ -23420,7 +23451,6 @@ export class WorldAfterEvents {
23420
23451
  */
23421
23452
  readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
23422
23453
  /**
23423
- * @rc
23424
23454
  * @remarks
23425
23455
  * A tracked sound's declared duration elapsed.
23426
23456
  *
@@ -23509,7 +23539,6 @@ export class WorldBeforeEvents {
23509
23539
  */
23510
23540
  readonly entityRemove: EntityRemoveBeforeEventSignal;
23511
23541
  /**
23512
- * @rc
23513
23542
  * @remarks
23514
23543
  * Fires before an entity is tamed.
23515
23544
  *
@@ -23926,7 +23955,6 @@ export interface BlockHitInformation {
23926
23955
  }
23927
23956
 
23928
23957
  /**
23929
- * @rc
23930
23958
  * Options for querying blocks in a volume. Extends BlockFilter
23931
23959
  * with additional sorting and limiting options based on
23932
23960
  * distance from a location.
@@ -24130,7 +24158,6 @@ export interface CameraSetRotOptions {
24130
24158
  }
24131
24159
 
24132
24160
  /**
24133
- * @rc
24134
24161
  * Options for applying a camera shake effect to a player's
24135
24162
  * camera via `Camera.addShake`. Each call to `addShake` queues
24136
24163
  * a new independent shake event for the specified `type`;
@@ -25175,7 +25202,6 @@ export interface EntityRaycastOptions extends EntityFilter {
25175
25202
  }
25176
25203
 
25177
25204
  /**
25178
- * @rc
25179
25205
  * Options used to filter entity start sneaking and stop
25180
25206
  * sneaking events.
25181
25207
  */
@@ -25184,7 +25210,6 @@ export interface EntitySneakingChangedEventOptions {
25184
25210
  }
25185
25211
 
25186
25212
  /**
25187
- * @rc
25188
25213
  * Contains options for filtering entity tamed events.
25189
25214
  */
25190
25215
  export interface EntityTamedEventOptions {
@@ -25736,6 +25761,19 @@ export interface PlayerSoundOptions {
25736
25761
  *
25737
25762
  */
25738
25763
  location?: Vector3;
25764
+ /**
25765
+ * @rc
25766
+ * @remarks
25767
+ * Number of additional times to repeat the sound after the
25768
+ * initial play. `0` (the default) plays the sound once, `-1`
25769
+ * loops it forever, and a positive integer `N` plays the sound
25770
+ * `N + 1` times in total. For example, `loopCount: 1` plays
25771
+ * the sound twice. The loop count is fixed when the sound
25772
+ * starts and cannot be changed afterward. When using `-1`, see
25773
+ * `SoundInstance` for handle lifetime requirements.
25774
+ *
25775
+ */
25776
+ loopCount?: number;
25739
25777
  /**
25740
25778
  * @remarks
25741
25779
  * Optional pitch of the sound.
@@ -25808,7 +25846,6 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
25808
25846
  }
25809
25847
 
25810
25848
  /**
25811
- * @rc
25812
25849
  * Contains optional filters that control which primitive
25813
25850
  * shapes are returned from a primitive shapes query.
25814
25851
  */
@@ -26166,7 +26203,6 @@ export interface ScriptEventMessageFilterOptions {
26166
26203
  }
26167
26204
 
26168
26205
  /**
26169
- * @rc
26170
26206
  * Duration metadata declared in a sound definition.
26171
26207
  */
26172
26208
  export interface SoundDefinitionDurationInfo {
@@ -26180,7 +26216,6 @@ export interface SoundDefinitionDurationInfo {
26180
26216
  }
26181
26217
 
26182
26218
  /**
26183
- * @rc
26184
26219
  * Criteria used to narrow a set of sound definitions. Each
26185
26220
  * field is optional and applies its constraint only when
26186
26221
  * defined; a definition must satisfy every defined field to
@@ -26259,7 +26294,6 @@ export interface SoundDefinitionFilter {
26259
26294
  }
26260
26295
 
26261
26296
  /**
26262
- * @rc
26263
26297
  * Music metadata declared on a sound definition. Each field is
26264
26298
  * optional and is undefined when the sound definition does not
26265
26299
  * declare a value for it.
@@ -26727,10 +26761,20 @@ export interface WaypointTextureSelector {
26727
26761
  * Contains additional options for a playSound occurrence.
26728
26762
  */
26729
26763
  export interface WorldSoundOptions {
26764
+ isBroadcast?: boolean;
26730
26765
  /**
26731
26766
  * @rc
26767
+ * @remarks
26768
+ * Number of additional times to repeat the sound after the
26769
+ * initial play. `0` (the default) plays the sound once, `-1`
26770
+ * loops it forever, and a positive integer `N` plays the sound
26771
+ * `N + 1` times in total. For example, `loopCount: 1` plays
26772
+ * the sound twice. The loop count is fixed when the sound
26773
+ * starts and cannot be changed afterward. When using `-1`, see
26774
+ * `SoundInstance` for handle lifetime requirements.
26775
+ *
26732
26776
  */
26733
- isBroadcast?: boolean;
26777
+ loopCount?: number;
26734
26778
  /**
26735
26779
  * @remarks
26736
26780
  * Pitch of the sound played.
@@ -26921,7 +26965,6 @@ export class EntitySpawnError extends Error {
26921
26965
  }
26922
26966
 
26923
26967
  /**
26924
- * @rc
26925
26968
  * Error thrown by {@link FogSettings} operations when the fog
26926
26969
  * stack limit is exceeded or an invalid fog identifier is
26927
26970
  * provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.11.0-rc.1.26.60-preview.21",
3
+ "version": "2.11.0-rc.1.26.60-preview.25",
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.60-preview.21"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.60-preview.25"
18
18
  },
19
19
  "license": "MIT"
20
20
  }