@minecraft/server-editor 0.1.0-beta.1.21.90-preview.21 → 0.1.0-beta.1.21.90-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.
Files changed (2) hide show
  1. package/index.d.ts +389 -7
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -282,6 +282,7 @@ export enum GamePublishSetting {
282
282
  * properties.
283
283
  */
284
284
  export enum GraphicsSettingsProperty {
285
+ GraphicsMode = 'GraphicsMode',
285
286
  NightVision = 'NightVision',
286
287
  ShowChunkBoundaries = 'ShowChunkBoundaries',
287
288
  ShowCompass = 'ShowCompass',
@@ -1039,6 +1040,7 @@ export declare enum PropertyItemType {
1039
1040
  Button = 'editorUI:Button',
1040
1041
  ButtonPane = 'editorUI:ButtonPane',
1041
1042
  ColorPicker = 'editorUI:ColorPicker',
1043
+ ColorTimeline = 'editorUI:ColorTimeline',
1042
1044
  ComboBox = 'editorUI:ComboBox',
1043
1045
  DataTable = 'editorUI:DataTable',
1044
1046
  Divider = 'editorUI:Divider',
@@ -1046,7 +1048,9 @@ export declare enum PropertyItemType {
1046
1048
  Image = 'editorUI:Image',
1047
1049
  Link = 'editorUI:Link',
1048
1050
  Number = 'editorUI:Number',
1051
+ NumberTimeline = 'editorUI:NumberTimeline',
1049
1052
  ProgressIndicator = 'editorUI:ProgressIndicator',
1053
+ ProxyPane = 'editorUI:ProxyPane',
1050
1054
  String = 'editorUI:String',
1051
1055
  SubPane = 'editorUI:SubPane',
1052
1056
  Text = 'editorUI:Text',
@@ -1248,6 +1252,7 @@ export declare type EventHandler<T> = (eventArg: T) => void;
1248
1252
  * Defines type information for graphics settings properties.
1249
1253
  */
1250
1254
  export type GraphicsSettingsPropertyTypeMap = {
1255
+ [GraphicsSettingsProperty.GraphicsMode]?: minecraftserver.GraphicsMode;
1251
1256
  [GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
1252
1257
  [GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
1253
1258
  [GraphicsSettingsProperty.ShowCompass]?: boolean;
@@ -1625,6 +1630,14 @@ export class BlockUtilities {
1625
1630
  volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | RelativeVolumeListBlockVolume,
1626
1631
  block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
1627
1632
  ): void;
1633
+ /**
1634
+ * @remarks
1635
+ * This function can't be called in read-only mode.
1636
+ *
1637
+ */
1638
+ findObscuredBlocksWithinVolume(
1639
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
1640
+ ): RelativeVolumeListBlockVolume;
1628
1641
  /**
1629
1642
  * @remarks
1630
1643
  * This function can't be called in read-only mode.
@@ -1754,6 +1767,12 @@ export class BrushShapeManager {
1754
1767
  *
1755
1768
  */
1756
1769
  getBrushShapeOffset(): minecraftserver.Vector3;
1770
+ /**
1771
+ * @remarks
1772
+ * This function can't be called in read-only mode.
1773
+ *
1774
+ */
1775
+ isBrushPaintBusy(): boolean;
1757
1776
  /**
1758
1777
  * @remarks
1759
1778
  * This function can't be called in read-only mode.
@@ -3264,6 +3283,13 @@ export class TransactionManager {
3264
3283
  * @throws This function can throw errors.
3265
3284
  */
3266
3285
  discardTrackedChanges(): number;
3286
+ /**
3287
+ * @remarks
3288
+ * This function can't be called in read-only mode.
3289
+ *
3290
+ * @throws This function can throw errors.
3291
+ */
3292
+ isBusy(): boolean;
3267
3293
  /**
3268
3294
  * @remarks
3269
3295
  * Open a transaction record which will be a container for any
@@ -5040,6 +5066,144 @@ export interface IColorPickerPropertyItemOptions extends IPropertyItemOptionsBas
5040
5066
  variant?: ColorPickerPropertyItemVariant;
5041
5067
  }
5042
5068
 
5069
+ /**
5070
+ * A property item which supports Color Timeline properties
5071
+ */
5072
+ // @ts-ignore Class inheritance allowed for native defined classes
5073
+ export interface IColorTimelinePropertyItem extends IPropertyItemBase {
5074
+ /**
5075
+ * @remarks
5076
+ * Update color timeline entry
5077
+ *
5078
+ * @param data
5079
+ * New color node.
5080
+ */
5081
+ addNode(data: IColorTimelinePropertyItemEntry): void;
5082
+ /**
5083
+ * @remarks
5084
+ * Get the list of nodes in the property item.
5085
+ *
5086
+ */
5087
+ getData(): IColorTimelinePropertyItemEntry[];
5088
+ /**
5089
+ * @remarks
5090
+ * Get time current time value on the slider.
5091
+ *
5092
+ */
5093
+ getTime(): number;
5094
+ /**
5095
+ * @remarks
5096
+ * Remove color node
5097
+ *
5098
+ * @param data
5099
+ * Node to be removed.
5100
+ */
5101
+ removeNode(data: IColorTimelinePropertyItemEntry): void;
5102
+ /**
5103
+ * @remarks
5104
+ * Set custom decimal precision for the calculations
5105
+ *
5106
+ */
5107
+ setPrecision(precision: number): void;
5108
+ /**
5109
+ * @remarks
5110
+ * Set time line slider value to a new value
5111
+ *
5112
+ * @param time
5113
+ * The new time value.
5114
+ */
5115
+ setTime(time: number): void;
5116
+ /**
5117
+ * @remarks
5118
+ * Updates title of the property item.
5119
+ *
5120
+ * @param title
5121
+ * New title.
5122
+ */
5123
+ setTitle(title: LocalizedString): void;
5124
+ /**
5125
+ * @remarks
5126
+ * Update node value
5127
+ *
5128
+ * @param data
5129
+ * Node to be updated.
5130
+ */
5131
+ updateNode(data: IColorTimelinePropertyItemEntry): void;
5132
+ }
5133
+
5134
+ /**
5135
+ * Properties of color timeline property item entry
5136
+ */
5137
+ export interface IColorTimelinePropertyItemEntry {
5138
+ id: string;
5139
+ time: number;
5140
+ value: minecraftserver.RGBA;
5141
+ }
5142
+
5143
+ /**
5144
+ * Optional properties for Color Timeline property item
5145
+ */
5146
+ // @ts-ignore Class inheritance allowed for native defined classes
5147
+ export interface IColorTimelinePropertyItemOptions extends IPropertyItemOptionsBase {
5148
+ /**
5149
+ * @remarks
5150
+ * Custom precision for the calculations
5151
+ *
5152
+ */
5153
+ decimalPrecision?: number;
5154
+ /**
5155
+ * @remarks
5156
+ * If true, nodes cannot be added or removed
5157
+ *
5158
+ */
5159
+ disableAddRemoveNodes?: boolean;
5160
+ /**
5161
+ * @remarks
5162
+ * List of nodes entries in the color timeline.
5163
+ *
5164
+ */
5165
+ entries?: IColorTimelinePropertyItemEntry[];
5166
+ /**
5167
+ * @remarks
5168
+ * True means nodes cannot be dragged or modified
5169
+ *
5170
+ */
5171
+ isGraphReadOnly?: boolean;
5172
+ /**
5173
+ * @remarks
5174
+ * Callback triggered when a new RGBA node is added to the
5175
+ * timeline.
5176
+ *
5177
+ */
5178
+ onNodeAdded?: (node: IColorTimelinePropertyItemEntry) => void;
5179
+ /**
5180
+ * @remarks
5181
+ * Callback triggered when a timeline node's RGBA value
5182
+ * changes.
5183
+ *
5184
+ */
5185
+ onNodeChanged?: (node: IColorTimelinePropertyItemEntry) => void;
5186
+ /**
5187
+ * @remarks
5188
+ * Callback triggered when an RGBA node is removed from the
5189
+ * timeline. *
5190
+ *
5191
+ */
5192
+ onNodeRemoved?: (node: IColorTimelinePropertyItemEntry) => void;
5193
+ /**
5194
+ * @remarks
5195
+ * This callback is called when UI control time is changed.
5196
+ *
5197
+ */
5198
+ onTimeChanged?: (current: number, prev: number) => void;
5199
+ /**
5200
+ * @remarks
5201
+ * Localized title of the property item
5202
+ *
5203
+ */
5204
+ title?: LocalizedString;
5205
+ }
5206
+
5043
5207
  /**
5044
5208
  * A property item which supports Combo Box properties
5045
5209
  */
@@ -5585,12 +5749,24 @@ export interface IMenuCreationParams {
5585
5749
  *
5586
5750
  */
5587
5751
  enabled?: boolean;
5752
+ /**
5753
+ * @remarks
5754
+ * Whether the menu should have an icon.
5755
+ *
5756
+ */
5757
+ icon?: string;
5588
5758
  /**
5589
5759
  * @remarks
5590
5760
  * Localized display text of the menu
5591
5761
  *
5592
5762
  */
5593
5763
  label: string;
5764
+ /**
5765
+ * @remarks
5766
+ * Whether the menu should have a tooltip.
5767
+ *
5768
+ */
5769
+ tooltip?: string;
5594
5770
  /**
5595
5771
  * @remarks
5596
5772
  * Custom unique identifier that will replace random id
@@ -5884,6 +6060,182 @@ export interface INumberPropertyItemOptions extends IPropertyItemOptionsBase {
5884
6060
  variant?: NumberPropertyItemVariant;
5885
6061
  }
5886
6062
 
6063
+ /**
6064
+ * A property item which supports Number Timeline properties
6065
+ */
6066
+ // @ts-ignore Class inheritance allowed for native defined classes
6067
+ export interface INumberTimelinePropertyItem extends IPropertyItemBase {
6068
+ /**
6069
+ * @remarks
6070
+ * Update color timeline entry
6071
+ *
6072
+ * @param data
6073
+ * New color node.
6074
+ */
6075
+ addNode(data: INumberTimelinePropertyItemEntry): void;
6076
+ /**
6077
+ * @remarks
6078
+ * Get the list of nodes in the property item.
6079
+ *
6080
+ */
6081
+ getData(): INumberTimelinePropertyItemEntry[];
6082
+ /**
6083
+ * @remarks
6084
+ * Get time current time value on the slider.
6085
+ *
6086
+ */
6087
+ getTime(): number;
6088
+ /**
6089
+ * @remarks
6090
+ * Remove color node
6091
+ *
6092
+ * @param data
6093
+ * Node to be removed.
6094
+ */
6095
+ removeNode(data: INumberTimelinePropertyItemEntry): void;
6096
+ /**
6097
+ * @remarks
6098
+ * Updates data entries value bounds.
6099
+ *
6100
+ */
6101
+ setBounds(bounds: { minValue: number; maxValue: number }): void;
6102
+ /**
6103
+ * @remarks
6104
+ * Set separator slice counts for x and y for the minor grid.
6105
+ *
6106
+ * @param counts
6107
+ * Counts for the thin grid lines.
6108
+ */
6109
+ setSeparatorSliceCount(counts: minecraftserver.Vector2): void;
6110
+ /**
6111
+ * @remarks
6112
+ * Set separator step counts for x and y for the major grid.
6113
+ *
6114
+ * @param counts
6115
+ * Counts for the thick grid lines.
6116
+ */
6117
+ setSeparatorStepCount(counts: minecraftserver.Vector2): void;
6118
+ /**
6119
+ * @remarks
6120
+ * Set time line slider value to a new value
6121
+ *
6122
+ * @param time
6123
+ * The new time value.
6124
+ */
6125
+ setTime(time: number): void;
6126
+ /**
6127
+ * @remarks
6128
+ * Updates title of the property item.
6129
+ *
6130
+ * @param title
6131
+ * New title.
6132
+ */
6133
+ setTitle(title: LocalizedString): void;
6134
+ /**
6135
+ * @remarks
6136
+ * Update node value
6137
+ *
6138
+ * @param data
6139
+ * Node to be updated.
6140
+ */
6141
+ updateNode(data: INumberTimelinePropertyItemEntry): void;
6142
+ }
6143
+
6144
+ /**
6145
+ * Properties of the Number timeline property item entry
6146
+ */
6147
+ export interface INumberTimelinePropertyItemEntry {
6148
+ color?: minecraftserver.RGBA;
6149
+ id: string;
6150
+ time: number;
6151
+ value: number;
6152
+ }
6153
+
6154
+ /**
6155
+ * Optional properties for Number Timeline property item
6156
+ */
6157
+ // @ts-ignore Class inheritance allowed for native defined classes
6158
+ export interface INumberTimelinePropertyItemOptions extends IPropertyItemOptionsBase {
6159
+ /**
6160
+ * @remarks
6161
+ * The data bounds for the value node property
6162
+ *
6163
+ */
6164
+ bounds?: {
6165
+ minValue: number;
6166
+ maxValue: number;
6167
+ };
6168
+ /**
6169
+ * @remarks
6170
+ * Custom precision for the calculations
6171
+ *
6172
+ */
6173
+ decimalPrecision?: number;
6174
+ /**
6175
+ * @remarks
6176
+ * If true, nodes cannot be added or removed
6177
+ *
6178
+ */
6179
+ disableAddRemoveNodes?: boolean;
6180
+ /**
6181
+ * @remarks
6182
+ * List of nodes entries in the color timeline.
6183
+ *
6184
+ */
6185
+ entries?: INumberTimelinePropertyItemEntry[];
6186
+ /**
6187
+ * @remarks
6188
+ * The separator slice count for the graph thin lines
6189
+ *
6190
+ */
6191
+ gridSeparatorSliceCount?: minecraftserver.Vector2;
6192
+ /**
6193
+ * @remarks
6194
+ * The separator step counts for the graph bold lines
6195
+ *
6196
+ */
6197
+ gridSeparatorStepCount?: minecraftserver.Vector2;
6198
+ /**
6199
+ * @remarks
6200
+ * True means nodes cannot be dragged or modified
6201
+ *
6202
+ */
6203
+ isGraphReadOnly?: boolean;
6204
+ /**
6205
+ * @remarks
6206
+ * Callback triggered when a new number node is added to the
6207
+ * timeline.
6208
+ *
6209
+ */
6210
+ onNodeAdded?: (node: INumberTimelinePropertyItemEntry) => void;
6211
+ /**
6212
+ * @remarks
6213
+ * Callback triggered when a timeline node's number value
6214
+ * changes.
6215
+ *
6216
+ */
6217
+ onNodeChanged?: (node: INumberTimelinePropertyItemEntry) => void;
6218
+ /**
6219
+ * @remarks
6220
+ * Callback triggered when an number node is removed from the
6221
+ * timeline. *
6222
+ *
6223
+ */
6224
+ onNodeRemoved?: (node: INumberTimelinePropertyItemEntry) => void;
6225
+ /**
6226
+ * @remarks
6227
+ * This callback is called when UI control time is changed.
6228
+ *
6229
+ */
6230
+ onTimeChanged?: (current: number, prev: number) => void;
6231
+ /**
6232
+ * @remarks
6233
+ * Localized title of the property item
6234
+ *
6235
+ */
6236
+ title?: LocalizedString;
6237
+ }
6238
+
5887
6239
  /**
5888
6240
  * Represents a stateful value that can be observed by
5889
6241
  * different objects.
@@ -6166,6 +6518,15 @@ export interface IPropertyPane extends IPane {
6166
6518
  value: IObservableProp<minecraftserver.RGBA>,
6167
6519
  options?: IColorPickerPropertyItemOptions,
6168
6520
  ): IColorPickerPropertyItem;
6521
+ /**
6522
+ * @remarks
6523
+ * Adds a Color Timeline item to the pane.
6524
+ *
6525
+ */
6526
+ addColorTimeline(
6527
+ value: IObservableProp<number>,
6528
+ options?: IColorTimelinePropertyItemOptions,
6529
+ ): IColorTimelinePropertyItem;
6169
6530
  /**
6170
6531
  * @remarks
6171
6532
  * Adds a combo box item to the pane.
@@ -6211,12 +6572,27 @@ export interface IPropertyPane extends IPane {
6211
6572
  *
6212
6573
  */
6213
6574
  addNumber(value: IObservableProp<number>, options?: INumberPropertyItemOptions): INumberPropertyItem;
6575
+ /**
6576
+ * @remarks
6577
+ * Adds a Number Timeline item to the pane.
6578
+ *
6579
+ */
6580
+ addNumberTimeline(
6581
+ value: IObservableProp<number>,
6582
+ options?: INumberTimelinePropertyItemOptions,
6583
+ ): INumberTimelinePropertyItem;
6214
6584
  /**
6215
6585
  * @remarks
6216
6586
  * Adds a Progress Indicator item to the pane.
6217
6587
  *
6218
6588
  */
6219
6589
  addProgressIndicator(options?: IProgressIndicatorPropertyItemOptions): IProgressIndicatorPropertyItem;
6590
+ /**
6591
+ * @remarks
6592
+ * Adds a proxy view of another supported pane
6593
+ *
6594
+ */
6595
+ addProxyPane(paneId: string): void;
6220
6596
  /**
6221
6597
  * @remarks
6222
6598
  * Adds an editable string item to the pane
@@ -6304,12 +6680,25 @@ export interface IPropertyPane extends IPane {
6304
6680
  * pane.
6305
6681
  */
6306
6682
  export interface IPropertyPaneOptions {
6683
+ /**
6684
+ * @remarks
6685
+ * Optional information tooltip for the pane to be displayed on
6686
+ * the header.
6687
+ *
6688
+ */
6689
+ infoTooltip?: TooltipInteractiveContent;
6307
6690
  /**
6308
6691
  * @remarks
6309
6692
  * Localized title of the property pane
6310
6693
  *
6311
6694
  */
6312
6695
  title?: LocalizedString;
6696
+ /**
6697
+ * @remarks
6698
+ * Unique identifier for the pane
6699
+ *
6700
+ */
6701
+ uniqueId?: string;
6313
6702
  }
6314
6703
 
6315
6704
  /**
@@ -6434,13 +6823,6 @@ export interface IRootPropertyPaneOptions extends IPropertyPaneOptions {
6434
6823
  *
6435
6824
  */
6436
6825
  headerAction?: IRootPropertyPaneHeaderAction;
6437
- /**
6438
- * @remarks
6439
- * Optional information tooltip for the pane to be displayed on
6440
- * the header.
6441
- *
6442
- */
6443
- infoTooltip?: TooltipInteractiveContent;
6444
6826
  }
6445
6827
 
6446
6828
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.90-preview.21",
3
+ "version": "0.1.0-beta.1.21.90-preview.25",
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": "^2.1.0-beta.1.21.90-preview.21"
17
+ "@minecraft/server": "^2.1.0-beta.1.21.90-preview.25"
18
18
  },
19
19
  "license": "MIT"
20
20
  }