Skip to content

Commit a98efe3

Browse files
committed
0.3.3
1 parent 67a9e3c commit a98efe3

File tree

2 files changed

+23
-70
lines changed

2 files changed

+23
-70
lines changed

lib/@minecraft/server-editor-bindings/index.d.ts

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,7 @@
88
* }
99
* ```
1010
*/
11-
import { Color, Player, Vector3 } from "@minecraft/server";
12-
export class BlockVolume {
13-
constructor(a: Vector3, b: Vector3);
14-
contains(other: Vector3): boolean;
15-
offset(other: Vector3): BlockVolume;
16-
intersects(other: BlockVolume): number;
17-
getBlockPositionIterator(): BlockVolumeIterator;
18-
equals(other: BlockVolume): boolean;
19-
boundingBox: BoundingBox;
20-
min: Vector3;
21-
max: Vector3;
22-
volume: number;
23-
}
24-
export enum BlockVolumeIntersection {
25-
disjoint = 0,
26-
contains = 1,
27-
intersects = 2,
28-
}
29-
export class BlockVolumeIterator implements Iterable<BlockVolume> {
30-
protected constructor();
31-
[Symbol.iterator](): Iterator<BlockVolume>;
32-
}
33-
export class BoundingBox {
34-
constructor(
35-
minX: number,
36-
minY: number,
37-
minZ: number,
38-
maxX: number,
39-
maxY: number,
40-
maxZ: number
41-
);
42-
equals(other: BoundingBox): boolean;
43-
fromBlockLocation(a: Vector3, b: Vector3): BoundingBox;
44-
intersects(other: BoundingBox): number;
45-
expand(other: BoundingBox): BoundingBox;
46-
dilate(x: number, y: number, z: number): BoundingBox;
47-
offset(other: Vector3): BoundingBox;
48-
contains(other: Vector3): boolean;
49-
min: Vector3;
50-
max: Vector3;
51-
center: Vector3;
52-
spanX: number;
53-
spanY: number;
54-
spanZ: number;
55-
}
11+
import { BlockLocationIterator, Color, CompoundBlockVolumeAction, Player, Vector3 } from "@minecraft/server";
5612
export class ClipboardItem {
5713
protected constructor();
5814
readFromSelection(selection: Selection): void;
@@ -87,13 +43,13 @@ export class ClipboardWriteOptions {
8743
rotation: ClipboardRotation;
8844
}
8945
export class Cursor {
90-
getState(): CursorState;
91-
setState(state: CursorState): void;
46+
getProperties(): Record<string, any>;
47+
setProperties(properties: Record<string, any>): void;
48+
getPosition(): Vector3;
9249
moveBy(vector: Vector3): void;
9350
resetToDefaultState(): void;
9451
show(): void;
9552
hide(): void;
96-
position: Vector3;
9753
faceDirection: number;
9854
isVisible: boolean;
9955
}
@@ -103,24 +59,16 @@ export enum CursorControlMode {
10359
KeyboardAndMouse = 2,
10460
Fixed = 3,
10561
}
106-
export class CursorState {
107-
color: Color;
108-
controlMode: CursorControlMode;
109-
targetMode: CursorTargetMode;
110-
visible: boolean;
111-
fixedModeDistance: number;
112-
}
11362
export enum CursorTargetMode {
11463
Block = 0,
11564
Face = 1,
11665
}
11766
export class Extension {
11867
protected constructor();
119-
description: string;
120-
notes: string;
12168
}
12269
export class ExtensionContext {
12370
protected constructor();
71+
extensionName: string;
12472
player: Player;
12573
selectionManager: SelectionManager;
12674
transactionManager: TransactionManager;
@@ -135,29 +83,32 @@ export class MinecraftEditor {
13583
shutdownFunction: (context: ExtensionContext) => void
13684
): Extension;
13785
}
86+
export interface PushVolumeOptions {
87+
action: CompoundBlockVolumeAction,
88+
volume: {
89+
from: Vector3,
90+
to: Vector3
91+
}
92+
}
13893
export class Selection {
13994
protected constructor();
14095
clear(): void;
141-
pushVolume(action: SelectionBlockVolumeAction, volume: BlockVolume): any;
96+
pushVolume(options: PushVolumeOptions): void;
14297
popVolume(): void;
14398
copyFrom(selection: Selection): void;
144-
getBlockPositionIterator(): BlockVolumeIterator;
99+
getBlockLocationIterator(): BlockLocationIterator;
145100
moveBy(vector: Vector3): void;
146101
moveTo(vector: Vector3): void;
147-
peekLastVolume: BlockVolume;
148-
boundingBox: BoundingBox;
102+
getFillColor(): Color;
103+
getOutlineColor(): Color;
104+
setFillColor(): Color;
105+
setOutlineColor(): Color;
149106
isEmpty: boolean;
150107
visible: boolean;
151-
fillColor: Color;
152-
borderColor: Color;
153-
}
154-
export enum SelectionBlockVolumeAction {
155-
add = 0,
156-
subtract = 1,
157108
}
158109
export class SelectionManager {
159110
protected constructor();
160-
createSelection(): Selection;
111+
create(): Selection;
161112
selection: Selection;
162113
}
163114
export class TransactionManager {
@@ -175,5 +126,4 @@ export class TransactionManager {
175126
commitOpenTransaction(): void;
176127
discardOpenTransaction(): void;
177128
}
178-
export const editor: MinecraftEditor;
179-
export const ExtensionOptionalParameters: undefined
129+
export const editor: MinecraftEditor;

lib/@minecraft/server-editor/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,3 +713,6 @@ export interface IPropertyItem extends PropertyItem { }
713713
* Interface for internal Menu class
714714
*/
715715
export interface IMenu extends Menu { }
716+
717+
export const ExtensionOptionalParameters: undefined;
718+
export const CursorProperties: undefined;

0 commit comments

Comments
 (0)