@minecraft/server 2.8.0-rc.1.26.30-preview.28 → 2.8.0-rc.1.26.30-preview.30
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 +714 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2265,6 +2265,34 @@ export enum LiquidType {
|
|
|
2265
2265
|
Water = 'Water',
|
|
2266
2266
|
}
|
|
2267
2267
|
|
|
2268
|
+
/**
|
|
2269
|
+
* @rc
|
|
2270
|
+
* Enum representing the different reasons why a locator bar
|
|
2271
|
+
* operation may fail.
|
|
2272
|
+
*/
|
|
2273
|
+
export enum LocatorBarErrorReason {
|
|
2274
|
+
/**
|
|
2275
|
+
* @remarks
|
|
2276
|
+
* The waypoint already exists in the locator bar and cannot be
|
|
2277
|
+
* added again.
|
|
2278
|
+
*
|
|
2279
|
+
*/
|
|
2280
|
+
WaypointAlreadyExists = 'WaypointAlreadyExists',
|
|
2281
|
+
/**
|
|
2282
|
+
* @remarks
|
|
2283
|
+
* The maximum number of waypoints has been reached and no more
|
|
2284
|
+
* can be added.
|
|
2285
|
+
*
|
|
2286
|
+
*/
|
|
2287
|
+
WaypointLimitExceeded = 'WaypointLimitExceeded',
|
|
2288
|
+
/**
|
|
2289
|
+
* @remarks
|
|
2290
|
+
* The specified waypoint does not exist in the locator bar.
|
|
2291
|
+
*
|
|
2292
|
+
*/
|
|
2293
|
+
WaypointNotFound = 'WaypointNotFound',
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2268
2296
|
/**
|
|
2269
2297
|
* Describes the memory of a device.
|
|
2270
2298
|
*/
|
|
@@ -2909,6 +2937,38 @@ export enum TintMethod {
|
|
|
2909
2937
|
Water = 'Water',
|
|
2910
2938
|
}
|
|
2911
2939
|
|
|
2940
|
+
/**
|
|
2941
|
+
* @rc
|
|
2942
|
+
* Enum representing different texture icons that can be
|
|
2943
|
+
* displayed for waypoints on the locator bar.
|
|
2944
|
+
*/
|
|
2945
|
+
export enum WaypointTexture {
|
|
2946
|
+
/**
|
|
2947
|
+
* @remarks
|
|
2948
|
+
* Circle waypoint icon texture.
|
|
2949
|
+
*
|
|
2950
|
+
*/
|
|
2951
|
+
Circle = 'minecraft:circle',
|
|
2952
|
+
/**
|
|
2953
|
+
* @remarks
|
|
2954
|
+
* Small square waypoint icon texture.
|
|
2955
|
+
*
|
|
2956
|
+
*/
|
|
2957
|
+
SmallSquare = 'minecraft:small_square',
|
|
2958
|
+
/**
|
|
2959
|
+
* @remarks
|
|
2960
|
+
* Small star waypoint icon texture.
|
|
2961
|
+
*
|
|
2962
|
+
*/
|
|
2963
|
+
SmallStar = 'minecraft:small_star',
|
|
2964
|
+
/**
|
|
2965
|
+
* @remarks
|
|
2966
|
+
* Square waypoint icon texture.
|
|
2967
|
+
*
|
|
2968
|
+
*/
|
|
2969
|
+
Square = 'minecraft:square',
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2912
2972
|
/**
|
|
2913
2973
|
* Used to specify the type of weather condition within the
|
|
2914
2974
|
* world.
|
|
@@ -7969,6 +8029,43 @@ export class Dimension {
|
|
|
7969
8029
|
spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void;
|
|
7970
8030
|
}
|
|
7971
8031
|
|
|
8032
|
+
/**
|
|
8033
|
+
* @rc
|
|
8034
|
+
* Provides the functionality for registering custom
|
|
8035
|
+
* dimensions. Custom dimensions can only be registered during
|
|
8036
|
+
* the system startup event.
|
|
8037
|
+
*/
|
|
8038
|
+
export class DimensionRegistry {
|
|
8039
|
+
private constructor();
|
|
8040
|
+
/**
|
|
8041
|
+
* @remarks
|
|
8042
|
+
* Registers a new custom dimension type. Must be called during
|
|
8043
|
+
* the system startup event. The dimension will be created
|
|
8044
|
+
* using the void generator.
|
|
8045
|
+
*
|
|
8046
|
+
* This function can be called in early-execution mode.
|
|
8047
|
+
*
|
|
8048
|
+
* @param typeId
|
|
8049
|
+
* The namespaced identifier for the custom dimension (e.g.,
|
|
8050
|
+
* 'mypack:my_dimension'). Must include a namespace and use
|
|
8051
|
+
* only valid identifier characters.
|
|
8052
|
+
* @throws This function can throw errors.
|
|
8053
|
+
*
|
|
8054
|
+
* {@link CustomDimensionAlreadyRegisteredError}
|
|
8055
|
+
*
|
|
8056
|
+
* {@link CustomDimensionInvalidRegistryError}
|
|
8057
|
+
*
|
|
8058
|
+
* {@link CustomDimensionNameError}
|
|
8059
|
+
*
|
|
8060
|
+
* {@link CustomDimensionReloadNewDimensionError}
|
|
8061
|
+
*
|
|
8062
|
+
* {@link minecraftcommon.EngineError}
|
|
8063
|
+
*
|
|
8064
|
+
* {@link NamespaceNameError}
|
|
8065
|
+
*/
|
|
8066
|
+
registerCustomDimension(typeId: string): void;
|
|
8067
|
+
}
|
|
8068
|
+
|
|
7972
8069
|
/**
|
|
7973
8070
|
* Represents a type of dimension. Currently only works with
|
|
7974
8071
|
* Vanilla dimensions.
|
|
@@ -12637,6 +12734,40 @@ export class EntityUpgradeAfterEvent {
|
|
|
12637
12734
|
getModifiers(): DefinitionModifier[];
|
|
12638
12735
|
}
|
|
12639
12736
|
|
|
12737
|
+
/**
|
|
12738
|
+
* @rc
|
|
12739
|
+
* Contains event registration related to firing of a data
|
|
12740
|
+
* driven entity version upgrade.
|
|
12741
|
+
*/
|
|
12742
|
+
export class EntityUpgradeAfterEventSignal {
|
|
12743
|
+
private constructor();
|
|
12744
|
+
/**
|
|
12745
|
+
* @remarks
|
|
12746
|
+
* Adds a callback that will be called after a data driven
|
|
12747
|
+
* entity version upgrade is triggered.
|
|
12748
|
+
*
|
|
12749
|
+
* This function can't be called in restricted-execution mode.
|
|
12750
|
+
*
|
|
12751
|
+
* This function can be called in early-execution mode.
|
|
12752
|
+
*
|
|
12753
|
+
*/
|
|
12754
|
+
subscribe(
|
|
12755
|
+
callback: (arg0: EntityUpgradeAfterEvent) => void,
|
|
12756
|
+
options?: EntityDataDrivenTriggerEventOptions,
|
|
12757
|
+
): (arg0: EntityUpgradeAfterEvent) => void;
|
|
12758
|
+
/**
|
|
12759
|
+
* @remarks
|
|
12760
|
+
* Removes a callback that will be called after a data driven
|
|
12761
|
+
* entity version upgrade is triggered.
|
|
12762
|
+
*
|
|
12763
|
+
* This function can't be called in restricted-execution mode.
|
|
12764
|
+
*
|
|
12765
|
+
* This function can be called in early-execution mode.
|
|
12766
|
+
*
|
|
12767
|
+
*/
|
|
12768
|
+
unsubscribe(callback: (arg0: EntityUpgradeAfterEvent) => void): void;
|
|
12769
|
+
}
|
|
12770
|
+
|
|
12640
12771
|
/**
|
|
12641
12772
|
* Used to differentiate the component group of a variant of an
|
|
12642
12773
|
* entity from others. (e.g. ocelot, villager).
|
|
@@ -12665,6 +12796,51 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
12665
12796
|
static readonly componentId = 'minecraft:wants_jockey';
|
|
12666
12797
|
}
|
|
12667
12798
|
|
|
12799
|
+
/**
|
|
12800
|
+
* @rc
|
|
12801
|
+
* Waypoint that tracks an entity's position. The waypoint
|
|
12802
|
+
* automatically updates as the entity moves and becomes
|
|
12803
|
+
* invalid when the entity is removed.
|
|
12804
|
+
*/
|
|
12805
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12806
|
+
export class EntityWaypoint extends Waypoint {
|
|
12807
|
+
/**
|
|
12808
|
+
* @remarks
|
|
12809
|
+
* The entity being tracked by this waypoint.
|
|
12810
|
+
*
|
|
12811
|
+
* @throws This property can throw when used.
|
|
12812
|
+
*
|
|
12813
|
+
* {@link InvalidWaypointError}
|
|
12814
|
+
*
|
|
12815
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
12816
|
+
*/
|
|
12817
|
+
readonly entity: Entity;
|
|
12818
|
+
/**
|
|
12819
|
+
* @remarks
|
|
12820
|
+
* The visibility rules that control when the waypoint is shown
|
|
12821
|
+
* based on the entity's state (e.g., sneaking, invisible,
|
|
12822
|
+
* dead).
|
|
12823
|
+
*
|
|
12824
|
+
* @throws This property can throw when used.
|
|
12825
|
+
*
|
|
12826
|
+
* {@link InvalidWaypointError}
|
|
12827
|
+
*
|
|
12828
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
12829
|
+
*/
|
|
12830
|
+
readonly entityRules: EntityVisibilityRules;
|
|
12831
|
+
/**
|
|
12832
|
+
* @throws This function can throw errors.
|
|
12833
|
+
*
|
|
12834
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
12835
|
+
*/
|
|
12836
|
+
constructor(
|
|
12837
|
+
entity: Entity,
|
|
12838
|
+
textureSelector: WaypointTextureSelector,
|
|
12839
|
+
entityRules: EntityVisibilityRules,
|
|
12840
|
+
color?: RGB,
|
|
12841
|
+
);
|
|
12842
|
+
}
|
|
12843
|
+
|
|
12668
12844
|
/**
|
|
12669
12845
|
* Loot item function that modifies a dropped treasure map to
|
|
12670
12846
|
* mark a location.
|
|
@@ -13251,6 +13427,10 @@ export class IsBabyCondition extends LootItemCondition {
|
|
|
13251
13427
|
private constructor();
|
|
13252
13428
|
}
|
|
13253
13429
|
|
|
13430
|
+
export class ISerializable {
|
|
13431
|
+
private constructor();
|
|
13432
|
+
}
|
|
13433
|
+
|
|
13254
13434
|
/**
|
|
13255
13435
|
* When present on an item, this item is a book item. Can
|
|
13256
13436
|
* access and modify the contents of the book and sign it.
|
|
@@ -15415,6 +15595,175 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
15415
15595
|
remove(locations: Vector3[]): void;
|
|
15416
15596
|
}
|
|
15417
15597
|
|
|
15598
|
+
/**
|
|
15599
|
+
* @rc
|
|
15600
|
+
* Waypoint that points to a fixed location in the world.
|
|
15601
|
+
* Unlike entity waypoints, location waypoints always remain
|
|
15602
|
+
* valid and their position can be updated.
|
|
15603
|
+
*/
|
|
15604
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15605
|
+
export class LocationWaypoint extends Waypoint {
|
|
15606
|
+
/**
|
|
15607
|
+
* @throws This function can throw errors.
|
|
15608
|
+
*
|
|
15609
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
15610
|
+
*/
|
|
15611
|
+
constructor(dimensionLocation: DimensionLocation, textureSelector: WaypointTextureSelector, color?: RGB);
|
|
15612
|
+
/**
|
|
15613
|
+
* @remarks
|
|
15614
|
+
* Updates the dimension and location that this waypoint points
|
|
15615
|
+
* to.
|
|
15616
|
+
*
|
|
15617
|
+
* This function can't be called in restricted-execution mode.
|
|
15618
|
+
*
|
|
15619
|
+
* @param dimensionLocation
|
|
15620
|
+
* The new {@link DimensionLocation} (dimension and
|
|
15621
|
+
* coordinates) for the waypoint.
|
|
15622
|
+
*/
|
|
15623
|
+
setDimensionLocation(dimensionLocation: DimensionLocation): void;
|
|
15624
|
+
}
|
|
15625
|
+
|
|
15626
|
+
/**
|
|
15627
|
+
* @rc
|
|
15628
|
+
* Manages the collection of waypoints displayed on a player's
|
|
15629
|
+
* locator bar. Allows adding, removing, and querying waypoints
|
|
15630
|
+
* with a maximum capacity limit.
|
|
15631
|
+
*
|
|
15632
|
+
* Invalid waypoints in the locator bar will be automatically
|
|
15633
|
+
* removed in the next tick. This includes waypoints tied to
|
|
15634
|
+
* entities that have been removed from the world.
|
|
15635
|
+
*
|
|
15636
|
+
* Note: You can control whether vanilla player waypoints are
|
|
15637
|
+
* automatically added to the locator bar using the
|
|
15638
|
+
* `playerWaypoints` {@link GameRule}. Accepted values are
|
|
15639
|
+
* `off` (players are not shown on the locator bar) and
|
|
15640
|
+
* `everyone` (all players are visible on the locator bar).
|
|
15641
|
+
*
|
|
15642
|
+
* Note: You can only modify, remove, or query waypoints that
|
|
15643
|
+
* were added by this pack.
|
|
15644
|
+
* @example sharedWaypoint.ts
|
|
15645
|
+
* ```typescript
|
|
15646
|
+
* /\*
|
|
15647
|
+
* import { world, LocationWaypoint, WaypointTextureSelector, WaypointTexture } from "@minecraft/server"
|
|
15648
|
+
*
|
|
15649
|
+
* function sharedWaypoint() {
|
|
15650
|
+
* const players = world.getAllPlayers();
|
|
15651
|
+
*
|
|
15652
|
+
* if (players.length < 2) {
|
|
15653
|
+
* console.warn("Need at least 2 players for this example.");
|
|
15654
|
+
* return;
|
|
15655
|
+
* }
|
|
15656
|
+
*
|
|
15657
|
+
* const playerA = players[0];
|
|
15658
|
+
* const playerB = players[1];
|
|
15659
|
+
*
|
|
15660
|
+
* // Create a single waypoint at a specific location
|
|
15661
|
+
* const textureSelector: WaypointTextureSelector = {
|
|
15662
|
+
* textureBoundsList: [
|
|
15663
|
+
* { lowerBound: 0, texture: WaypointTexture.Circle }
|
|
15664
|
+
* ]
|
|
15665
|
+
* };
|
|
15666
|
+
*
|
|
15667
|
+
* const waypoint = new LocationWaypoint(
|
|
15668
|
+
* { dimension: playerA.dimension, x: 100, y: 64, z: 100 },
|
|
15669
|
+
* textureSelector,
|
|
15670
|
+
* { red: 1, green: 0, blue: 0 } // Initially red
|
|
15671
|
+
* );
|
|
15672
|
+
*
|
|
15673
|
+
* // Add the same waypoint to both players' locator bars
|
|
15674
|
+
* playerA.locatorBar.addWaypoint(waypoint);
|
|
15675
|
+
* playerB.locatorBar.addWaypoint(waypoint);
|
|
15676
|
+
*
|
|
15677
|
+
* // Change the color - this affects both players
|
|
15678
|
+
* waypoint.color = { red: 0, green: 1, blue: 0 }; // Now green for both players
|
|
15679
|
+
* }
|
|
15680
|
+
* *\/
|
|
15681
|
+
* ```
|
|
15682
|
+
*/
|
|
15683
|
+
export class LocatorBar {
|
|
15684
|
+
private constructor();
|
|
15685
|
+
/**
|
|
15686
|
+
* @remarks
|
|
15687
|
+
* The current number of waypoints in the locator bar.
|
|
15688
|
+
*
|
|
15689
|
+
*/
|
|
15690
|
+
readonly count: number;
|
|
15691
|
+
/**
|
|
15692
|
+
* @remarks
|
|
15693
|
+
* The maximum number of waypoints that can be added to the
|
|
15694
|
+
* locator bar.
|
|
15695
|
+
*
|
|
15696
|
+
*/
|
|
15697
|
+
readonly maxCount: number;
|
|
15698
|
+
/**
|
|
15699
|
+
* @remarks
|
|
15700
|
+
* Adds a waypoint to the locator bar. Throws an error if the
|
|
15701
|
+
* waypoint already exists, the maximum waypoint limit has been
|
|
15702
|
+
* reached, or the waypoint is invalid.
|
|
15703
|
+
*
|
|
15704
|
+
* This function can't be called in restricted-execution mode.
|
|
15705
|
+
*
|
|
15706
|
+
* @param waypoint
|
|
15707
|
+
* The {@link Waypoint} to add to the locator bar.
|
|
15708
|
+
* @throws This function can throw errors.
|
|
15709
|
+
*
|
|
15710
|
+
* {@link minecraftcommon.EngineError}
|
|
15711
|
+
*
|
|
15712
|
+
* {@link InvalidWaypointError}
|
|
15713
|
+
*
|
|
15714
|
+
* {@link LocatorBarError}
|
|
15715
|
+
*/
|
|
15716
|
+
addWaypoint(waypoint: Waypoint): void;
|
|
15717
|
+
/**
|
|
15718
|
+
* @remarks
|
|
15719
|
+
* Returns an array of all waypoints currently in the locator
|
|
15720
|
+
* bar.
|
|
15721
|
+
*
|
|
15722
|
+
* This function can't be called in restricted-execution mode.
|
|
15723
|
+
*
|
|
15724
|
+
*/
|
|
15725
|
+
getAllWaypoints(): Waypoint[];
|
|
15726
|
+
/**
|
|
15727
|
+
* @remarks
|
|
15728
|
+
* Checks whether the specified waypoint exists in the locator
|
|
15729
|
+
* bar.
|
|
15730
|
+
*
|
|
15731
|
+
* This function can't be called in restricted-execution mode.
|
|
15732
|
+
*
|
|
15733
|
+
* @param waypoint
|
|
15734
|
+
* The {@link Waypoint} to check for.
|
|
15735
|
+
*/
|
|
15736
|
+
hasWaypoint(waypoint: Waypoint): boolean;
|
|
15737
|
+
/**
|
|
15738
|
+
* @remarks
|
|
15739
|
+
* Removes all waypoints from the locator bar, clearing it
|
|
15740
|
+
* completely.
|
|
15741
|
+
*
|
|
15742
|
+
* This function can't be called in restricted-execution mode.
|
|
15743
|
+
*
|
|
15744
|
+
* @throws This function can throw errors.
|
|
15745
|
+
*
|
|
15746
|
+
* {@link minecraftcommon.EngineError}
|
|
15747
|
+
*/
|
|
15748
|
+
removeAllWaypoints(): void;
|
|
15749
|
+
/**
|
|
15750
|
+
* @remarks
|
|
15751
|
+
* Removes a specific waypoint from the locator bar. Returns an
|
|
15752
|
+
* error if the waypoint does not exist in the locator bar.
|
|
15753
|
+
*
|
|
15754
|
+
* This function can't be called in restricted-execution mode.
|
|
15755
|
+
*
|
|
15756
|
+
* @param waypoint
|
|
15757
|
+
* The {@link Waypoint} to remove from the locator bar.
|
|
15758
|
+
* @throws This function can throw errors.
|
|
15759
|
+
*
|
|
15760
|
+
* {@link minecraftcommon.EngineError}
|
|
15761
|
+
*
|
|
15762
|
+
* {@link LocatorBarError}
|
|
15763
|
+
*/
|
|
15764
|
+
removeWaypoint(waypoint: Waypoint): void;
|
|
15765
|
+
}
|
|
15766
|
+
|
|
15418
15767
|
/**
|
|
15419
15768
|
* Loot item function that drops extra items if the provided
|
|
15420
15769
|
* tool has the looting enchant.
|
|
@@ -16102,6 +16451,14 @@ export class Player extends Entity {
|
|
|
16102
16451
|
* @throws This property can throw when used.
|
|
16103
16452
|
*/
|
|
16104
16453
|
readonly level: number;
|
|
16454
|
+
/**
|
|
16455
|
+
* @rc
|
|
16456
|
+
* @remarks
|
|
16457
|
+
* The player's Locator Bar. This property is used for managing
|
|
16458
|
+
* waypoints displayed on the HUD.
|
|
16459
|
+
*
|
|
16460
|
+
*/
|
|
16461
|
+
readonly locatorBar: LocatorBar;
|
|
16105
16462
|
/**
|
|
16106
16463
|
* @remarks
|
|
16107
16464
|
* Name of the player.
|
|
@@ -17977,6 +18334,40 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
17977
18334
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
17978
18335
|
}
|
|
17979
18336
|
|
|
18337
|
+
/**
|
|
18338
|
+
* @rc
|
|
18339
|
+
* Waypoint that tracks a player's position. Extends {@link
|
|
18340
|
+
* EntityWaypoint} with additional player-specific visibility
|
|
18341
|
+
* rules such as hidden state and spectator mode.
|
|
18342
|
+
*/
|
|
18343
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18344
|
+
export class PlayerWaypoint extends EntityWaypoint {
|
|
18345
|
+
/**
|
|
18346
|
+
* @remarks
|
|
18347
|
+
* The {@link PlayerVisibilityRules} that control when the
|
|
18348
|
+
* waypoint is shown based on the player's state (e.g., hidden,
|
|
18349
|
+
* spectator mode, spectator viewing another spectator).
|
|
18350
|
+
*
|
|
18351
|
+
* @throws This property can throw when used.
|
|
18352
|
+
*
|
|
18353
|
+
* {@link InvalidWaypointError}
|
|
18354
|
+
*
|
|
18355
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
18356
|
+
*/
|
|
18357
|
+
readonly playerRules: PlayerVisibilityRules;
|
|
18358
|
+
/**
|
|
18359
|
+
* @throws This function can throw errors.
|
|
18360
|
+
*
|
|
18361
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
18362
|
+
*/
|
|
18363
|
+
constructor(
|
|
18364
|
+
player: Player,
|
|
18365
|
+
textureSelector: WaypointTextureSelector,
|
|
18366
|
+
playerRules: PlayerVisibilityRules,
|
|
18367
|
+
color?: RGB,
|
|
18368
|
+
);
|
|
18369
|
+
}
|
|
18370
|
+
|
|
17980
18371
|
/**
|
|
17981
18372
|
* Represents how the potion effect is delivered.
|
|
17982
18373
|
*/
|
|
@@ -19593,6 +19984,13 @@ export class StartupEvent {
|
|
|
19593
19984
|
*
|
|
19594
19985
|
*/
|
|
19595
19986
|
readonly customCommandRegistry: CustomCommandRegistry;
|
|
19987
|
+
/**
|
|
19988
|
+
* @rc
|
|
19989
|
+
* @remarks
|
|
19990
|
+
* This property can be read in early-execution mode.
|
|
19991
|
+
*
|
|
19992
|
+
*/
|
|
19993
|
+
readonly dimensionRegistry: DimensionRegistry;
|
|
19596
19994
|
/**
|
|
19597
19995
|
* @remarks
|
|
19598
19996
|
* This property can be read in early-execution mode.
|
|
@@ -19606,7 +20004,8 @@ export class StartupEvent {
|
|
|
19606
20004
|
* Structures can be placed in a world using the /structure
|
|
19607
20005
|
* command or the {@link StructureManager} APIs.
|
|
19608
20006
|
*/
|
|
19609
|
-
|
|
20007
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20008
|
+
export class Structure extends ISerializable {
|
|
19610
20009
|
private constructor();
|
|
19611
20010
|
/**
|
|
19612
20011
|
* @remarks
|
|
@@ -20636,6 +21035,86 @@ export class TripWireTripAfterEventSignal {
|
|
|
20636
21035
|
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
20637
21036
|
}
|
|
20638
21037
|
|
|
21038
|
+
/**
|
|
21039
|
+
* @rc
|
|
21040
|
+
* Base class for waypoints displayed on the player's locator
|
|
21041
|
+
* bar. Waypoints can track locations or entities and are
|
|
21042
|
+
* rendered with customizable textures and colors.
|
|
21043
|
+
*
|
|
21044
|
+
* Waypoints act as shared handles that can be added to
|
|
21045
|
+
* multiple players' locator bars. When you modify a waypoint's
|
|
21046
|
+
* properties (such as color, texture, or enabled state), the
|
|
21047
|
+
* changes are reflected for all players who have that waypoint
|
|
21048
|
+
* in their locator bar. This allows you to efficiently manage
|
|
21049
|
+
* waypoints across multiple players without creating separate
|
|
21050
|
+
* instances for each player.
|
|
21051
|
+
*/
|
|
21052
|
+
export class Waypoint {
|
|
21053
|
+
private constructor();
|
|
21054
|
+
/**
|
|
21055
|
+
* @remarks
|
|
21056
|
+
* Optional {@link RGB} color tint applied to the waypoint
|
|
21057
|
+
* icon. If not specified, the waypoint uses its default color.
|
|
21058
|
+
*
|
|
21059
|
+
* This property can't be edited in restricted-execution mode.
|
|
21060
|
+
*
|
|
21061
|
+
*/
|
|
21062
|
+
color?: RGB;
|
|
21063
|
+
/**
|
|
21064
|
+
* @remarks
|
|
21065
|
+
* Controls whether the waypoint is currently displayed on the
|
|
21066
|
+
* player's screen. When disabled, the waypoint is hidden but
|
|
21067
|
+
* remains valid.
|
|
21068
|
+
*
|
|
21069
|
+
* This property can't be edited in restricted-execution mode.
|
|
21070
|
+
*
|
|
21071
|
+
*/
|
|
21072
|
+
isEnabled: boolean;
|
|
21073
|
+
/**
|
|
21074
|
+
* @remarks
|
|
21075
|
+
* Returns whether the waypoint is currently valid. A waypoint
|
|
21076
|
+
* becomes invalid when its tracked entity is no longer valid.
|
|
21077
|
+
*
|
|
21078
|
+
*/
|
|
21079
|
+
readonly isValid: boolean;
|
|
21080
|
+
/**
|
|
21081
|
+
* @remarks
|
|
21082
|
+
* The {@link WaypointTextureSelector} that determines which
|
|
21083
|
+
* icon texture is displayed for the waypoint based on distance
|
|
21084
|
+
* or other criteria.
|
|
21085
|
+
*
|
|
21086
|
+
* This property can't be edited in restricted-execution mode.
|
|
21087
|
+
*
|
|
21088
|
+
*/
|
|
21089
|
+
textureSelector: WaypointTextureSelector;
|
|
21090
|
+
/**
|
|
21091
|
+
* @remarks
|
|
21092
|
+
* Gets the current {@link DimensionLocation} of the waypoint.
|
|
21093
|
+
* For entity waypoints, this returns the entity's current
|
|
21094
|
+
* position. For location waypoints, this returns the stored
|
|
21095
|
+
* location.
|
|
21096
|
+
*
|
|
21097
|
+
* This function can't be called in restricted-execution mode.
|
|
21098
|
+
*
|
|
21099
|
+
* @throws This function can throw errors.
|
|
21100
|
+
*
|
|
21101
|
+
* {@link InvalidWaypointError}
|
|
21102
|
+
*
|
|
21103
|
+
* {@link InvalidWaypointTextureSelectorError}
|
|
21104
|
+
*/
|
|
21105
|
+
getDimensionLocation(): DimensionLocation;
|
|
21106
|
+
/**
|
|
21107
|
+
* @remarks
|
|
21108
|
+
* Removes the waypoint from all locator bars it has been added
|
|
21109
|
+
* to. This affects all players who have this waypoint in their
|
|
21110
|
+
* locator bar.
|
|
21111
|
+
*
|
|
21112
|
+
* This function can't be called in restricted-execution mode.
|
|
21113
|
+
*
|
|
21114
|
+
*/
|
|
21115
|
+
remove(): void;
|
|
21116
|
+
}
|
|
21117
|
+
|
|
20639
21118
|
/**
|
|
20640
21119
|
* Contains information related to changes in weather in the
|
|
20641
21120
|
* environment.
|
|
@@ -21468,6 +21947,13 @@ export class WorldAfterEvents {
|
|
|
21468
21947
|
*
|
|
21469
21948
|
*/
|
|
21470
21949
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
21950
|
+
/**
|
|
21951
|
+
* @rc
|
|
21952
|
+
* @remarks
|
|
21953
|
+
* This property can be read in early-execution mode.
|
|
21954
|
+
*
|
|
21955
|
+
*/
|
|
21956
|
+
readonly entityUpgrade: EntityUpgradeAfterEventSignal;
|
|
21471
21957
|
/**
|
|
21472
21958
|
* @remarks
|
|
21473
21959
|
* This event is fired after an explosion occurs.
|
|
@@ -22540,6 +23026,35 @@ export interface CustomCommandResult {
|
|
|
22540
23026
|
status: CustomCommandStatus;
|
|
22541
23027
|
}
|
|
22542
23028
|
|
|
23029
|
+
/**
|
|
23030
|
+
* @rc
|
|
23031
|
+
*/
|
|
23032
|
+
export interface CustomTexture {
|
|
23033
|
+
/**
|
|
23034
|
+
* @remarks
|
|
23035
|
+
* The height of the icon, in relative units. Value must be
|
|
23036
|
+
* between 0.0 and 1.0, inclusive.
|
|
23037
|
+
*
|
|
23038
|
+
* Bounds: [0, 1]
|
|
23039
|
+
*/
|
|
23040
|
+
iconHeight: number;
|
|
23041
|
+
/**
|
|
23042
|
+
* @remarks
|
|
23043
|
+
* The width of the icon, in relative units. Value must be
|
|
23044
|
+
* between 0.0 and 1.0, inclusive.
|
|
23045
|
+
*
|
|
23046
|
+
* Bounds: [0, 1]
|
|
23047
|
+
*/
|
|
23048
|
+
iconWidth: number;
|
|
23049
|
+
/**
|
|
23050
|
+
* @remarks
|
|
23051
|
+
* The resource path to the custom texture. This should be a
|
|
23052
|
+
* valid string path to a texture asset.
|
|
23053
|
+
*
|
|
23054
|
+
*/
|
|
23055
|
+
path: string;
|
|
23056
|
+
}
|
|
23057
|
+
|
|
22543
23058
|
/**
|
|
22544
23059
|
* Contains a set of updates to the component definition state
|
|
22545
23060
|
* of an entity.
|
|
@@ -23360,6 +23875,37 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
23360
23875
|
maxDistance?: number;
|
|
23361
23876
|
}
|
|
23362
23877
|
|
|
23878
|
+
/**
|
|
23879
|
+
* @rc
|
|
23880
|
+
* Controls when a waypoint is visible based on the state of
|
|
23881
|
+
* the entity it tracks. These rules allow filtering waypoint
|
|
23882
|
+
* visibility by entity conditions like sneaking, invisibility,
|
|
23883
|
+
* and death state.
|
|
23884
|
+
*/
|
|
23885
|
+
export interface EntityVisibilityRules {
|
|
23886
|
+
/**
|
|
23887
|
+
* @remarks
|
|
23888
|
+
* Controls whether the waypoint is shown when the tracked
|
|
23889
|
+
* entity is dead. If undefined, defaults to true.
|
|
23890
|
+
*
|
|
23891
|
+
*/
|
|
23892
|
+
showDead?: boolean;
|
|
23893
|
+
/**
|
|
23894
|
+
* @remarks
|
|
23895
|
+
* Controls whether the waypoint is shown when the tracked
|
|
23896
|
+
* entity is invisible. If undefined, defaults to true.
|
|
23897
|
+
*
|
|
23898
|
+
*/
|
|
23899
|
+
showInvisible?: boolean;
|
|
23900
|
+
/**
|
|
23901
|
+
* @remarks
|
|
23902
|
+
* Controls whether the waypoint is shown when the tracked
|
|
23903
|
+
* entity is sneaking. If undefined, defaults to true.
|
|
23904
|
+
*
|
|
23905
|
+
*/
|
|
23906
|
+
showSneaking?: boolean;
|
|
23907
|
+
}
|
|
23908
|
+
|
|
23363
23909
|
/**
|
|
23364
23910
|
* Equal to operator.
|
|
23365
23911
|
*/
|
|
@@ -23885,6 +24431,39 @@ export interface PlayerSwingEventOptions {
|
|
|
23885
24431
|
swingSource?: EntitySwingSource;
|
|
23886
24432
|
}
|
|
23887
24433
|
|
|
24434
|
+
/**
|
|
24435
|
+
* @rc
|
|
24436
|
+
* Controls when a waypoint is visible based on player-specific
|
|
24437
|
+
* states. Extends {@link EntityVisibilityRules} with
|
|
24438
|
+
* additional rules for player-only states like hidden mode and
|
|
24439
|
+
* spectator mode.
|
|
24440
|
+
*/
|
|
24441
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24442
|
+
export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
24443
|
+
/**
|
|
24444
|
+
* @remarks
|
|
24445
|
+
* Controls whether the waypoint is shown when the tracked
|
|
24446
|
+
* player is hidden. If undefined, defaults to true.
|
|
24447
|
+
*
|
|
24448
|
+
*/
|
|
24449
|
+
showHidden?: boolean;
|
|
24450
|
+
/**
|
|
24451
|
+
* @remarks
|
|
24452
|
+
* Controls whether the waypoint is shown when the tracked
|
|
24453
|
+
* player is in spectator mode. If undefined, defaults to true.
|
|
24454
|
+
*
|
|
24455
|
+
*/
|
|
24456
|
+
showSpectator?: boolean;
|
|
24457
|
+
/**
|
|
24458
|
+
* @remarks
|
|
24459
|
+
* Controls whether the waypoint is shown when a spectator is
|
|
24460
|
+
* viewing another spectator player. If undefined, defaults to
|
|
24461
|
+
* true.
|
|
24462
|
+
*
|
|
24463
|
+
*/
|
|
24464
|
+
showSpectatorToSpectator?: boolean;
|
|
24465
|
+
}
|
|
24466
|
+
|
|
23888
24467
|
/**
|
|
23889
24468
|
* Key frame that holds the progress of the camera animation.
|
|
23890
24469
|
*/
|
|
@@ -24581,6 +25160,60 @@ export interface VectorXZ {
|
|
|
24581
25160
|
z: number;
|
|
24582
25161
|
}
|
|
24583
25162
|
|
|
25163
|
+
/**
|
|
25164
|
+
* @rc
|
|
25165
|
+
* Defines a texture and the distance range in which it should
|
|
25166
|
+
* be displayed. Used within a {@link WaypointTextureSelector}
|
|
25167
|
+
* to create distance-based texture switching.
|
|
25168
|
+
*/
|
|
25169
|
+
export interface WaypointTextureBounds {
|
|
25170
|
+
/**
|
|
25171
|
+
* @remarks
|
|
25172
|
+
* The lower distance bound for this texture. The texture is
|
|
25173
|
+
* displayed when the distance to the waypoint is greater than
|
|
25174
|
+
* this value. Value must be greater than or equal to 0.
|
|
25175
|
+
*
|
|
25176
|
+
* Minimum Value: 0
|
|
25177
|
+
*/
|
|
25178
|
+
lowerBound: number;
|
|
25179
|
+
/**
|
|
25180
|
+
* @remarks
|
|
25181
|
+
* The {@link WaypointTexture} or {@link CustomTexture} to
|
|
25182
|
+
* display within this distance range.
|
|
25183
|
+
*
|
|
25184
|
+
*/
|
|
25185
|
+
texture: CustomTexture | WaypointTexture;
|
|
25186
|
+
/**
|
|
25187
|
+
* @remarks
|
|
25188
|
+
* The upper distance bound for this texture. The texture is
|
|
25189
|
+
* displayed when the distance to the waypoint is less than or
|
|
25190
|
+
* equal to this value. If undefined, there is no upper limit.
|
|
25191
|
+
* Value must be greater than or equal to 0.
|
|
25192
|
+
*
|
|
25193
|
+
* Minimum Value: 0
|
|
25194
|
+
*/
|
|
25195
|
+
upperBound?: number;
|
|
25196
|
+
}
|
|
25197
|
+
|
|
25198
|
+
/**
|
|
25199
|
+
* @rc
|
|
25200
|
+
* Defines how waypoint textures change based on distance.
|
|
25201
|
+
* Contains a list of texture bounds that determine which
|
|
25202
|
+
* texture is displayed at different distance ranges.
|
|
25203
|
+
*/
|
|
25204
|
+
export interface WaypointTextureSelector {
|
|
25205
|
+
/**
|
|
25206
|
+
* @remarks
|
|
25207
|
+
* An array of {@link WaypointTextureBounds} that define which
|
|
25208
|
+
* textures are displayed at different distance ranges. The
|
|
25209
|
+
* system evaluates these bounds to determine the appropriate
|
|
25210
|
+
* texture based on the current distance to the waypoint. The
|
|
25211
|
+
* list has a maximum size limit of 16.
|
|
25212
|
+
*
|
|
25213
|
+
*/
|
|
25214
|
+
textureBoundsList: WaypointTextureBounds[];
|
|
25215
|
+
}
|
|
25216
|
+
|
|
24584
25217
|
/**
|
|
24585
25218
|
* Contains additional options for a playSound occurrence.
|
|
24586
25219
|
*/
|
|
@@ -24716,6 +25349,48 @@ export class CustomComponentNameError extends Error {
|
|
|
24716
25349
|
readonly reason: CustomComponentNameErrorReason;
|
|
24717
25350
|
}
|
|
24718
25351
|
|
|
25352
|
+
/**
|
|
25353
|
+
* @rc
|
|
25354
|
+
* Thrown when trying to register a custom dimension with a
|
|
25355
|
+
* name that has already been registered.
|
|
25356
|
+
*/
|
|
25357
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25358
|
+
export class CustomDimensionAlreadyRegisteredError extends Error {
|
|
25359
|
+
private constructor();
|
|
25360
|
+
}
|
|
25361
|
+
|
|
25362
|
+
/**
|
|
25363
|
+
* @rc
|
|
25364
|
+
* Thrown when trying to register a custom dimension outside of
|
|
25365
|
+
* the system startup event.
|
|
25366
|
+
*/
|
|
25367
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25368
|
+
export class CustomDimensionInvalidRegistryError extends Error {
|
|
25369
|
+
private constructor();
|
|
25370
|
+
}
|
|
25371
|
+
|
|
25372
|
+
/**
|
|
25373
|
+
* @rc
|
|
25374
|
+
* Thrown when trying to register a custom dimension with a
|
|
25375
|
+
* name that contains invalid characters.
|
|
25376
|
+
*/
|
|
25377
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25378
|
+
export class CustomDimensionNameError extends Error {
|
|
25379
|
+
private constructor();
|
|
25380
|
+
}
|
|
25381
|
+
|
|
25382
|
+
/**
|
|
25383
|
+
* @rc
|
|
25384
|
+
* Thrown after using the /reload command when trying to
|
|
25385
|
+
* register a custom dimension that was not previously
|
|
25386
|
+
* registered. New custom dimensions cannot be added during a
|
|
25387
|
+
* reload.
|
|
25388
|
+
*/
|
|
25389
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25390
|
+
export class CustomDimensionReloadNewDimensionError extends Error {
|
|
25391
|
+
private constructor();
|
|
25392
|
+
}
|
|
25393
|
+
|
|
24719
25394
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
24720
25395
|
export class EnchantmentLevelOutOfBoundsError extends Error {
|
|
24721
25396
|
private constructor();
|
|
@@ -24839,6 +25514,25 @@ export class InvalidStructureError extends Error {
|
|
|
24839
25514
|
private constructor();
|
|
24840
25515
|
}
|
|
24841
25516
|
|
|
25517
|
+
/**
|
|
25518
|
+
* @rc
|
|
25519
|
+
* Error thrown when attempting to perform operations on an
|
|
25520
|
+
* invalid waypoint. A waypoint becomes invalid when it is
|
|
25521
|
+
* removed or when the entity it tracks is no longer valid.
|
|
25522
|
+
*/
|
|
25523
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25524
|
+
export class InvalidWaypointError extends Error {
|
|
25525
|
+
private constructor();
|
|
25526
|
+
}
|
|
25527
|
+
|
|
25528
|
+
/**
|
|
25529
|
+
* @rc
|
|
25530
|
+
*/
|
|
25531
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25532
|
+
export class InvalidWaypointTextureSelectorError extends Error {
|
|
25533
|
+
private constructor();
|
|
25534
|
+
}
|
|
25535
|
+
|
|
24842
25536
|
/**
|
|
24843
25537
|
* Thrown when trying to register an item custom component with
|
|
24844
25538
|
* a name that has already been registered.
|
|
@@ -24895,6 +25589,25 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
24895
25589
|
private constructor();
|
|
24896
25590
|
}
|
|
24897
25591
|
|
|
25592
|
+
/**
|
|
25593
|
+
* @rc
|
|
25594
|
+
* Error thrown when a locator bar operation fails. Contains a
|
|
25595
|
+
* reason code indicating the specific cause of the error.
|
|
25596
|
+
*/
|
|
25597
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25598
|
+
export class LocatorBarError extends Error {
|
|
25599
|
+
private constructor();
|
|
25600
|
+
/**
|
|
25601
|
+
* @remarks
|
|
25602
|
+
* The {@link LocatorBarErrorReason} code that indicates why
|
|
25603
|
+
* the locator bar operation failed.
|
|
25604
|
+
*
|
|
25605
|
+
* This property can be read in early-execution mode.
|
|
25606
|
+
*
|
|
25607
|
+
*/
|
|
25608
|
+
readonly reason: LocatorBarErrorReason;
|
|
25609
|
+
}
|
|
25610
|
+
|
|
24898
25611
|
/**
|
|
24899
25612
|
* Thrown when a name requires a namespace and an error occurs
|
|
24900
25613
|
* when validating that namespace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.8.0-rc.1.26.30-preview.
|
|
3
|
+
"version": "2.8.0-rc.1.26.30-preview.30",
|
|
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.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.30-preview.30"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|