@minecraft/server-editor 0.1.0-beta.1.20.50-preview.21 → 0.1.0-beta.1.20.50-preview.22
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.
- package/index.d.ts +143 -1
- package/package.json +3 -3
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.50-preview.
|
|
17
|
+
* "version": "0.1.0-beta.1.20.50-preview.22"
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -185,8 +185,22 @@ export declare enum EditorInputContext {
|
|
|
185
185
|
Viewport = 'local.toolMode.viewport',
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Enumeration representing the different modes Editor can be
|
|
190
|
+
* in.
|
|
191
|
+
*/
|
|
188
192
|
export enum EditorMode {
|
|
193
|
+
/**
|
|
194
|
+
* @remarks
|
|
195
|
+
* Mode for single-block editing.
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
189
198
|
Crosshair = 'Crosshair',
|
|
199
|
+
/**
|
|
200
|
+
* @remarks
|
|
201
|
+
* Mode for multi-block editing UI and tools.
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
190
204
|
Tool = 'Tool',
|
|
191
205
|
}
|
|
192
206
|
|
|
@@ -195,6 +209,20 @@ export declare enum EditorStatusBarAlignment {
|
|
|
195
209
|
Left = 1,
|
|
196
210
|
}
|
|
197
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Enumeration representing identifiers for graphics settings
|
|
214
|
+
* properties.
|
|
215
|
+
*/
|
|
216
|
+
export enum GraphicsSettingsProperty {
|
|
217
|
+
/**
|
|
218
|
+
* @remarks
|
|
219
|
+
* Manages rendering of invisible blocks (e.g., barrier, light,
|
|
220
|
+
* structure_void).
|
|
221
|
+
*
|
|
222
|
+
*/
|
|
223
|
+
ShowInvisibleBlocks = 'ShowInvisibleBlocks',
|
|
224
|
+
}
|
|
225
|
+
|
|
198
226
|
/**
|
|
199
227
|
* Input modifier flags to create chorded bindings
|
|
200
228
|
*/
|
|
@@ -385,6 +413,13 @@ export enum PlaytestSessionResult {
|
|
|
385
413
|
UnspecifiedError = 11,
|
|
386
414
|
}
|
|
387
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Defines type information for graphics settings properties.
|
|
418
|
+
*/
|
|
419
|
+
export type GraphicsSettingsPropertyTypeMap = {
|
|
420
|
+
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
|
421
|
+
};
|
|
422
|
+
|
|
388
423
|
/**
|
|
389
424
|
* Full set of all possible raw actions
|
|
390
425
|
*/
|
|
@@ -940,6 +975,13 @@ export class Extension {
|
|
|
940
975
|
*/
|
|
941
976
|
export class ExtensionContext {
|
|
942
977
|
private constructor();
|
|
978
|
+
/**
|
|
979
|
+
* @remarks
|
|
980
|
+
* Contains a set of events that are applicable to the editor
|
|
981
|
+
* player. Event callbacks are called in a deferred manner.
|
|
982
|
+
* Event callbacks are executed in read-write mode.
|
|
983
|
+
*
|
|
984
|
+
*/
|
|
943
985
|
readonly afterEvents: ExtensionContextAfterEvents;
|
|
944
986
|
/**
|
|
945
987
|
* @remarks
|
|
@@ -979,6 +1021,14 @@ export class ExtensionContext {
|
|
|
979
1021
|
*
|
|
980
1022
|
*/
|
|
981
1023
|
readonly selectionManager: SelectionManager;
|
|
1024
|
+
/**
|
|
1025
|
+
* @remarks
|
|
1026
|
+
* The instance of the players Settings Manager and the
|
|
1027
|
+
* contract through which the settings for the player can be
|
|
1028
|
+
* modified.
|
|
1029
|
+
*
|
|
1030
|
+
*/
|
|
1031
|
+
readonly settings: SettingsManager;
|
|
982
1032
|
/**
|
|
983
1033
|
* @remarks
|
|
984
1034
|
* The instance of the players Transaction Manager and the main
|
|
@@ -989,11 +1039,69 @@ export class ExtensionContext {
|
|
|
989
1039
|
readonly transactionManager: TransactionManager;
|
|
990
1040
|
}
|
|
991
1041
|
|
|
1042
|
+
/**
|
|
1043
|
+
* Contains a set of events that are available across the scope
|
|
1044
|
+
* of the ExtensionContext.
|
|
1045
|
+
*/
|
|
992
1046
|
export class ExtensionContextAfterEvents {
|
|
993
1047
|
private constructor();
|
|
1048
|
+
/**
|
|
1049
|
+
* @remarks
|
|
1050
|
+
* This event triggers when the editor mode changes for the
|
|
1051
|
+
* player.
|
|
1052
|
+
*
|
|
1053
|
+
*/
|
|
994
1054
|
readonly modeChange: ModeChangeAfterEventSignal;
|
|
995
1055
|
}
|
|
996
1056
|
|
|
1057
|
+
/**
|
|
1058
|
+
* Settings category that manages {@link
|
|
1059
|
+
* GraphicsSettingsProperty} configurations.
|
|
1060
|
+
*/
|
|
1061
|
+
export class GraphicsSettings {
|
|
1062
|
+
private constructor();
|
|
1063
|
+
/**
|
|
1064
|
+
* @remarks
|
|
1065
|
+
* Retrieves a graphics settings property value.
|
|
1066
|
+
*
|
|
1067
|
+
* @param property
|
|
1068
|
+
* Property identifier.
|
|
1069
|
+
* @returns
|
|
1070
|
+
* Returns the property value if it is found. If the property
|
|
1071
|
+
* is not available, it returns undefined.
|
|
1072
|
+
*/
|
|
1073
|
+
get<T extends keyof GraphicsSettingsPropertyTypeMap>(property: T): GraphicsSettingsPropertyTypeMap[T] | undefined;
|
|
1074
|
+
/**
|
|
1075
|
+
* @remarks
|
|
1076
|
+
* Retrieves all graphics settings properties and their values.
|
|
1077
|
+
*
|
|
1078
|
+
* @returns
|
|
1079
|
+
* Returns a property value map for all available properties.
|
|
1080
|
+
*/
|
|
1081
|
+
getAll(): GraphicsSettingsPropertyTypeMap;
|
|
1082
|
+
/**
|
|
1083
|
+
* @remarks
|
|
1084
|
+
* Modifies a graphics settings property value.
|
|
1085
|
+
*
|
|
1086
|
+
* @param property
|
|
1087
|
+
* Property identifier.
|
|
1088
|
+
* @param value
|
|
1089
|
+
* New property value.
|
|
1090
|
+
* @throws This function can throw errors.
|
|
1091
|
+
*/
|
|
1092
|
+
set<T extends keyof GraphicsSettingsPropertyTypeMap>(property: T, value: GraphicsSettingsPropertyTypeMap[T]): void;
|
|
1093
|
+
/**
|
|
1094
|
+
* @remarks
|
|
1095
|
+
* Modify multiple graphics settings properties.
|
|
1096
|
+
*
|
|
1097
|
+
* @param properties
|
|
1098
|
+
* Property map to set available property values. If the
|
|
1099
|
+
* property is not defined in the map, it will not be modified.
|
|
1100
|
+
* @throws This function can throw errors.
|
|
1101
|
+
*/
|
|
1102
|
+
setAll(properties: GraphicsSettingsPropertyTypeMap): void;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
997
1105
|
/**
|
|
998
1106
|
* The logger class is a utility class which allows editor
|
|
999
1107
|
* extensions to communicate with the player from the server to
|
|
@@ -1117,21 +1225,40 @@ export class MinecraftEditor {
|
|
|
1117
1225
|
): Extension;
|
|
1118
1226
|
}
|
|
1119
1227
|
|
|
1228
|
+
/**
|
|
1229
|
+
* Contains information related to changes in player editor
|
|
1230
|
+
* mode.
|
|
1231
|
+
*/
|
|
1120
1232
|
export class ModeChangeAfterEvent {
|
|
1121
1233
|
private constructor();
|
|
1234
|
+
/**
|
|
1235
|
+
* @remarks
|
|
1236
|
+
* The editor mode that the player is changed to.
|
|
1237
|
+
*
|
|
1238
|
+
*/
|
|
1122
1239
|
readonly mode: EditorMode;
|
|
1123
1240
|
}
|
|
1124
1241
|
|
|
1242
|
+
/**
|
|
1243
|
+
* Manages callbacks that are connected to when a player editor
|
|
1244
|
+
* mode changes.
|
|
1245
|
+
*/
|
|
1125
1246
|
export class ModeChangeAfterEventSignal {
|
|
1126
1247
|
private constructor();
|
|
1127
1248
|
/**
|
|
1128
1249
|
* @remarks
|
|
1250
|
+
* Subscribes the specified callback to an editor mode change
|
|
1251
|
+
* after event.
|
|
1252
|
+
*
|
|
1129
1253
|
* This function can't be called in read-only mode.
|
|
1130
1254
|
*
|
|
1131
1255
|
*/
|
|
1132
1256
|
subscribe(callback: (arg: ModeChangeAfterEvent) => void): (arg: ModeChangeAfterEvent) => void;
|
|
1133
1257
|
/**
|
|
1134
1258
|
* @remarks
|
|
1259
|
+
* Removes the specified callback from an editor mode change
|
|
1260
|
+
* after event.
|
|
1261
|
+
*
|
|
1135
1262
|
* This function can't be called in read-only mode.
|
|
1136
1263
|
*
|
|
1137
1264
|
* @throws This function can throw errors.
|
|
@@ -1399,6 +1526,21 @@ export class SelectionManager {
|
|
|
1399
1526
|
create(): Selection;
|
|
1400
1527
|
}
|
|
1401
1528
|
|
|
1529
|
+
/**
|
|
1530
|
+
* The SettingsManager (accessible from the {@link
|
|
1531
|
+
* ExtensionContext}) is responsible for the management all
|
|
1532
|
+
* player settings.
|
|
1533
|
+
*/
|
|
1534
|
+
export class SettingsManager {
|
|
1535
|
+
private constructor();
|
|
1536
|
+
/**
|
|
1537
|
+
* @remarks
|
|
1538
|
+
* Manages graphics settings properties.
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
readonly graphics: GraphicsSettings;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1402
1544
|
/**
|
|
1403
1545
|
* The Transaction Manager is responsible for tracking and
|
|
1404
1546
|
* managing all of the registered transaction operations which
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.20.50-preview.
|
|
3
|
+
"version": "0.1.0-beta.1.20.50-preview.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@minecraft/common": "^1.0.0-rc.1.20.50-preview.
|
|
17
|
-
"@minecraft/server": "^1.8.0-beta.1.20.50-preview.
|
|
16
|
+
"@minecraft/common": "^1.0.0-rc.1.20.50-preview.22",
|
|
17
|
+
"@minecraft/server": "^1.8.0-beta.1.20.50-preview.22"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|