@minecraft/server-editor 0.1.0-beta.1.21.110-preview.23 → 0.1.0-beta.1.21.110-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 +101 -11
  2. package/package.json +3 -2
package/index.d.ts CHANGED
@@ -21,6 +21,8 @@
21
21
  */
22
22
  import * as minecraftcommon from '@minecraft/common';
23
23
  import * as minecraftserver from '@minecraft/server';
24
+ // @ts-ignore Optional types-only package, will decay to any if @minecraft/vanilla-data isn't installed
25
+ import type * as minecraftvanilladata from '@minecraft/vanilla-data';
24
26
  /**
25
27
  * The types of actions that are supported. This type
26
28
  * corresponds to the expected arguments passed by the
@@ -74,8 +76,21 @@ export declare enum BoolPropertyItemVariant {
74
76
  }
75
77
 
76
78
  export enum BrushDirectionalPlacementMode {
77
- Default = 0,
78
- ByCamera = 1,
79
+ IgnoreCamera = 0,
80
+ NormalCamera = 1,
81
+ OppositeCamera = 2,
82
+ CameraLeft = 3,
83
+ CameraRight = 4,
84
+ CameraFromAbove = 5,
85
+ CameraFromBelow = 6,
86
+ FrontFacePosX = 7,
87
+ FrontFaceNegX = 8,
88
+ FrontFacePosZ = 9,
89
+ FrontFaceNegZ = 10,
90
+ FrontFacePosY = 11,
91
+ FrontFaceNegY = 12,
92
+ Random2Axes = 13,
93
+ Random3Axes = 14,
79
94
  }
80
95
 
81
96
  /**
@@ -279,6 +294,12 @@ export enum ExportResult {
279
294
  EditorSystemFailure = 7,
280
295
  }
281
296
 
297
+ export enum FlattenMode {
298
+ Both = 0,
299
+ Down = 1,
300
+ Up = 2,
301
+ }
302
+
282
303
  export enum GamePublishSetting {
283
304
  NoMultiPlay = 0,
284
305
  InviteOnly = 1,
@@ -1844,6 +1865,12 @@ export class BrushShapeManager {
1844
1865
  * @throws This function can throw errors.
1845
1866
  */
1846
1867
  beginPainting(onComplete: (arg0: PaintCompletionState) => void): void;
1868
+ /**
1869
+ * @remarks
1870
+ * This function can't be called in read-only mode.
1871
+ *
1872
+ */
1873
+ clearBlockStateOverrides(): void;
1847
1874
  /**
1848
1875
  * @remarks
1849
1876
  * This function can't be called in read-only mode.
@@ -1893,6 +1920,21 @@ export class BrushShapeManager {
1893
1920
  *
1894
1921
  */
1895
1922
  isBrushPaintBusy(): boolean;
1923
+ /**
1924
+ * @remarks
1925
+ * This function can't be called in read-only mode.
1926
+ *
1927
+ */
1928
+ pushBlockStateOverride<T extends keyof minecraftvanilladata.BlockStateSuperset>(
1929
+ blockStateName: T,
1930
+ blockStateValue: minecraftvanilladata.BlockStateSuperset[T],
1931
+ ): void;
1932
+ /**
1933
+ * @remarks
1934
+ * This function can't be called in read-only mode.
1935
+ *
1936
+ */
1937
+ setBlockFacePlacementBasedOnCamera(enabled: boolean): void;
1896
1938
  /**
1897
1939
  * @remarks
1898
1940
  * This function can't be called in read-only mode.
@@ -1929,13 +1971,19 @@ export class BrushShapeManager {
1929
1971
  * This function can't be called in read-only mode.
1930
1972
  *
1931
1973
  */
1932
- setFlattenHeight(flattenHeight: number): void;
1974
+ setFlattenMode(flattenMode: FlattenMode): void;
1975
+ /**
1976
+ * @remarks
1977
+ * This function can't be called in read-only mode.
1978
+ *
1979
+ */
1980
+ setFlattenSmoothing(flattenSmoothing: number): void;
1933
1981
  /**
1934
1982
  * @remarks
1935
1983
  * This function can't be called in read-only mode.
1936
1984
  *
1937
1985
  */
1938
- setFlattenRadius(flattenRadius: number): void;
1986
+ setFloorBlockOverride(floorBlockOverride: boolean): void;
1939
1987
  /**
1940
1988
  * @remarks
1941
1989
  * This function can't be called in read-only mode.
@@ -2003,6 +2051,8 @@ export class ClipboardItem {
2003
2051
  *
2004
2052
  */
2005
2053
  readonly isEmpty: boolean;
2054
+ readonly normalizedOrigin: minecraftserver.Vector3;
2055
+ readonly originalWorldLocation: minecraftserver.Vector3;
2006
2056
  readonly size: minecraftserver.Vector3;
2007
2057
  /**
2008
2058
  * @remarks
@@ -2013,13 +2063,6 @@ export class ClipboardItem {
2013
2063
  * @throws This function can throw errors.
2014
2064
  */
2015
2065
  clear(): void;
2016
- /**
2017
- * @remarks
2018
- * Get the normalized origin of a ClipboardItem; a Vector3 from
2019
- * { -1, -1, -1 } to { 1, 1, 1 }
2020
- *
2021
- */
2022
- getNormalizedOrigin(): minecraftserver.Vector3;
2023
2066
  /**
2024
2067
  * @remarks
2025
2068
  * This function can't be called in read-only mode.
@@ -2357,6 +2400,11 @@ export class CursorPropertyChangeAfterEventSignal {
2357
2400
 
2358
2401
  // @ts-ignore Class inheritance allowed for native defined classes
2359
2402
  export declare class CylinderBrushShape extends BrushShape {
2403
+ get depth(): number;
2404
+ get height(): number;
2405
+ get radius(): number;
2406
+ get uniform(): boolean;
2407
+ get width(): number;
2360
2408
  /**
2361
2409
  * @remarks
2362
2410
  * Constructs a new instance of the `CylinderBrushShape` class
@@ -2372,6 +2420,7 @@ export declare class CylinderBrushShape extends BrushShape {
2372
2420
  xRotation?: number;
2373
2421
  yRotation?: number;
2374
2422
  zRotation?: number;
2423
+ hideRotation?: boolean;
2375
2424
  });
2376
2425
  createSettingsPane(parentPane: IPropertyPane, onSettingsChange?: () => void): ISubPanePropertyItem;
2377
2426
  createShape(): RelativeVolumeListBlockVolume;
@@ -2898,6 +2947,12 @@ export class Logger {
2898
2947
  */
2899
2948
  export class MinecraftEditor {
2900
2949
  private constructor();
2950
+ /**
2951
+ * @remarks
2952
+ * This property can be read in early-execution mode.
2953
+ *
2954
+ */
2955
+ readonly afterEvents: ProjectAfterEvents;
2901
2956
  readonly constants: EditorConstants;
2902
2957
  /**
2903
2958
  * @remarks
@@ -3042,6 +3097,16 @@ export class ProbabilityBlockPaletteItem extends IBlockPaletteItem {
3042
3097
  removeBlockAt(index: number): void;
3043
3098
  }
3044
3099
 
3100
+ export class ProjectAfterEvents {
3101
+ private constructor();
3102
+ /**
3103
+ * @remarks
3104
+ * This property can be read in early-execution mode.
3105
+ *
3106
+ */
3107
+ readonly simulationStateChange: SimulationStateChangeAfterEventSignal;
3108
+ }
3109
+
3045
3110
  // @ts-ignore Class inheritance allowed for native defined classes
3046
3111
  export declare class PyramidBrushShape extends BrushShape {
3047
3112
  /**
@@ -3308,6 +3373,31 @@ export class SimulationState {
3308
3373
  setPaused(isPaused: boolean): void;
3309
3374
  }
3310
3375
 
3376
+ export class SimulationStateAfterEvent {
3377
+ private constructor();
3378
+ readonly paused: boolean;
3379
+ }
3380
+
3381
+ export class SimulationStateChangeAfterEventSignal {
3382
+ private constructor();
3383
+ /**
3384
+ * @remarks
3385
+ * This function can't be called in read-only mode.
3386
+ *
3387
+ * This function can be called in early-execution mode.
3388
+ *
3389
+ */
3390
+ subscribe(callback: (arg0: SimulationStateAfterEvent) => void): (arg0: SimulationStateAfterEvent) => void;
3391
+ /**
3392
+ * @remarks
3393
+ * This function can't be called in read-only mode.
3394
+ *
3395
+ * This function can be called in early-execution mode.
3396
+ *
3397
+ */
3398
+ unsubscribe(callback: (arg0: SimulationStateAfterEvent) => void): void;
3399
+ }
3400
+
3311
3401
  // @ts-ignore Class inheritance allowed for native defined classes
3312
3402
  export declare class SingleBlockBrushShape extends BrushShape {
3313
3403
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.110-preview.23",
3
+ "version": "0.1.0-beta.1.21.110-preview.25",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,8 @@
14
14
  ],
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^2.3.0-beta.1.21.110-preview.23"
17
+ "@minecraft/server": "^2.3.0-beta.1.21.110-preview.25",
18
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.21.110-preview.25"
18
19
  },
19
20
  "license": "MIT"
20
21
  }