@minecraft/server-editor 0.1.0-beta.1.21.60-preview.25 → 0.1.0-beta.1.21.60-preview.28

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 +32 -5
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -27,6 +27,7 @@ import * as minecraftserver from '@minecraft/server';
27
27
  * onExecute handler of an action.
28
28
  */
29
29
  export declare enum ActionTypes {
30
+ ContinuousAction = 'ContinuousAction',
30
31
  MouseRayCastAction = 'MouseRayCastAction',
31
32
  NoArgsAction = 'NoArgsAction',
32
33
  StatefulAction = 'StatefulAction',
@@ -94,11 +95,24 @@ export declare enum ComboBoxPropertyItemDataType {
94
95
  Entity = 2,
95
96
  }
96
97
 
98
+ /**
99
+ * Execution state of the continuous action
100
+ */
101
+ export declare enum ContinuousActionState {
102
+ Begin = 0,
103
+ Repeat = 1,
104
+ End = 2,
105
+ }
106
+
97
107
  /**
98
108
  * Predefined action bar items
99
109
  */
100
110
  export declare enum CoreActionBarItemType {
111
+ Export = 'editor:actionBarItem:export',
112
+ Locate = 'editor:actionBarItem:locate',
113
+ Playtest = 'editor:actionBarItem:playtest',
101
114
  Redo = 'editor:actionBarItem:redo',
115
+ Settings = 'editor:actionBarItem:settings',
102
116
  Undo = 'editor:actionBarItem:undo',
103
117
  }
104
118
 
@@ -1103,7 +1117,7 @@ export enum WidgetMouseButtonActionType {
1103
1117
  /**
1104
1118
  * Full set of all possible raw actions
1105
1119
  */
1106
- export type Action = NoArgsAction | MouseRayCastAction | StatefulAction;
1120
+ export type Action = NoArgsAction | MouseRayCastAction | StatefulAction | ContinuousAction;
1107
1121
 
1108
1122
  /**
1109
1123
  * All actions have a unique identifier. Identifiers are
@@ -1123,6 +1137,16 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
1123
1137
  uiSession: IPlayerUISession<PerPlayerStorageType>,
1124
1138
  ) => IDisposable[];
1125
1139
 
1140
+ /**
1141
+ * An action that continues to execute after activation
1142
+ */
1143
+ export type ContinuousAction = {
1144
+ readonly actionType: ActionTypes.ContinuousAction;
1145
+ readonly onExecute: (state: ContinuousActionState, repeatCount: number) => void;
1146
+ repeatDelay?: number;
1147
+ repeatInterval?: number;
1148
+ };
1149
+
1126
1150
  /**
1127
1151
  * A generic handler for an event sink.
1128
1152
  */
@@ -1278,7 +1302,7 @@ export declare type MouseProps = {
1278
1302
  * from the users mouse click in the viewport.
1279
1303
  */
1280
1304
  export type MouseRayCastAction = {
1281
- actionType: ActionTypes.MouseRayCastAction;
1305
+ readonly actionType: ActionTypes.MouseRayCastAction;
1282
1306
  readonly onExecute: (mouseRay: Ray, mouseProps: MouseProps) => void;
1283
1307
  };
1284
1308
 
@@ -1287,7 +1311,7 @@ export type MouseRayCastAction = {
1287
1311
  * execute
1288
1312
  */
1289
1313
  export type NoArgsAction = {
1290
- actionType: ActionTypes.NoArgsAction;
1314
+ readonly actionType: ActionTypes.NoArgsAction;
1291
1315
  readonly onExecute: () => void;
1292
1316
  };
1293
1317
 
@@ -1347,14 +1371,17 @@ export type SpeedSettingsPropertyTypeMap = {
1347
1371
  * An action which returns the activation state.
1348
1372
  */
1349
1373
  export type StatefulAction = {
1350
- actionType: ActionTypes.StatefulAction;
1374
+ readonly actionType: ActionTypes.StatefulAction;
1351
1375
  readonly onExecute: (active: boolean) => void;
1352
1376
  };
1353
1377
 
1354
1378
  /**
1355
1379
  * Full set of all possible keyboard actions
1356
1380
  */
1357
- export type SupportedKeyboardActionTypes = RegisteredAction<NoArgsAction> | RegisteredAction<StatefulAction>;
1381
+ export type SupportedKeyboardActionTypes =
1382
+ | RegisteredAction<NoArgsAction>
1383
+ | RegisteredAction<StatefulAction>
1384
+ | RegisteredAction<ContinuousAction>;
1358
1385
 
1359
1386
  /**
1360
1387
  * Full set of all possible mouse actions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.60-preview.25",
3
+ "version": "0.1.0-beta.1.21.60-preview.28",
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.18.0-beta.1.21.60-preview.25"
17
+ "@minecraft/server": "^1.18.0-beta.1.21.60-preview.28"
18
18
  },
19
19
  "license": "MIT"
20
20
  }