@minecraft/server-editor 0.1.0-beta.1.20.20-preview.23 → 0.1.0-beta.1.20.30-preview.21

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 +105 -13
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * ```json
15
15
  * {
16
16
  * "module_name": "@minecraft/server-editor",
17
- * "version": "0.1.0-beta.1.20.20-preview.23"
17
+ * "version": "0.1.0-beta.1.20.30-preview.21"
18
18
  * }
19
19
  * ```
20
20
  *
@@ -569,6 +569,12 @@ export declare class BedrockEventSubscriptionCache {
569
569
  | ((arg: minecraftserver.TripWireTripAfterEvent) => void)
570
570
  | ((arg: minecraftserver.WeatherChangeAfterEvent) => void)
571
571
  | ((arg: minecraftserver.WorldInitializeAfterEvent) => void);
572
+ /**
573
+ * @remarks
574
+ * Cleans up the set of internal registrations and
575
+ * subscriptions.
576
+ *
577
+ */
572
578
  teardown(): void;
573
579
  }
574
580
 
@@ -595,6 +601,36 @@ export class ClipboardItem {
595
601
  * @throws This function can throw errors.
596
602
  */
597
603
  clear(): void;
604
+ /**
605
+ * @remarks
606
+ * Create a {@link @minecraft/server.CompoundBlockVolume}
607
+ * container which represents the occupied block volumes within
608
+ * the ClipboardItem.
609
+ * This function does not perform any write operations, and
610
+ * instead returns only a prediction of the volume area which
611
+ * would be affected as part of a write operation with a given
612
+ * set of write options.
613
+ *
614
+ * This function can't be called in read-only mode.
615
+ *
616
+ * @param location
617
+ * A world location to which the ClipboardItem may potentially
618
+ * be written (nothing is actually written as part of this
619
+ * operation)
620
+ * @param options
621
+ * An optional set of write parameters which govern how the
622
+ * ClipboardItem should be potentially applied to the world
623
+ * @returns
624
+ * A {@link @minecraft/server.CompoundBlockVolume} which
625
+ * represents the occupied block volumes within the
626
+ * ClipboardItem as they would be written to the world with the
627
+ * specified {@link ClipboardWriteOptions}
628
+ * @throws This function can throw errors.
629
+ */
630
+ getPredictedWriteAsCompoundBlockVolume(
631
+ location: minecraftserver.Vector3,
632
+ options?: ClipboardWriteOptions,
633
+ ): minecraftserver.CompoundBlockVolume;
598
634
  /**
599
635
  * @remarks
600
636
  * Create a {@link Selection} container which represents the
@@ -1002,6 +1038,7 @@ export class MinecraftEditor {
1002
1038
  * messages sent to this instance will be broadcast to all
1003
1039
  * connected editor client sessions
1004
1040
  *
1041
+ * @throws This property can throw when used.
1005
1042
  */
1006
1043
  readonly log: Logger;
1007
1044
  /**
@@ -1119,7 +1156,7 @@ export class Selection {
1119
1156
  *
1120
1157
  * @throws This function can throw errors.
1121
1158
  */
1122
- getFillColor(): minecraftserver.Color;
1159
+ getFillColor(): minecraftserver.RGBA;
1123
1160
  /**
1124
1161
  * @remarks
1125
1162
  * Return the color of the on-screen selection container
@@ -1129,7 +1166,16 @@ export class Selection {
1129
1166
  *
1130
1167
  * @throws This function can throw errors.
1131
1168
  */
1132
- getOutlineColor(): minecraftserver.Color;
1169
+ getOutlineColor(): minecraftserver.RGBA;
1170
+ /**
1171
+ * @remarks
1172
+ * Get the origin of the CompoundBlockVolume that makes up the
1173
+ * block component part of selection
1174
+ *
1175
+ * This function can't be called in read-only mode.
1176
+ *
1177
+ */
1178
+ getVolumeOrigin(): minecraftserver.Vector3;
1133
1179
  /**
1134
1180
  * @remarks
1135
1181
  * Translate a selection by a given amount (this causes all of
@@ -1168,10 +1214,15 @@ export class Selection {
1168
1214
  *
1169
1215
  * This function can't be called in read-only mode.
1170
1216
  *
1217
+ * @param forceRelativity
1218
+ * See the description for {@link
1219
+ * @minecraft-server/CompoundBlockVolume.peekLastVolume}
1171
1220
  * @returns
1172
1221
  * Returns undefined if the stack is empty
1173
1222
  */
1174
- peekLastVolume(): minecraftserver.CompoundBlockVolumeItem | undefined;
1223
+ peekLastVolume(
1224
+ forceRelativity?: minecraftserver.CompoundBlockVolumePositionRelativity,
1225
+ ): minecraftserver.CompoundBlockVolumeItem | undefined;
1175
1226
  /**
1176
1227
  * @remarks
1177
1228
  * Remove the volume information that was last pushed to the
@@ -1204,11 +1255,16 @@ export class Selection {
1204
1255
  *
1205
1256
  * This function can't be called in read-only mode.
1206
1257
  *
1207
- * @param newSelection
1208
- * Selection object to copy
1258
+ * @param other
1259
+ * {@link @minecraft-server/CompoundBlockVolume} - set the
1260
+ * block component part of this selection to the specified
1261
+ * compound block volume. This will completely replace all
1262
+ * block volume definitions in the selection.
1263
+ * {@link @Selection} - replace the selection with the
1264
+ * specified selection
1209
1265
  * @throws This function can throw errors.
1210
1266
  */
1211
- set(newSelection: Selection): void;
1267
+ set(other: minecraftserver.CompoundBlockVolume | Selection): void;
1212
1268
  /**
1213
1269
  * @remarks
1214
1270
  * Set the color of the hull of the selection object if it is
@@ -1218,7 +1274,7 @@ export class Selection {
1218
1274
  *
1219
1275
  * @throws This function can throw errors.
1220
1276
  */
1221
- setFillColor(color: minecraftserver.Color): void;
1277
+ setFillColor(color: minecraftserver.RGBA): void;
1222
1278
  /**
1223
1279
  * @remarks
1224
1280
  * Set the color of the outline around the selection object if
@@ -1228,7 +1284,7 @@ export class Selection {
1228
1284
  *
1229
1285
  * @throws This function can throw errors.
1230
1286
  */
1231
- setOutlineColor(color: minecraftserver.Color): void;
1287
+ setOutlineColor(color: minecraftserver.RGBA): void;
1232
1288
  }
1233
1289
 
1234
1290
  /**
@@ -1387,6 +1443,23 @@ export class TransactionManager {
1387
1443
  * @throws This function can throw errors.
1388
1444
  */
1389
1445
  trackBlockChangeArea(from: minecraftserver.Vector3, to: minecraftserver.Vector3): boolean;
1446
+ /**
1447
+ * @remarks
1448
+ * Begin tracking block changes in an area defined by a {@link
1449
+ * @minecraft-server/CompoundBlockVolume}. These will be added
1450
+ * to a pending changes list.
1451
+ * The pending list will be added to the open transaction
1452
+ * record when a commit has been issued.
1453
+ *
1454
+ * This function can't be called in read-only mode.
1455
+ *
1456
+ * @param compoundBlockVolume
1457
+ * {@link @minecraft-server/CompoundBlockVolume} to track.
1458
+ * Only non-void block locations will be tracked -- any changes
1459
+ * falling into a void/negative space will not be tracked
1460
+ * @throws This function can throw errors.
1461
+ */
1462
+ trackBlockChangeCompoundBlockVolume(compoundBlockVolume: minecraftserver.CompoundBlockVolume): boolean;
1390
1463
  /**
1391
1464
  * @remarks
1392
1465
  * Begin tracking block changes in a list of specified block
@@ -1544,7 +1617,7 @@ export interface CursorProperties {
1544
1617
  * cursor object outline
1545
1618
  *
1546
1619
  */
1547
- outlineColor?: minecraftserver.Color;
1620
+ outlineColor?: minecraftserver.RGBA;
1548
1621
  /**
1549
1622
  * @remarks
1550
1623
  * An enum representing the cursor target mode
@@ -1653,7 +1726,7 @@ export interface ActionManager {
1653
1726
  export interface BuiltInUIManager {
1654
1727
  /**
1655
1728
  * @remarks
1656
- * Navigates to the documentation site
1729
+ * Navigates to the documentation site.
1657
1730
  *
1658
1731
  */
1659
1732
  navigateToDocumentation(): void;
@@ -1690,12 +1763,19 @@ export interface BuiltInUIManager {
1690
1763
  }
1691
1764
 
1692
1765
  /**
1693
- * An event that can be subscribed to. Leverage the token to
1694
- * clean up handlers
1766
+ * An event that can be subscribed to. You can use the token,
1767
+ * returned from the subscribe method, to clean up handlers.
1695
1768
  */
1696
1769
  export declare interface EventSink<T> {
1697
1770
  /**
1698
1771
  * @remarks
1772
+ * Subscribes an event handler to a particular subscription.
1773
+ *
1774
+ * @param handler
1775
+ * Handler function to subscribe with.
1776
+ * @returns
1777
+ * An event handler subscription token that can be used to
1778
+ * unsubscribe and clean-up handlers.
1699
1779
  */
1700
1780
  subscribe(handler: EventHandler<T>): IEventToken;
1701
1781
  }
@@ -1706,6 +1786,8 @@ export declare interface EventSink<T> {
1706
1786
  export interface IDisposable {
1707
1787
  /**
1708
1788
  * @remarks
1789
+ * Initiates the teardown and cleanup of this disposable item.
1790
+ *
1709
1791
  */
1710
1792
  teardown(): void;
1711
1793
  }
@@ -2247,7 +2329,17 @@ export interface IPropertyPaneOptions {
2247
2329
  * the extension manager
2248
2330
  */
2249
2331
  export interface IRegisterExtensionOptionalParameters {
2332
+ /**
2333
+ * @remarks
2334
+ * Description of the extension.
2335
+ *
2336
+ */
2250
2337
  description?: string;
2338
+ /**
2339
+ * @remarks
2340
+ * Additional notes and description of the extension.
2341
+ *
2342
+ */
2251
2343
  notes?: string;
2252
2344
  }
2253
2345
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.20.20-preview.23",
3
+ "version": "0.1.0-beta.1.20.30-preview.21",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "dependencies": {
16
- "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23"
16
+ "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21"
17
17
  },
18
18
  "license": "MIT"
19
19
  }