@minecraft/server-editor 0.1.0-beta.1.21.30-preview.22 → 0.1.0-beta.1.21.30-preview.24

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 +65 -16
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1614,6 +1614,15 @@ export class ClipboardItem {
1614
1614
  * @throws This function can throw errors.
1615
1615
  */
1616
1616
  readFromSelection(selection: Selection): void;
1617
+ /**
1618
+ * @remarks
1619
+ * This function can't be called in read-only mode.
1620
+ *
1621
+ * @throws This function can throw errors.
1622
+ *
1623
+ * {@link Error}
1624
+ */
1625
+ readFromStructure(structure: EditorStructure): void;
1617
1626
  /**
1618
1627
  * @remarks
1619
1628
  * Copy the contents of a rectangular volume into the Clipboard
@@ -1925,6 +1934,45 @@ export class CursorPropertyChangeAfterEventSignal {
1925
1934
  unsubscribe(callback: (arg: CursorPropertiesChangeAfterEvent) => void): void;
1926
1935
  }
1927
1936
 
1937
+ export class EditorStructureManager {
1938
+ private constructor();
1939
+ /**
1940
+ * @remarks
1941
+ * This function can't be called in read-only mode.
1942
+ *
1943
+ * @throws This function can throw errors.
1944
+ */
1945
+ createFromClipboardItem(item: ClipboardItem, structureName: string): EditorStructure;
1946
+ /**
1947
+ * @remarks
1948
+ * This function can't be called in read-only mode.
1949
+ *
1950
+ * @throws This function can throw errors.
1951
+ */
1952
+ getExistingTags(): string[];
1953
+ /**
1954
+ * @remarks
1955
+ * This function can't be called in read-only mode.
1956
+ *
1957
+ * @throws This function can throw errors.
1958
+ */
1959
+ loadStructure(location: string, id: string): EditorStructure;
1960
+ /**
1961
+ * @remarks
1962
+ * This function can't be called in read-only mode.
1963
+ *
1964
+ * @throws This function can throw errors.
1965
+ */
1966
+ saveStructure(structure: EditorStructure): void;
1967
+ /**
1968
+ * @remarks
1969
+ * This function can't be called in read-only mode.
1970
+ *
1971
+ * @throws This function can throw errors.
1972
+ */
1973
+ searchStructures(options?: EditorStructureSearchOptions): EditorStructure[];
1974
+ }
1975
+
1928
1976
  /**
1929
1977
  * Validates observable objects that support string as
1930
1978
  * EntityType
@@ -2097,6 +2145,7 @@ export class ExtensionContext {
2097
2145
  *
2098
2146
  */
2099
2147
  readonly settings: SettingsManager;
2148
+ readonly structureManager: EditorStructureManager;
2100
2149
  /**
2101
2150
  * @remarks
2102
2151
  * The instance of the players Transaction Manager and the main
@@ -3806,6 +3855,19 @@ export interface CursorProperties {
3806
3855
  visible?: boolean;
3807
3856
  }
3808
3857
 
3858
+ export interface EditorStructure {
3859
+ storageLocation: string;
3860
+ structure: minecraftserver.Structure;
3861
+ tags: string[];
3862
+ }
3863
+
3864
+ export interface EditorStructureSearchOptions {
3865
+ excludeTags?: string[];
3866
+ idPattern?: string;
3867
+ includeLocation?: string[];
3868
+ includeTags?: string[];
3869
+ }
3870
+
3809
3871
  /**
3810
3872
  * An interface which defines the set of optional parameters
3811
3873
  * which can be used when calling the `registerEditorExtension`
@@ -3861,6 +3923,7 @@ export interface GameOptions {
3861
3923
  fireSpreads?: boolean;
3862
3924
  friendlyFire?: boolean;
3863
3925
  gameMode?: minecraftserver.GameMode;
3926
+ hardcore?: boolean;
3864
3927
  immediateRespawn?: boolean;
3865
3928
  keepInventory?: boolean;
3866
3929
  lanVisibility?: boolean;
@@ -3987,12 +4050,6 @@ export interface WidgetGroupCreateOptions {
3987
4050
  * client side UI is per player.
3988
4051
  */
3989
4052
  export interface ActionManager {
3990
- /**
3991
- * @remarks
3992
- * The active tool ID
3993
- *
3994
- */
3995
- activeToolId: string | undefined;
3996
4053
  /**
3997
4054
  * @remarks
3998
4055
  * Creates an action and registers it on the client
@@ -4836,18 +4893,10 @@ export interface IModalToolContainer {
4836
4893
  *
4837
4894
  */
4838
4895
  readonly currentTools: IModalTool[];
4839
- /**
4840
- * @remarks
4841
- * The id of the selected tool in container.
4842
- *
4843
- */
4844
- readonly selectedOptionId?: string;
4845
4896
  addTool(params: ModalToolCreationParameters, action?: RegisteredAction<NoArgsAction>): IModalTool;
4846
- dispose(): void;
4847
- hide(): void;
4897
+ getSelectedToolId(): string | undefined;
4848
4898
  removeTool(id: string): void;
4849
- setSelectedOptionId(value: string | undefined, update?: boolean): void;
4850
- show(): void;
4899
+ setSelectedToolId(id: string | undefined): void;
4851
4900
  }
4852
4901
 
4853
4902
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.30-preview.22",
3
+ "version": "0.1.0-beta.1.21.30-preview.24",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^1.15.0-beta.1.21.30-preview.22"
17
+ "@minecraft/server": "^1.15.0-beta.1.21.30-preview.24"
18
18
  },
19
19
  "license": "MIT"
20
20
  }