@minecraft/server 2.7.0-beta.1.26.10-preview.23 → 2.7.0-beta.1.26.10-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.
- package/index.d.ts +616 -19
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -756,7 +756,7 @@ export enum EnchantmentSlot {
|
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
/**
|
|
759
|
-
* @
|
|
759
|
+
* @rc
|
|
760
760
|
* The entity's attach location point. Contains points such as
|
|
761
761
|
* head, body, leg, etc to attach the camera to.
|
|
762
762
|
*/
|
|
@@ -2330,6 +2330,34 @@ export enum LiquidType {
|
|
|
2330
2330
|
Water = 'Water',
|
|
2331
2331
|
}
|
|
2332
2332
|
|
|
2333
|
+
/**
|
|
2334
|
+
* @beta
|
|
2335
|
+
* Enum representing the different reasons why a locator bar
|
|
2336
|
+
* operation may fail.
|
|
2337
|
+
*/
|
|
2338
|
+
export enum LocatorBarErrorReason {
|
|
2339
|
+
/**
|
|
2340
|
+
* @remarks
|
|
2341
|
+
* The waypoint already exists in the locator bar and cannot be
|
|
2342
|
+
* added again.
|
|
2343
|
+
*
|
|
2344
|
+
*/
|
|
2345
|
+
WaypointAlreadyExists = 'WaypointAlreadyExists',
|
|
2346
|
+
/**
|
|
2347
|
+
* @remarks
|
|
2348
|
+
* The maximum number of waypoints has been reached and no more
|
|
2349
|
+
* can be added.
|
|
2350
|
+
*
|
|
2351
|
+
*/
|
|
2352
|
+
WaypointLimitExceeded = 'WaypointLimitExceeded',
|
|
2353
|
+
/**
|
|
2354
|
+
* @remarks
|
|
2355
|
+
* The specified waypoint does not exist in the locator bar.
|
|
2356
|
+
*
|
|
2357
|
+
*/
|
|
2358
|
+
WaypointNotFound = 'WaypointNotFound',
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2333
2361
|
/**
|
|
2334
2362
|
* Describes the memory of a device.
|
|
2335
2363
|
*/
|
|
@@ -2842,7 +2870,7 @@ export enum StructureSaveMode {
|
|
|
2842
2870
|
}
|
|
2843
2871
|
|
|
2844
2872
|
/**
|
|
2845
|
-
* @
|
|
2873
|
+
* @rc
|
|
2846
2874
|
* The reason that the {@link
|
|
2847
2875
|
* @minecraft/server.TickingAreaError} was thrown.
|
|
2848
2876
|
*/
|
|
@@ -2998,6 +3026,38 @@ export enum WatchdogTerminateReason {
|
|
|
2998
3026
|
StackOverflow = 'StackOverflow',
|
|
2999
3027
|
}
|
|
3000
3028
|
|
|
3029
|
+
/**
|
|
3030
|
+
* @beta
|
|
3031
|
+
* Enum representing different texture icons that can be
|
|
3032
|
+
* displayed for waypoints on the locator bar.
|
|
3033
|
+
*/
|
|
3034
|
+
export enum WaypointTexture {
|
|
3035
|
+
/**
|
|
3036
|
+
* @remarks
|
|
3037
|
+
* Circle waypoint icon texture.
|
|
3038
|
+
*
|
|
3039
|
+
*/
|
|
3040
|
+
Circle = 'minecraft:circle',
|
|
3041
|
+
/**
|
|
3042
|
+
* @remarks
|
|
3043
|
+
* Small square waypoint icon texture.
|
|
3044
|
+
*
|
|
3045
|
+
*/
|
|
3046
|
+
SmallSquare = 'minecraft:small_square',
|
|
3047
|
+
/**
|
|
3048
|
+
* @remarks
|
|
3049
|
+
* Small star waypoint icon texture.
|
|
3050
|
+
*
|
|
3051
|
+
*/
|
|
3052
|
+
SmallStar = 'minecraft:small_star',
|
|
3053
|
+
/**
|
|
3054
|
+
* @remarks
|
|
3055
|
+
* Square waypoint icon texture.
|
|
3056
|
+
*
|
|
3057
|
+
*/
|
|
3058
|
+
Square = 'minecraft:square',
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3001
3061
|
/**
|
|
3002
3062
|
* Used to specify the type of weather condition within the
|
|
3003
3063
|
* world.
|
|
@@ -4221,6 +4281,20 @@ export class Block {
|
|
|
4221
4281
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4222
4282
|
*/
|
|
4223
4283
|
getMapColor(): RGBA;
|
|
4284
|
+
/**
|
|
4285
|
+
* @beta
|
|
4286
|
+
* @remarks
|
|
4287
|
+
* Returns array of all loaded block parts if this block has
|
|
4288
|
+
* the 'minecraft:multi_block' trait. If it does not have the
|
|
4289
|
+
* trait returns undefined
|
|
4290
|
+
*
|
|
4291
|
+
* @throws This function can throw errors.
|
|
4292
|
+
*
|
|
4293
|
+
* {@link LocationInUnloadedChunkError}
|
|
4294
|
+
*
|
|
4295
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4296
|
+
*/
|
|
4297
|
+
getParts(): Block[] | undefined;
|
|
4224
4298
|
/**
|
|
4225
4299
|
* @remarks
|
|
4226
4300
|
* Returns the net redstone power of this block.
|
|
@@ -4701,7 +4775,7 @@ export class BlockComponentBlockBreakEvent extends BlockEvent {
|
|
|
4701
4775
|
}
|
|
4702
4776
|
|
|
4703
4777
|
/**
|
|
4704
|
-
* @
|
|
4778
|
+
* @rc
|
|
4705
4779
|
* Contains information regarding an event sent by an entity to
|
|
4706
4780
|
* this block in the world.
|
|
4707
4781
|
*/
|
|
@@ -4720,7 +4794,7 @@ export class BlockComponentEntityEvent extends BlockEvent {
|
|
|
4720
4794
|
* The entity that sent the event.
|
|
4721
4795
|
*
|
|
4722
4796
|
*/
|
|
4723
|
-
readonly entitySource
|
|
4797
|
+
readonly entitySource: Entity;
|
|
4724
4798
|
/**
|
|
4725
4799
|
* @remarks
|
|
4726
4800
|
* Name of the event fired by the entity.
|
|
@@ -6251,7 +6325,7 @@ export class Camera {
|
|
|
6251
6325
|
*/
|
|
6252
6326
|
readonly isValid: boolean;
|
|
6253
6327
|
/**
|
|
6254
|
-
* @
|
|
6328
|
+
* @rc
|
|
6255
6329
|
* @remarks
|
|
6256
6330
|
* Attaches the camera to a non-player entity.
|
|
6257
6331
|
*
|
|
@@ -6288,7 +6362,7 @@ export class Camera {
|
|
|
6288
6362
|
*/
|
|
6289
6363
|
fade(fadeCameraOptions?: CameraFadeOptions): void;
|
|
6290
6364
|
/**
|
|
6291
|
-
* @
|
|
6365
|
+
* @rc
|
|
6292
6366
|
* @remarks
|
|
6293
6367
|
* This function can't be called in restricted-execution mode.
|
|
6294
6368
|
*
|
|
@@ -6360,7 +6434,7 @@ export class Camera {
|
|
|
6360
6434
|
}
|
|
6361
6435
|
|
|
6362
6436
|
/**
|
|
6363
|
-
* @
|
|
6437
|
+
* @rc
|
|
6364
6438
|
* CatmullRom spline creation.
|
|
6365
6439
|
*/
|
|
6366
6440
|
export class CatmullRomSpline {
|
|
@@ -9324,6 +9398,27 @@ export class Entity {
|
|
|
9324
9398
|
* ```
|
|
9325
9399
|
*/
|
|
9326
9400
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
9401
|
+
/**
|
|
9402
|
+
* @beta
|
|
9403
|
+
* @remarks
|
|
9404
|
+
* Adds an item to the entity's inventory.
|
|
9405
|
+
*
|
|
9406
|
+
* This function can't be called in restricted-execution mode.
|
|
9407
|
+
*
|
|
9408
|
+
* @returns
|
|
9409
|
+
* Returns undefined if the item was fully added or returns an
|
|
9410
|
+
* ItemStack with the remaining count.
|
|
9411
|
+
* @throws This function can throw errors.
|
|
9412
|
+
*
|
|
9413
|
+
* {@link ContainerRulesError}
|
|
9414
|
+
*
|
|
9415
|
+
* {@link Error}
|
|
9416
|
+
*
|
|
9417
|
+
* {@link InvalidEntityComponentError}
|
|
9418
|
+
*
|
|
9419
|
+
* {@link InvalidEntityError}
|
|
9420
|
+
*/
|
|
9421
|
+
addItem(itemStack: ItemStack): ItemStack | undefined;
|
|
9327
9422
|
/**
|
|
9328
9423
|
* @remarks
|
|
9329
9424
|
* Adds a specified tag to an entity.
|
|
@@ -13329,6 +13424,51 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
13329
13424
|
static readonly componentId = 'minecraft:wants_jockey';
|
|
13330
13425
|
}
|
|
13331
13426
|
|
|
13427
|
+
/**
|
|
13428
|
+
* @beta
|
|
13429
|
+
* Waypoint that tracks an entity's position. The waypoint
|
|
13430
|
+
* automatically updates as the entity moves and becomes
|
|
13431
|
+
* invalid when the entity is removed.
|
|
13432
|
+
*/
|
|
13433
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
13434
|
+
export class EntityWaypoint extends Waypoint {
|
|
13435
|
+
/**
|
|
13436
|
+
* @remarks
|
|
13437
|
+
* The entity being tracked by this waypoint.
|
|
13438
|
+
*
|
|
13439
|
+
* @throws This property can throw when used.
|
|
13440
|
+
*
|
|
13441
|
+
* {@link InvalidWaypointError}
|
|
13442
|
+
*
|
|
13443
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
13444
|
+
*/
|
|
13445
|
+
readonly entity: Entity;
|
|
13446
|
+
/**
|
|
13447
|
+
* @remarks
|
|
13448
|
+
* The visibility rules that control when the waypoint is shown
|
|
13449
|
+
* based on the entity's state (e.g., sneaking, invisible,
|
|
13450
|
+
* dead).
|
|
13451
|
+
*
|
|
13452
|
+
* @throws This property can throw when used.
|
|
13453
|
+
*
|
|
13454
|
+
* {@link InvalidWaypointError}
|
|
13455
|
+
*
|
|
13456
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
13457
|
+
*/
|
|
13458
|
+
readonly entityRules: EntityVisibilityRules;
|
|
13459
|
+
/**
|
|
13460
|
+
* @throws This function can throw errors.
|
|
13461
|
+
*
|
|
13462
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
13463
|
+
*/
|
|
13464
|
+
constructor(
|
|
13465
|
+
entity: Entity,
|
|
13466
|
+
textureSelector: WaypointTextureSelector,
|
|
13467
|
+
entityRules: EntityVisibilityRules,
|
|
13468
|
+
color?: RGB,
|
|
13469
|
+
);
|
|
13470
|
+
}
|
|
13471
|
+
|
|
13332
13472
|
/**
|
|
13333
13473
|
* Loot item function that modifies a dropped treasure map to
|
|
13334
13474
|
* mark a location.
|
|
@@ -16033,7 +16173,7 @@ export class LeverActionAfterEventSignal {
|
|
|
16033
16173
|
}
|
|
16034
16174
|
|
|
16035
16175
|
/**
|
|
16036
|
-
* @
|
|
16176
|
+
* @rc
|
|
16037
16177
|
* A spline that linearly interpolates between points.
|
|
16038
16178
|
*/
|
|
16039
16179
|
export class LinearSpline {
|
|
@@ -16080,6 +16220,175 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
16080
16220
|
remove(locations: Vector3[]): void;
|
|
16081
16221
|
}
|
|
16082
16222
|
|
|
16223
|
+
/**
|
|
16224
|
+
* @beta
|
|
16225
|
+
* Waypoint that points to a fixed location in the world.
|
|
16226
|
+
* Unlike entity waypoints, location waypoints always remain
|
|
16227
|
+
* valid and their position can be updated.
|
|
16228
|
+
*/
|
|
16229
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
16230
|
+
export class LocationWaypoint extends Waypoint {
|
|
16231
|
+
/**
|
|
16232
|
+
* @throws This function can throw errors.
|
|
16233
|
+
*
|
|
16234
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
16235
|
+
*/
|
|
16236
|
+
constructor(dimensionLocation: DimensionLocation, textureSelector: WaypointTextureSelector, color?: RGB);
|
|
16237
|
+
/**
|
|
16238
|
+
* @remarks
|
|
16239
|
+
* Updates the dimension and location that this waypoint points
|
|
16240
|
+
* to.
|
|
16241
|
+
*
|
|
16242
|
+
* This function can't be called in restricted-execution mode.
|
|
16243
|
+
*
|
|
16244
|
+
* @param dimensionLocation
|
|
16245
|
+
* The new {@link DimensionLocation} (dimension and
|
|
16246
|
+
* coordinates) for the waypoint.
|
|
16247
|
+
*/
|
|
16248
|
+
setDimensionLocation(dimensionLocation: DimensionLocation): void;
|
|
16249
|
+
}
|
|
16250
|
+
|
|
16251
|
+
/**
|
|
16252
|
+
* @beta
|
|
16253
|
+
* Manages the collection of waypoints displayed on a player's
|
|
16254
|
+
* locator bar. Allows adding, removing, and querying waypoints
|
|
16255
|
+
* with a maximum capacity limit.
|
|
16256
|
+
*
|
|
16257
|
+
* Invalid waypoints in the locator bar will be automatically
|
|
16258
|
+
* removed in the next tick. This includes waypoints tied to
|
|
16259
|
+
* entities that have been removed from the world.
|
|
16260
|
+
*
|
|
16261
|
+
* Note: You can control whether vanilla player waypoints are
|
|
16262
|
+
* automatically added to the locator bar using the
|
|
16263
|
+
* `locatorbar` {@link GameRule}. This game rule is currently
|
|
16264
|
+
* named `locatorbar` but will likely be renamed in a future
|
|
16265
|
+
* update to be more descriptive.
|
|
16266
|
+
*
|
|
16267
|
+
* Note: You can only modify, remove, or query waypoints that
|
|
16268
|
+
* were added by this pack.
|
|
16269
|
+
* @example sharedWaypoint.ts
|
|
16270
|
+
* ```typescript
|
|
16271
|
+
* /\*
|
|
16272
|
+
* import { world, LocationWaypoint, WaypointTextureSelector, WaypointTexture } from "@minecraft/server"
|
|
16273
|
+
*
|
|
16274
|
+
* function sharedWaypoint() {
|
|
16275
|
+
* const players = world.getAllPlayers();
|
|
16276
|
+
*
|
|
16277
|
+
* if (players.length < 2) {
|
|
16278
|
+
* console.warn("Need at least 2 players for this example.");
|
|
16279
|
+
* return;
|
|
16280
|
+
* }
|
|
16281
|
+
*
|
|
16282
|
+
* const playerA = players[0];
|
|
16283
|
+
* const playerB = players[1];
|
|
16284
|
+
*
|
|
16285
|
+
* // Create a single waypoint at a specific location
|
|
16286
|
+
* const textureSelector: WaypointTextureSelector = {
|
|
16287
|
+
* textureBoundsList: [
|
|
16288
|
+
* { lowerBound: 0, texture: WaypointTexture.Circle }
|
|
16289
|
+
* ]
|
|
16290
|
+
* };
|
|
16291
|
+
*
|
|
16292
|
+
* const waypoint = new LocationWaypoint(
|
|
16293
|
+
* { dimension: playerA.dimension, x: 100, y: 64, z: 100 },
|
|
16294
|
+
* textureSelector,
|
|
16295
|
+
* { red: 1, green: 0, blue: 0 } // Initially red
|
|
16296
|
+
* );
|
|
16297
|
+
*
|
|
16298
|
+
* // Add the same waypoint to both players' locator bars
|
|
16299
|
+
* playerA.locatorBar.addWaypoint(waypoint);
|
|
16300
|
+
* playerB.locatorBar.addWaypoint(waypoint);
|
|
16301
|
+
*
|
|
16302
|
+
* // Change the color - this affects both players
|
|
16303
|
+
* waypoint.color = { red: 0, green: 1, blue: 0 }; // Now green for both players
|
|
16304
|
+
* }
|
|
16305
|
+
* *\/
|
|
16306
|
+
* ```
|
|
16307
|
+
*/
|
|
16308
|
+
export class LocatorBar {
|
|
16309
|
+
private constructor();
|
|
16310
|
+
/**
|
|
16311
|
+
* @remarks
|
|
16312
|
+
* The current number of waypoints in the locator bar.
|
|
16313
|
+
*
|
|
16314
|
+
*/
|
|
16315
|
+
readonly count: number;
|
|
16316
|
+
/**
|
|
16317
|
+
* @remarks
|
|
16318
|
+
* The maximum number of waypoints that can be added to the
|
|
16319
|
+
* locator bar.
|
|
16320
|
+
*
|
|
16321
|
+
*/
|
|
16322
|
+
readonly maxCount: number;
|
|
16323
|
+
/**
|
|
16324
|
+
* @remarks
|
|
16325
|
+
* Adds a waypoint to the locator bar. Throws an error if the
|
|
16326
|
+
* waypoint already exists, the maximum waypoint limit has been
|
|
16327
|
+
* reached, or the waypoint is invalid.
|
|
16328
|
+
*
|
|
16329
|
+
* This function can't be called in restricted-execution mode.
|
|
16330
|
+
*
|
|
16331
|
+
* @param waypoint
|
|
16332
|
+
* The {@link Waypoint} to add to the locator bar.
|
|
16333
|
+
* @throws This function can throw errors.
|
|
16334
|
+
*
|
|
16335
|
+
* {@link minecraftcommon.EngineError}
|
|
16336
|
+
*
|
|
16337
|
+
* {@link InvalidWaypointError}
|
|
16338
|
+
*
|
|
16339
|
+
* {@link LocatorBarError}
|
|
16340
|
+
*/
|
|
16341
|
+
addWaypoint(waypoint: Waypoint): void;
|
|
16342
|
+
/**
|
|
16343
|
+
* @remarks
|
|
16344
|
+
* Returns an array of all waypoints currently in the locator
|
|
16345
|
+
* bar.
|
|
16346
|
+
*
|
|
16347
|
+
* This function can't be called in restricted-execution mode.
|
|
16348
|
+
*
|
|
16349
|
+
*/
|
|
16350
|
+
getAllWaypoints(): Waypoint[];
|
|
16351
|
+
/**
|
|
16352
|
+
* @remarks
|
|
16353
|
+
* Checks whether the specified waypoint exists in the locator
|
|
16354
|
+
* bar.
|
|
16355
|
+
*
|
|
16356
|
+
* This function can't be called in restricted-execution mode.
|
|
16357
|
+
*
|
|
16358
|
+
* @param waypoint
|
|
16359
|
+
* The {@link Waypoint} to check for.
|
|
16360
|
+
*/
|
|
16361
|
+
hasWaypoint(waypoint: Waypoint): boolean;
|
|
16362
|
+
/**
|
|
16363
|
+
* @remarks
|
|
16364
|
+
* Removes all waypoints from the locator bar, clearing it
|
|
16365
|
+
* completely.
|
|
16366
|
+
*
|
|
16367
|
+
* This function can't be called in restricted-execution mode.
|
|
16368
|
+
*
|
|
16369
|
+
* @throws This function can throw errors.
|
|
16370
|
+
*
|
|
16371
|
+
* {@link minecraftcommon.EngineError}
|
|
16372
|
+
*/
|
|
16373
|
+
removeAllWaypoints(): void;
|
|
16374
|
+
/**
|
|
16375
|
+
* @remarks
|
|
16376
|
+
* Removes a specific waypoint from the locator bar. Returns an
|
|
16377
|
+
* error if the waypoint does not exist in the locator bar.
|
|
16378
|
+
*
|
|
16379
|
+
* This function can't be called in restricted-execution mode.
|
|
16380
|
+
*
|
|
16381
|
+
* @param waypoint
|
|
16382
|
+
* The {@link Waypoint} to remove from the locator bar.
|
|
16383
|
+
* @throws This function can throw errors.
|
|
16384
|
+
*
|
|
16385
|
+
* {@link minecraftcommon.EngineError}
|
|
16386
|
+
*
|
|
16387
|
+
* {@link LocatorBarError}
|
|
16388
|
+
*/
|
|
16389
|
+
removeWaypoint(waypoint: Waypoint): void;
|
|
16390
|
+
}
|
|
16391
|
+
|
|
16083
16392
|
/**
|
|
16084
16393
|
* Loot item function that drops extra items if the provided
|
|
16085
16394
|
* tool has the looting enchant.
|
|
@@ -16823,6 +17132,14 @@ export class Player extends Entity {
|
|
|
16823
17132
|
* @throws This property can throw when used.
|
|
16824
17133
|
*/
|
|
16825
17134
|
readonly level: number;
|
|
17135
|
+
/**
|
|
17136
|
+
* @beta
|
|
17137
|
+
* @remarks
|
|
17138
|
+
* The player's Locator Bar. This property is used for managing
|
|
17139
|
+
* waypoints displayed on the HUD.
|
|
17140
|
+
*
|
|
17141
|
+
*/
|
|
17142
|
+
readonly locatorBar: LocatorBar;
|
|
16826
17143
|
/**
|
|
16827
17144
|
* @remarks
|
|
16828
17145
|
* Name of the player.
|
|
@@ -18916,6 +19233,40 @@ export class PlayerUseNameTagAfterEventSignal {
|
|
|
18916
19233
|
unsubscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): void;
|
|
18917
19234
|
}
|
|
18918
19235
|
|
|
19236
|
+
/**
|
|
19237
|
+
* @beta
|
|
19238
|
+
* Waypoint that tracks a player's position. Extends {@link
|
|
19239
|
+
* EntityWaypoint} with additional player-specific visibility
|
|
19240
|
+
* rules such as hidden state and spectator mode.
|
|
19241
|
+
*/
|
|
19242
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
19243
|
+
export class PlayerWaypoint extends EntityWaypoint {
|
|
19244
|
+
/**
|
|
19245
|
+
* @remarks
|
|
19246
|
+
* The {@link PlayerVisibilityRules} that control when the
|
|
19247
|
+
* waypoint is shown based on the player's state (e.g., hidden,
|
|
19248
|
+
* spectator mode, spectator viewing another spectator).
|
|
19249
|
+
*
|
|
19250
|
+
* @throws This property can throw when used.
|
|
19251
|
+
*
|
|
19252
|
+
* {@link InvalidWaypointError}
|
|
19253
|
+
*
|
|
19254
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
19255
|
+
*/
|
|
19256
|
+
readonly playerRules: PlayerVisibilityRules;
|
|
19257
|
+
/**
|
|
19258
|
+
* @throws This function can throw errors.
|
|
19259
|
+
*
|
|
19260
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
19261
|
+
*/
|
|
19262
|
+
constructor(
|
|
19263
|
+
player: Player,
|
|
19264
|
+
textureSelector: WaypointTextureSelector,
|
|
19265
|
+
playerRules: PlayerVisibilityRules,
|
|
19266
|
+
color?: RGB,
|
|
19267
|
+
);
|
|
19268
|
+
}
|
|
19269
|
+
|
|
18919
19270
|
/**
|
|
18920
19271
|
* Represents how the potion effect is delivered.
|
|
18921
19272
|
*/
|
|
@@ -21168,7 +21519,7 @@ export class TargetBlockHitAfterEventSignal {
|
|
|
21168
21519
|
}
|
|
21169
21520
|
|
|
21170
21521
|
/**
|
|
21171
|
-
* @
|
|
21522
|
+
* @rc
|
|
21172
21523
|
* This manager is used to add, remove or query temporary
|
|
21173
21524
|
* ticking areas to a dimension. These ticking areas are
|
|
21174
21525
|
* limited by a fixed amount of ticking chunks per pack
|
|
@@ -21203,7 +21554,7 @@ export class TickingAreaManager {
|
|
|
21203
21554
|
*
|
|
21204
21555
|
* {@link TickingAreaError}
|
|
21205
21556
|
*/
|
|
21206
|
-
createTickingArea(identifier: string, options: TickingAreaOptions): Promise<
|
|
21557
|
+
createTickingArea(identifier: string, options: TickingAreaOptions): Promise<void>;
|
|
21207
21558
|
/**
|
|
21208
21559
|
* @remarks
|
|
21209
21560
|
* Gets all ticking areas added by this manager.
|
|
@@ -21474,6 +21825,86 @@ export class WatchdogTerminateBeforeEventSignal {
|
|
|
21474
21825
|
unsubscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): void;
|
|
21475
21826
|
}
|
|
21476
21827
|
|
|
21828
|
+
/**
|
|
21829
|
+
* @beta
|
|
21830
|
+
* Base class for waypoints displayed on the player's locator
|
|
21831
|
+
* bar. Waypoints can track locations or entities and are
|
|
21832
|
+
* rendered with customizable textures and colors.
|
|
21833
|
+
*
|
|
21834
|
+
* Waypoints act as shared handles that can be added to
|
|
21835
|
+
* multiple players' locator bars. When you modify a waypoint's
|
|
21836
|
+
* properties (such as color, texture, or enabled state), the
|
|
21837
|
+
* changes are reflected for all players who have that waypoint
|
|
21838
|
+
* in their locator bar. This allows you to efficiently manage
|
|
21839
|
+
* waypoints across multiple players without creating separate
|
|
21840
|
+
* instances for each player.
|
|
21841
|
+
*/
|
|
21842
|
+
export class Waypoint {
|
|
21843
|
+
private constructor();
|
|
21844
|
+
/**
|
|
21845
|
+
* @remarks
|
|
21846
|
+
* Optional {@link RGB} color tint applied to the waypoint
|
|
21847
|
+
* icon. If not specified, the waypoint uses its default color.
|
|
21848
|
+
*
|
|
21849
|
+
* This property can't be edited in restricted-execution mode.
|
|
21850
|
+
*
|
|
21851
|
+
*/
|
|
21852
|
+
color?: RGB;
|
|
21853
|
+
/**
|
|
21854
|
+
* @remarks
|
|
21855
|
+
* Controls whether the waypoint is currently displayed on the
|
|
21856
|
+
* player's screen. When disabled, the waypoint is hidden but
|
|
21857
|
+
* remains valid.
|
|
21858
|
+
*
|
|
21859
|
+
* This property can't be edited in restricted-execution mode.
|
|
21860
|
+
*
|
|
21861
|
+
*/
|
|
21862
|
+
isEnabled: boolean;
|
|
21863
|
+
/**
|
|
21864
|
+
* @remarks
|
|
21865
|
+
* Returns whether the waypoint is currently valid. A waypoint
|
|
21866
|
+
* becomes invalid when its tracked entity is no longer valid.
|
|
21867
|
+
*
|
|
21868
|
+
*/
|
|
21869
|
+
readonly isValid: boolean;
|
|
21870
|
+
/**
|
|
21871
|
+
* @remarks
|
|
21872
|
+
* The {@link WaypointTextureSelector} that determines which
|
|
21873
|
+
* icon texture is displayed for the waypoint based on distance
|
|
21874
|
+
* or other criteria.
|
|
21875
|
+
*
|
|
21876
|
+
* This property can't be edited in restricted-execution mode.
|
|
21877
|
+
*
|
|
21878
|
+
*/
|
|
21879
|
+
textureSelector: WaypointTextureSelector;
|
|
21880
|
+
/**
|
|
21881
|
+
* @remarks
|
|
21882
|
+
* Gets the current {@link DimensionLocation} of the waypoint.
|
|
21883
|
+
* For entity waypoints, this returns the entity's current
|
|
21884
|
+
* position. For location waypoints, this returns the stored
|
|
21885
|
+
* location.
|
|
21886
|
+
*
|
|
21887
|
+
* This function can't be called in restricted-execution mode.
|
|
21888
|
+
*
|
|
21889
|
+
* @throws This function can throw errors.
|
|
21890
|
+
*
|
|
21891
|
+
* {@link InvalidWaypointError}
|
|
21892
|
+
*
|
|
21893
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
21894
|
+
*/
|
|
21895
|
+
getDimensionLocation(): DimensionLocation;
|
|
21896
|
+
/**
|
|
21897
|
+
* @remarks
|
|
21898
|
+
* Removes the waypoint from all locator bars it has been added
|
|
21899
|
+
* to. This affects all players who have this waypoint in their
|
|
21900
|
+
* locator bar.
|
|
21901
|
+
*
|
|
21902
|
+
* This function can't be called in restricted-execution mode.
|
|
21903
|
+
*
|
|
21904
|
+
*/
|
|
21905
|
+
remove(): void;
|
|
21906
|
+
}
|
|
21907
|
+
|
|
21477
21908
|
/**
|
|
21478
21909
|
* Contains information related to changes in weather in the
|
|
21479
21910
|
* environment.
|
|
@@ -21675,7 +22106,7 @@ export class World {
|
|
|
21675
22106
|
*/
|
|
21676
22107
|
readonly structureManager: StructureManager;
|
|
21677
22108
|
/**
|
|
21678
|
-
* @
|
|
22109
|
+
* @rc
|
|
21679
22110
|
* @remarks
|
|
21680
22111
|
* Manager for adding, removing and querying pack specific
|
|
21681
22112
|
* ticking areas.
|
|
@@ -22824,7 +23255,7 @@ export interface AABB {
|
|
|
22824
23255
|
}
|
|
22825
23256
|
|
|
22826
23257
|
/**
|
|
22827
|
-
* @
|
|
23258
|
+
* @rc
|
|
22828
23259
|
* Used to create camera animations.
|
|
22829
23260
|
*/
|
|
22830
23261
|
export interface AnimationOptions {
|
|
@@ -22925,7 +23356,7 @@ export interface BlockCustomComponent {
|
|
|
22925
23356
|
*/
|
|
22926
23357
|
onBreak?: (arg0: BlockComponentBlockBreakEvent, arg1: CustomComponentParameters) => void;
|
|
22927
23358
|
/**
|
|
22928
|
-
* @
|
|
23359
|
+
* @rc
|
|
22929
23360
|
* @remarks
|
|
22930
23361
|
* This function will be called when an entity fires an event
|
|
22931
23362
|
* to this block in the world.
|
|
@@ -23165,7 +23596,7 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
23165
23596
|
}
|
|
23166
23597
|
|
|
23167
23598
|
/**
|
|
23168
|
-
* @
|
|
23599
|
+
* @rc
|
|
23169
23600
|
* Used to attach the camera to a non player entity.
|
|
23170
23601
|
*/
|
|
23171
23602
|
export interface CameraAttachOptions {
|
|
@@ -24279,6 +24710,37 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
24279
24710
|
maxDistance?: number;
|
|
24280
24711
|
}
|
|
24281
24712
|
|
|
24713
|
+
/**
|
|
24714
|
+
* @beta
|
|
24715
|
+
* Controls when a waypoint is visible based on the state of
|
|
24716
|
+
* the entity it tracks. These rules allow filtering waypoint
|
|
24717
|
+
* visibility by entity conditions like sneaking, invisibility,
|
|
24718
|
+
* and death state.
|
|
24719
|
+
*/
|
|
24720
|
+
export interface EntityVisibilityRules {
|
|
24721
|
+
/**
|
|
24722
|
+
* @remarks
|
|
24723
|
+
* Controls whether the waypoint is shown when the tracked
|
|
24724
|
+
* entity is dead. If undefined, defaults to true.
|
|
24725
|
+
*
|
|
24726
|
+
*/
|
|
24727
|
+
showDead?: boolean;
|
|
24728
|
+
/**
|
|
24729
|
+
* @remarks
|
|
24730
|
+
* Controls whether the waypoint is shown when the tracked
|
|
24731
|
+
* entity is invisible. If undefined, defaults to true.
|
|
24732
|
+
*
|
|
24733
|
+
*/
|
|
24734
|
+
showInvisible?: boolean;
|
|
24735
|
+
/**
|
|
24736
|
+
* @remarks
|
|
24737
|
+
* Controls whether the waypoint is shown when the tracked
|
|
24738
|
+
* entity is sneaking. If undefined, defaults to true.
|
|
24739
|
+
*
|
|
24740
|
+
*/
|
|
24741
|
+
showSneaking?: boolean;
|
|
24742
|
+
}
|
|
24743
|
+
|
|
24282
24744
|
/**
|
|
24283
24745
|
* Equal to operator.
|
|
24284
24746
|
*/
|
|
@@ -24812,6 +25274,39 @@ export interface PlayerSwingEventOptions {
|
|
|
24812
25274
|
|
|
24813
25275
|
/**
|
|
24814
25276
|
* @beta
|
|
25277
|
+
* Controls when a waypoint is visible based on player-specific
|
|
25278
|
+
* states. Extends {@link EntityVisibilityRules} with
|
|
25279
|
+
* additional rules for player-only states like hidden mode and
|
|
25280
|
+
* spectator mode.
|
|
25281
|
+
*/
|
|
25282
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25283
|
+
export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
25284
|
+
/**
|
|
25285
|
+
* @remarks
|
|
25286
|
+
* Controls whether the waypoint is shown when the tracked
|
|
25287
|
+
* player is hidden. If undefined, defaults to true.
|
|
25288
|
+
*
|
|
25289
|
+
*/
|
|
25290
|
+
showHidden?: boolean;
|
|
25291
|
+
/**
|
|
25292
|
+
* @remarks
|
|
25293
|
+
* Controls whether the waypoint is shown when the tracked
|
|
25294
|
+
* player is in spectator mode. If undefined, defaults to true.
|
|
25295
|
+
*
|
|
25296
|
+
*/
|
|
25297
|
+
showSpectator?: boolean;
|
|
25298
|
+
/**
|
|
25299
|
+
* @remarks
|
|
25300
|
+
* Controls whether the waypoint is shown when a spectator is
|
|
25301
|
+
* viewing another spectator player. If undefined, defaults to
|
|
25302
|
+
* true.
|
|
25303
|
+
*
|
|
25304
|
+
*/
|
|
25305
|
+
showSpectatorToSpectator?: boolean;
|
|
25306
|
+
}
|
|
25307
|
+
|
|
25308
|
+
/**
|
|
25309
|
+
* @rc
|
|
24815
25310
|
* Key frame that holds the progress of the camera animation.
|
|
24816
25311
|
*/
|
|
24817
25312
|
export interface ProgressKeyFrame {
|
|
@@ -25078,7 +25573,7 @@ export interface RGBA extends RGB {
|
|
|
25078
25573
|
}
|
|
25079
25574
|
|
|
25080
25575
|
/**
|
|
25081
|
-
* @
|
|
25576
|
+
* @rc
|
|
25082
25577
|
* Key frame that holds the rotation of the camera animation.
|
|
25083
25578
|
*/
|
|
25084
25579
|
export interface RotationKeyFrame {
|
|
@@ -25165,7 +25660,7 @@ export interface SpawnEntityOptions {
|
|
|
25165
25660
|
}
|
|
25166
25661
|
|
|
25167
25662
|
/**
|
|
25168
|
-
* @
|
|
25663
|
+
* @rc
|
|
25169
25664
|
* Collection of key frames for camera animation.
|
|
25170
25665
|
*/
|
|
25171
25666
|
export interface SplineAnimation {
|
|
@@ -25364,7 +25859,7 @@ export interface TeleportOptions {
|
|
|
25364
25859
|
}
|
|
25365
25860
|
|
|
25366
25861
|
/**
|
|
25367
|
-
* @
|
|
25862
|
+
* @rc
|
|
25368
25863
|
* A context which provides information about a specific
|
|
25369
25864
|
* ticking area.
|
|
25370
25865
|
*/
|
|
@@ -25404,7 +25899,7 @@ export interface TickingArea {
|
|
|
25404
25899
|
}
|
|
25405
25900
|
|
|
25406
25901
|
/**
|
|
25407
|
-
* @
|
|
25902
|
+
* @rc
|
|
25408
25903
|
* Options to create a ticking area using the {@link
|
|
25409
25904
|
* TickingAreaManager}.
|
|
25410
25905
|
*/
|
|
@@ -25514,6 +26009,60 @@ export interface VectorXZ {
|
|
|
25514
26009
|
z: number;
|
|
25515
26010
|
}
|
|
25516
26011
|
|
|
26012
|
+
/**
|
|
26013
|
+
* @beta
|
|
26014
|
+
* Defines a texture and the distance range in which it should
|
|
26015
|
+
* be displayed. Used within a {@link WaypointTextureSelector}
|
|
26016
|
+
* to create distance-based texture switching.
|
|
26017
|
+
*/
|
|
26018
|
+
export interface WaypointTextureBounds {
|
|
26019
|
+
/**
|
|
26020
|
+
* @remarks
|
|
26021
|
+
* The lower distance bound for this texture. The texture is
|
|
26022
|
+
* displayed when the distance to the waypoint is greater than
|
|
26023
|
+
* this value. Value must be greater than or equal to 0.
|
|
26024
|
+
*
|
|
26025
|
+
* Minimum Value: 0
|
|
26026
|
+
*/
|
|
26027
|
+
lowerBound: number;
|
|
26028
|
+
/**
|
|
26029
|
+
* @remarks
|
|
26030
|
+
* The {@link WaypointTexture} to display within this distance
|
|
26031
|
+
* range.
|
|
26032
|
+
*
|
|
26033
|
+
*/
|
|
26034
|
+
texture: WaypointTexture;
|
|
26035
|
+
/**
|
|
26036
|
+
* @remarks
|
|
26037
|
+
* The upper distance bound for this texture. The texture is
|
|
26038
|
+
* displayed when the distance to the waypoint is less than or
|
|
26039
|
+
* equal to this value. If undefined, there is no upper limit.
|
|
26040
|
+
* Value must be greater than or equal to 0.
|
|
26041
|
+
*
|
|
26042
|
+
* Minimum Value: 0
|
|
26043
|
+
*/
|
|
26044
|
+
upperBound?: number;
|
|
26045
|
+
}
|
|
26046
|
+
|
|
26047
|
+
/**
|
|
26048
|
+
* @beta
|
|
26049
|
+
* Defines how waypoint textures change based on distance.
|
|
26050
|
+
* Contains a list of texture bounds that determine which
|
|
26051
|
+
* texture is displayed at different distance ranges.
|
|
26052
|
+
*/
|
|
26053
|
+
export interface WaypointTextureSelector {
|
|
26054
|
+
/**
|
|
26055
|
+
* @remarks
|
|
26056
|
+
* An array of {@link WaypointTextureBounds} that define which
|
|
26057
|
+
* textures are displayed at different distance ranges. The
|
|
26058
|
+
* system evaluates these bounds to determine the appropriate
|
|
26059
|
+
* texture based on the current distance to the waypoint. The
|
|
26060
|
+
* list has a maximum size limit of 16.
|
|
26061
|
+
*
|
|
26062
|
+
*/
|
|
26063
|
+
textureBoundsList: WaypointTextureBounds[];
|
|
26064
|
+
}
|
|
26065
|
+
|
|
25517
26066
|
/**
|
|
25518
26067
|
* Contains additional options for a playSound occurrence.
|
|
25519
26068
|
*/
|
|
@@ -25697,6 +26246,16 @@ export class InvalidContainerSlotError extends Error {
|
|
|
25697
26246
|
private constructor();
|
|
25698
26247
|
}
|
|
25699
26248
|
|
|
26249
|
+
/**
|
|
26250
|
+
* @beta
|
|
26251
|
+
* This error can occur when accessing components on an entity
|
|
26252
|
+
* that doesn't have them.
|
|
26253
|
+
*/
|
|
26254
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26255
|
+
export class InvalidEntityComponentError extends Error {
|
|
26256
|
+
private constructor();
|
|
26257
|
+
}
|
|
26258
|
+
|
|
25700
26259
|
/**
|
|
25701
26260
|
* The error called when an entity is invalid. This can occur
|
|
25702
26261
|
* when accessing components on a removed entity.
|
|
@@ -25763,6 +26322,25 @@ export class InvalidStructureError extends Error {
|
|
|
25763
26322
|
private constructor();
|
|
25764
26323
|
}
|
|
25765
26324
|
|
|
26325
|
+
/**
|
|
26326
|
+
* @beta
|
|
26327
|
+
* Error thrown when attempting to perform operations on an
|
|
26328
|
+
* invalid waypoint. A waypoint becomes invalid when it is
|
|
26329
|
+
* removed or when the entity it tracks is no longer valid.
|
|
26330
|
+
*/
|
|
26331
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26332
|
+
export class InvalidWaypointError extends Error {
|
|
26333
|
+
private constructor();
|
|
26334
|
+
}
|
|
26335
|
+
|
|
26336
|
+
/**
|
|
26337
|
+
* @beta
|
|
26338
|
+
*/
|
|
26339
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26340
|
+
export class InvalidWaypointTextureSelectorError extends Error {
|
|
26341
|
+
private constructor();
|
|
26342
|
+
}
|
|
26343
|
+
|
|
25766
26344
|
/**
|
|
25767
26345
|
* Thrown when trying to register an item custom component with
|
|
25768
26346
|
* a name that has already been registered.
|
|
@@ -25819,6 +26397,25 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
25819
26397
|
private constructor();
|
|
25820
26398
|
}
|
|
25821
26399
|
|
|
26400
|
+
/**
|
|
26401
|
+
* @beta
|
|
26402
|
+
* Error thrown when a locator bar operation fails. Contains a
|
|
26403
|
+
* reason code indicating the specific cause of the error.
|
|
26404
|
+
*/
|
|
26405
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26406
|
+
export class LocatorBarError extends Error {
|
|
26407
|
+
private constructor();
|
|
26408
|
+
/**
|
|
26409
|
+
* @remarks
|
|
26410
|
+
* The {@link LocatorBarErrorReason} code that indicates why
|
|
26411
|
+
* the locator bar operation failed.
|
|
26412
|
+
*
|
|
26413
|
+
* This property can be read in early-execution mode.
|
|
26414
|
+
*
|
|
26415
|
+
*/
|
|
26416
|
+
readonly reason: LocatorBarErrorReason;
|
|
26417
|
+
}
|
|
26418
|
+
|
|
25822
26419
|
/**
|
|
25823
26420
|
* Thrown when a name requires a namespace and an error occurs
|
|
25824
26421
|
* when validating that namespace
|
|
@@ -25845,7 +26442,7 @@ export class RawMessageError extends Error {
|
|
|
25845
26442
|
}
|
|
25846
26443
|
|
|
25847
26444
|
/**
|
|
25848
|
-
* @
|
|
26445
|
+
* @rc
|
|
25849
26446
|
* The error returned from invalid {@link TickingAreaManager}
|
|
25850
26447
|
* method calls.
|
|
25851
26448
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.7.0-beta.1.26.10-preview.
|
|
3
|
+
"version": "2.7.0-beta.1.26.10-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.10-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.10-preview.25"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|