@minecraft/server-editor 0.1.0-beta.1.21.10-preview.21 → 0.1.0-beta.1.21.10-preview.23

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 +56 -2
  2. package/package.json +2 -2
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.21.10-preview.21"
17
+ * "version": "0.1.0-beta.1.21.10-preview.23"
18
18
  * }
19
19
  * ```
20
20
  *
@@ -36,6 +36,11 @@ export enum BlockPaletteItemType {
36
36
  Probability = 1,
37
37
  }
38
38
 
39
+ export enum BrushPipelineOperationType {
40
+ Include = 0,
41
+ Exclude = 1,
42
+ }
43
+
39
44
  /**
40
45
  * Predefined action bar items
41
46
  */
@@ -709,17 +714,52 @@ export class BlockPalette {
709
714
 
710
715
  export class BlockPaletteManager {
711
716
  private constructor();
717
+ /**
718
+ * @remarks
719
+ * This function can't be called in read-only mode.
720
+ *
721
+ */
722
+ addOrReplacePalette(paletteId: string, palette: BlockPalette): void;
723
+ getPalette(paletteId: string): BlockPalette | undefined;
724
+ getPaletteIdList(): string[];
725
+ /**
726
+ * @throws This function can throw errors.
727
+ */
728
+ getPaletteItem(paletteId: string, index: number): IBlockPaletteItem;
729
+ getPrimaryPalette(): BlockPalette;
712
730
  /**
713
731
  * @throws This function can throw errors.
714
732
  */
715
733
  getSelectedBlockType(): minecraftserver.BlockType;
734
+ getSelectedItem(): IBlockPaletteItem;
716
735
  /**
717
736
  * @remarks
718
737
  * This function can't be called in read-only mode.
719
738
  *
720
739
  * @throws This function can throw errors.
721
740
  */
722
- setSelectedBlockType(block: minecraftserver.BlockType): void;
741
+ removePalette(paletteId: string): void;
742
+ /**
743
+ * @remarks
744
+ * This function can't be called in read-only mode.
745
+ *
746
+ * @throws This function can throw errors.
747
+ */
748
+ setPaletteItem(paletteId: string, index: number, item: IBlockPaletteItem): void;
749
+ /**
750
+ * @remarks
751
+ * This function can't be called in read-only mode.
752
+ *
753
+ * @throws This function can throw errors.
754
+ */
755
+ setPrimaryPalette(paletteId: string): void;
756
+ /**
757
+ * @remarks
758
+ * This function can't be called in read-only mode.
759
+ *
760
+ * @throws This function can throw errors.
761
+ */
762
+ setSelectedItem(item: IBlockPaletteItem): void;
723
763
  }
724
764
 
725
765
  export class BrushShapeManager {
@@ -734,6 +774,15 @@ export class BrushShapeManager {
734
774
  * @throws This function can throw errors.
735
775
  */
736
776
  activateBrushShape(name: string): minecraftserver.CompoundBlockVolume;
777
+ /**
778
+ * @remarks
779
+ * This function can't be called in read-only mode.
780
+ *
781
+ */
782
+ getBrushVolume(
783
+ origin: minecraftserver.Vector3,
784
+ pipeline: BrushPipelineOperation[],
785
+ ): minecraftserver.CompoundBlockVolume | undefined;
737
786
  /**
738
787
  * @remarks
739
788
  * This function can't be called in read-only mode.
@@ -2347,6 +2396,11 @@ export class WidgetStateChangeEventData {
2347
2396
  readonly widget: Widget;
2348
2397
  }
2349
2398
 
2399
+ export interface BrushPipelineOperation {
2400
+ blockTypes: minecraftserver.BlockType[];
2401
+ operation: BrushPipelineOperationType;
2402
+ }
2403
+
2350
2404
  export interface BrushShape {
2351
2405
  icon: string;
2352
2406
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.10-preview.21",
3
+ "version": "0.1.0-beta.1.21.10-preview.23",
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.13.0-beta.1.21.10-preview.21"
17
+ "@minecraft/server": "^1.13.0-beta.1.21.10-preview.23"
18
18
  },
19
19
  "license": "MIT"
20
20
  }