@minecraft/server 1.18.0-rc.1.21.80-preview.20 → 1.18.0

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 (3) hide show
  1. package/README.md +1 -3
  2. package/index.d.ts +2 -80
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Contains many types related to manipulating a Minecraft world, including entities, blocks, dimensions, and more.
4
4
 
5
- ## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
6
-
7
5
  See full documentation for this module here:
8
6
 
9
- https://learn.microsoft.com/en-us/minecraft/creator/legacyscriptapi/minecraft/server-1xx/minecraft-server
7
+ https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/minecraft-server
package/index.d.ts CHANGED
@@ -7,7 +7,6 @@
7
7
  Copyright (c) Microsoft Corporation.
8
8
  ***************************************************************************** */
9
9
  /**
10
- * @preview
11
10
  * @packageDocumentation
12
11
  * Contains many types related to manipulating a Minecraft
13
12
  * world, including entities, blocks, dimensions, and more.
@@ -114,7 +113,6 @@ export enum BlockVolumeIntersection {
114
113
  }
115
114
 
116
115
  /**
117
- * @rc
118
116
  * The state of a button on a keyboard, controller, or touch
119
117
  * interface.
120
118
  */
@@ -1503,7 +1501,6 @@ export enum HudVisibility {
1503
1501
  }
1504
1502
 
1505
1503
  /**
1506
- * @rc
1507
1504
  * All the different input buttons that are supported. Use with
1508
1505
  * {@link InputInfo.getButtonState} via {@link
1509
1506
  * Player.inputInfo} or {@link PlayerButtonInputAfterEvent} via
@@ -1703,7 +1700,6 @@ export enum ItemLockMode {
1703
1700
  }
1704
1701
 
1705
1702
  /**
1706
- * @rc
1707
1703
  * Represents the type of liquid that can be placed on a block
1708
1704
  * or flow dynamically in the world.
1709
1705
  */
@@ -1816,7 +1812,6 @@ export enum MoonPhase {
1816
1812
  }
1817
1813
 
1818
1814
  /**
1819
- * @rc
1820
1815
  * An enumeration describing the reason for the namespace name
1821
1816
  * error being thrown
1822
1817
  */
@@ -2245,16 +2240,10 @@ export enum WeatherType {
2245
2240
  Thunder = 'Thunder',
2246
2241
  }
2247
2242
 
2248
- /**
2249
- * @rc
2250
- */
2251
2243
  export type BlockComponentReturnType<T extends string> = T extends keyof BlockComponentTypeMap
2252
2244
  ? BlockComponentTypeMap[T]
2253
2245
  : BlockComponent;
2254
2246
 
2255
- /**
2256
- * @rc
2257
- */
2258
2247
  export type BlockComponentTypeMap = {
2259
2248
  fluidContainer: BlockFluidContainerComponent;
2260
2249
  inventory: BlockInventoryComponent;
@@ -2269,7 +2258,6 @@ export type BlockComponentTypeMap = {
2269
2258
  };
2270
2259
 
2271
2260
  /**
2272
- * @rc
2273
2261
  * Type alias used by the {@link BlockPermutation} matches and
2274
2262
  * resolve functions to narrow block state argument types to
2275
2263
  * those mapped by {@link
@@ -2281,16 +2269,10 @@ export type BlockStateArg<T> = T extends `${minecraftvanilladata.MinecraftBlockT
2281
2269
  : never
2282
2270
  : Record<string, boolean | number | string>;
2283
2271
 
2284
- /**
2285
- * @rc
2286
- */
2287
2272
  export type EntityComponentReturnType<T extends string> = T extends keyof EntityComponentTypeMap
2288
2273
  ? EntityComponentTypeMap[T]
2289
2274
  : EntityComponent;
2290
2275
 
2291
- /**
2292
- * @rc
2293
- */
2294
2276
  export type EntityComponentTypeMap = {
2295
2277
  addrider: EntityAddRiderComponent;
2296
2278
  ageable: EntityAgeableComponent;
@@ -2424,16 +2406,10 @@ export type EntityComponentTypeMap = {
2424
2406
  wants_jockey: EntityWantsJockeyComponent;
2425
2407
  };
2426
2408
 
2427
- /**
2428
- * @rc
2429
- */
2430
2409
  export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
2431
2410
  ? ItemComponentTypeMap[T]
2432
2411
  : ItemComponent;
2433
2412
 
2434
- /**
2435
- * @rc
2436
- */
2437
2413
  export type ItemComponentTypeMap = {
2438
2414
  compostable: ItemCompostableComponent;
2439
2415
  cooldown: ItemCooldownComponent;
@@ -2595,7 +2571,6 @@ export class Block {
2595
2571
  */
2596
2572
  bottomCenter(): Vector3;
2597
2573
  /**
2598
- * @rc
2599
2574
  * @remarks
2600
2575
  * Returns whether this block is removed when touched by
2601
2576
  * liquid.
@@ -2614,7 +2589,6 @@ export class Block {
2614
2589
  */
2615
2590
  canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
2616
2591
  /**
2617
- * @rc
2618
2592
  * @remarks
2619
2593
  * Returns whether this block can have a liquid placed over it,
2620
2594
  * i.e. be waterlogged.
@@ -2756,7 +2730,6 @@ export class Block {
2756
2730
  */
2757
2731
  hasTag(tag: string): boolean;
2758
2732
  /**
2759
- * @rc
2760
2733
  * @remarks
2761
2734
  * Returns whether this block stops liquid from flowing.
2762
2735
  *
@@ -2786,7 +2759,6 @@ export class Block {
2786
2759
  */
2787
2760
  isValid(): boolean;
2788
2761
  /**
2789
- * @rc
2790
2762
  * @remarks
2791
2763
  * Returns whether liquid can flow into the block from the
2792
2764
  * provided direction, or flow out from the provided direction
@@ -2808,7 +2780,6 @@ export class Block {
2808
2780
  */
2809
2781
  liquidCanFlowFromDirection(liquidType: LiquidType, flowDirection: Direction): boolean;
2810
2782
  /**
2811
- * @rc
2812
2783
  * @remarks
2813
2784
  * Returns whether this block is removed and spawns its item
2814
2785
  * when touched by liquid.
@@ -3428,7 +3399,6 @@ export class BlockPermutation {
3428
3399
  */
3429
3400
  readonly 'type': BlockType;
3430
3401
  /**
3431
- * @rc
3432
3402
  * @remarks
3433
3403
  * Returns whether this block is removed when touched by
3434
3404
  * liquid.
@@ -3443,7 +3413,6 @@ export class BlockPermutation {
3443
3413
  */
3444
3414
  canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
3445
3415
  /**
3446
- * @rc
3447
3416
  * @remarks
3448
3417
  * Returns whether this block can have a liquid placed over it,
3449
3418
  * i.e. be waterlogged.
@@ -3522,7 +3491,6 @@ export class BlockPermutation {
3522
3491
  */
3523
3492
  hasTag(tag: string): boolean;
3524
3493
  /**
3525
- * @rc
3526
3494
  * @remarks
3527
3495
  * Returns whether this block stops liquid from flowing.
3528
3496
  *
@@ -3536,7 +3504,6 @@ export class BlockPermutation {
3536
3504
  */
3537
3505
  isLiquidBlocking(liquidType: LiquidType): boolean;
3538
3506
  /**
3539
- * @rc
3540
3507
  * @remarks
3541
3508
  * Returns whether this block is removed and spawns its item
3542
3509
  * when touched by liquid.
@@ -10047,7 +10014,6 @@ export class InputInfo {
10047
10014
  */
10048
10015
  readonly touchOnlyAffectsHotbar: boolean;
10049
10016
  /**
10050
- * @rc
10051
10017
  * @throws This function can throw errors.
10052
10018
  *
10053
10019
  * {@link minecraftcommon.EngineError}
@@ -10056,7 +10022,6 @@ export class InputInfo {
10056
10022
  */
10057
10023
  getButtonState(button: InputButton): ButtonState;
10058
10024
  /**
10059
- * @rc
10060
10025
  * @throws This function can throw errors.
10061
10026
  *
10062
10027
  * {@link InvalidEntityError}
@@ -11074,9 +11039,8 @@ export class ItemStack {
11074
11039
  * @param componentId
11075
11040
  * The identifier of the component (e.g., 'minecraft:food'). If
11076
11041
  * no namespace prefix is specified, 'minecraft:' is assumed.
11077
- * Available component IDs are those in the {@link
11078
- * ItemComponentTypes} enum and custom component IDs registered
11079
- * with the {@link ItemComponentRegistry}.
11042
+ * Available component IDs can be found as part of the {@link
11043
+ * ItemComponentTypes} enum.
11080
11044
  * @returns
11081
11045
  * Returns the component if it exists on the item stack,
11082
11046
  * otherwise undefined.
@@ -12551,10 +12515,6 @@ export class Player extends Entity {
12551
12515
  * This method can throw if the provided {@link RawMessage} is
12552
12516
  * in an invalid format. For example, if an empty `name` string
12553
12517
  * is provided to `score`.
12554
- *
12555
- * {@link InvalidEntityError}
12556
- *
12557
- * {@link RawMessageError}
12558
12518
  * @example nestedTranslation.ts
12559
12519
  * ```typescript
12560
12520
  * import { world, DimensionLocation } from "@minecraft/server";
@@ -12657,7 +12617,6 @@ export class Player extends Entity {
12657
12617
  */
12658
12618
  setSpawnPoint(spawnPoint?: DimensionLocation): void;
12659
12619
  /**
12660
- * @rc
12661
12620
  * @remarks
12662
12621
  * Creates a new particle emitter at a specified location in
12663
12622
  * the world. Only visible to the target player.
@@ -12862,7 +12821,6 @@ export class PlayerBreakBlockBeforeEventSignal {
12862
12821
  }
12863
12822
 
12864
12823
  /**
12865
- * @rc
12866
12824
  * Event data for when a player presses a button.
12867
12825
  */
12868
12826
  export class PlayerButtonInputAfterEvent {
@@ -12888,7 +12846,6 @@ export class PlayerButtonInputAfterEvent {
12888
12846
  }
12889
12847
 
12890
12848
  /**
12891
- * @rc
12892
12849
  * Manages callbacks that are connected to player inputs.
12893
12850
  */
12894
12851
  export class PlayerButtonInputAfterEventSignal {
@@ -14463,8 +14420,6 @@ export class ScreenDisplay {
14463
14420
  * This function can't be called in read-only mode.
14464
14421
  *
14465
14422
  * @throws This function can throw errors.
14466
- *
14467
- * {@link InvalidEntityError}
14468
14423
  */
14469
14424
  getHiddenHudElements(): HudElement[];
14470
14425
  /**
@@ -14472,8 +14427,6 @@ export class ScreenDisplay {
14472
14427
  * This function can't be called in read-only mode.
14473
14428
  *
14474
14429
  * @throws This function can throw errors.
14475
- *
14476
- * {@link InvalidEntityError}
14477
14430
  */
14478
14431
  hideAllExcept(hudElements?: HudElement[]): void;
14479
14432
  /**
@@ -14481,8 +14434,6 @@ export class ScreenDisplay {
14481
14434
  * This function can't be called in read-only mode.
14482
14435
  *
14483
14436
  * @throws This function can throw errors.
14484
- *
14485
- * {@link InvalidEntityError}
14486
14437
  */
14487
14438
  isForcedHidden(hudElement: HudElement): boolean;
14488
14439
  /**
@@ -14495,14 +14446,10 @@ export class ScreenDisplay {
14495
14446
  */
14496
14447
  isValid(): boolean;
14497
14448
  /**
14498
- * @deprecated This function is deprecated and will be removed in 2.0.0.
14499
- *
14500
14449
  * @remarks
14501
14450
  * This function can't be called in read-only mode.
14502
14451
  *
14503
14452
  * @throws This function can throw errors.
14504
- *
14505
- * {@link InvalidEntityError}
14506
14453
  */
14507
14454
  resetHudElements(): void;
14508
14455
  /**
@@ -14515,10 +14462,6 @@ export class ScreenDisplay {
14515
14462
  * @param text
14516
14463
  * New value for the action bar text.
14517
14464
  * @throws This function can throw errors.
14518
- *
14519
- * {@link InvalidEntityError}
14520
- *
14521
- * {@link RawMessageError}
14522
14465
  */
14523
14466
  setActionBar(text: (RawMessage | string)[] | RawMessage | string): void;
14524
14467
  /**
@@ -14534,8 +14477,6 @@ export class ScreenDisplay {
14534
14477
  * @param hudElements
14535
14478
  * Optional list of HUD elements to configure visibility for.
14536
14479
  * @throws This function can throw errors.
14537
- *
14538
- * {@link InvalidEntityError}
14539
14480
  */
14540
14481
  setHudVisibility(visible: HudVisibility, hudElements?: HudElement[]): void;
14541
14482
  /**
@@ -14548,12 +14489,6 @@ export class ScreenDisplay {
14548
14489
  * This function can't be called in read-only mode.
14549
14490
  *
14550
14491
  * @throws This function can throw errors.
14551
- *
14552
- * {@link minecraftcommon.ArgumentOutOfBoundsError}
14553
- *
14554
- * {@link InvalidEntityError}
14555
- *
14556
- * {@link RawMessageError}
14557
14492
  * @example setTitle.ts
14558
14493
  * ```typescript
14559
14494
  * import { world, DimensionLocation } from "@minecraft/server";
@@ -14619,10 +14554,6 @@ export class ScreenDisplay {
14619
14554
  * This function can't be called in read-only mode.
14620
14555
  *
14621
14556
  * @throws This function can throw errors.
14622
- *
14623
- * {@link InvalidEntityError}
14624
- *
14625
- * {@link RawMessageError}
14626
14557
  * @example countdown.ts
14627
14558
  * ```typescript
14628
14559
  * import { world, system, DimensionLocation } from "@minecraft/server";
@@ -15226,7 +15157,6 @@ export class System {
15226
15157
  */
15227
15158
  runTimeout(callback: () => void, tickDelay?: number): number;
15228
15159
  /**
15229
- * @rc
15230
15160
  * @remarks
15231
15161
  * Causes an event to fire within script with the specified
15232
15162
  * message ID and payload.
@@ -16340,7 +16270,6 @@ export class WorldAfterEvents {
16340
16270
  */
16341
16271
  readonly playerBreakBlock: PlayerBreakBlockAfterEventSignal;
16342
16272
  /**
16343
- * @rc
16344
16273
  * @remarks
16345
16274
  * This event fires when an {@link InputButton} state is
16346
16275
  * changed.
@@ -17860,7 +17789,6 @@ export interface GreaterThanOrEqualsComparison {
17860
17789
  }
17861
17790
 
17862
17791
  /**
17863
- * @rc
17864
17792
  * An interface that is passed into {@link
17865
17793
  * @minecraft/Server.PlayerButtonInputAfterEventSignal.subscribe}
17866
17794
  * that filters out which events are passed to the provided
@@ -18781,7 +18709,6 @@ export class LocationOutOfWorldBoundariesError extends Error {
18781
18709
  }
18782
18710
 
18783
18711
  /**
18784
- * @rc
18785
18712
  * Thrown when a name requires a namespace and an error occurs
18786
18713
  * when validating that namespace
18787
18714
  */
@@ -18796,11 +18723,6 @@ export class NamespaceNameError extends Error {
18796
18723
  reason: NamespaceNameErrorReason;
18797
18724
  }
18798
18725
 
18799
- // @ts-ignore Class inheritance allowed for native defined classes
18800
- export class RawMessageError extends Error {
18801
- private constructor();
18802
- }
18803
-
18804
18726
  /**
18805
18727
  * Error thrown when the specified area contains one or more
18806
18728
  * unloaded chunks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.18.0-rc.1.21.80-preview.20",
3
+ "version": "1.18.0",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {