@minecraft/debug-utilities 1.0.0-beta.1.21.95-stable → 1.0.0-beta.1.26.0-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.
- package/index.d.ts +39 -15
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -46,7 +46,10 @@ export class DebugArrow extends DebugLine {
|
|
|
46
46
|
*
|
|
47
47
|
*/
|
|
48
48
|
headSegments: number;
|
|
49
|
-
constructor(
|
|
49
|
+
constructor(
|
|
50
|
+
location: minecraftserver.DimensionLocation | minecraftserver.Vector3,
|
|
51
|
+
endLocation: minecraftserver.Vector3,
|
|
52
|
+
);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
/**
|
|
@@ -61,7 +64,7 @@ export class DebugBox extends DebugShape {
|
|
|
61
64
|
*
|
|
62
65
|
*/
|
|
63
66
|
bound: minecraftserver.Vector3;
|
|
64
|
-
constructor(location: minecraftserver.Vector3);
|
|
67
|
+
constructor(location: minecraftserver.DimensionLocation | minecraftserver.Vector3);
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
/**
|
|
@@ -69,7 +72,7 @@ export class DebugBox extends DebugShape {
|
|
|
69
72
|
*/
|
|
70
73
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
71
74
|
export class DebugCircle extends DebugShape {
|
|
72
|
-
constructor(location: minecraftserver.Vector3);
|
|
75
|
+
constructor(location: minecraftserver.DimensionLocation | minecraftserver.Vector3);
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
/**
|
|
@@ -87,7 +90,7 @@ export class DebugDrawer {
|
|
|
87
90
|
* DebugLine, DebugCircle, DebugSphere, DebugArrow or
|
|
88
91
|
* DebugText.
|
|
89
92
|
*/
|
|
90
|
-
addShape(shape: DebugShape): void;
|
|
93
|
+
addShape(shape: DebugShape, dimension?: minecraftserver.Dimension): void;
|
|
91
94
|
/**
|
|
92
95
|
* @remarks
|
|
93
96
|
* Removes all debug shapes from the world.
|
|
@@ -115,7 +118,10 @@ export class DebugLine extends DebugShape {
|
|
|
115
118
|
*
|
|
116
119
|
*/
|
|
117
120
|
endLocation: minecraftserver.Vector3;
|
|
118
|
-
constructor(
|
|
121
|
+
constructor(
|
|
122
|
+
location: minecraftserver.DimensionLocation | minecraftserver.Vector3,
|
|
123
|
+
endLocation: minecraftserver.Vector3,
|
|
124
|
+
);
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
/**
|
|
@@ -130,6 +136,13 @@ export class DebugShape {
|
|
|
130
136
|
*
|
|
131
137
|
*/
|
|
132
138
|
color: minecraftserver.RGB;
|
|
139
|
+
/**
|
|
140
|
+
* @remarks
|
|
141
|
+
* The dimension the shape is visible within. If the dimension
|
|
142
|
+
* is undefined, it will display in all dimensions.
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
readonly dimension: minecraftserver.Dimension;
|
|
133
146
|
/**
|
|
134
147
|
* @remarks
|
|
135
148
|
* Returns true if the shape has a limited time span before
|
|
@@ -139,12 +152,12 @@ export class DebugShape {
|
|
|
139
152
|
readonly hasDuration: boolean;
|
|
140
153
|
/**
|
|
141
154
|
* @remarks
|
|
142
|
-
* The location of the shape. For most shapes
|
|
143
|
-
* centre of the shape, except DebugLine and DebugArrow
|
|
144
|
-
* this represents the start point of the line.
|
|
155
|
+
* The location of the shape. For most shapes the location is
|
|
156
|
+
* the centre of the shape, except DebugLine and DebugArrow
|
|
157
|
+
* where this represents the start point of the line.
|
|
145
158
|
*
|
|
146
159
|
*/
|
|
147
|
-
location: minecraftserver.Vector3;
|
|
160
|
+
readonly location: minecraftserver.Vector3;
|
|
148
161
|
/**
|
|
149
162
|
* @remarks
|
|
150
163
|
* The rotation of the shape (Euler angles - [Pitch, Yaw,
|
|
@@ -162,16 +175,16 @@ export class DebugShape {
|
|
|
162
175
|
/**
|
|
163
176
|
* @remarks
|
|
164
177
|
* The time left (in seconds) until this shape is automatically
|
|
165
|
-
* removed. Returns
|
|
166
|
-
* life-span.
|
|
178
|
+
* removed. Returns undefined if the shape does not have a
|
|
179
|
+
* limited life-span.
|
|
167
180
|
*
|
|
168
181
|
*/
|
|
169
182
|
timeLeft?: number;
|
|
170
183
|
/**
|
|
171
184
|
* @remarks
|
|
172
185
|
* The total initial time-span (in seconds) until this shape is
|
|
173
|
-
* automatically removed. Returns
|
|
174
|
-
* a limited life-span.
|
|
186
|
+
* automatically removed. Returns undefined if the shape does
|
|
187
|
+
* not have a limited life-span.
|
|
175
188
|
*
|
|
176
189
|
*/
|
|
177
190
|
readonly totalTimeLeft?: number;
|
|
@@ -182,6 +195,16 @@ export class DebugShape {
|
|
|
182
195
|
*
|
|
183
196
|
*/
|
|
184
197
|
remove(): void;
|
|
198
|
+
/**
|
|
199
|
+
* @remarks
|
|
200
|
+
* Set the location and dimension of the shape. If the
|
|
201
|
+
* dimension is undefined, it will display in all dimensions.
|
|
202
|
+
* For most shapes the location is the centre of the shape,
|
|
203
|
+
* except DebugLine and DebugArrow where this represents the
|
|
204
|
+
* start point of the line.
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
setLocation(location: minecraftserver.DimensionLocation | minecraftserver.Vector3): void;
|
|
185
208
|
}
|
|
186
209
|
|
|
187
210
|
/**
|
|
@@ -189,7 +212,7 @@ export class DebugShape {
|
|
|
189
212
|
*/
|
|
190
213
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
191
214
|
export class DebugSphere extends DebugShape {
|
|
192
|
-
constructor(location: minecraftserver.Vector3);
|
|
215
|
+
constructor(location: minecraftserver.DimensionLocation | minecraftserver.Vector3);
|
|
193
216
|
}
|
|
194
217
|
|
|
195
218
|
/**
|
|
@@ -204,7 +227,7 @@ export class DebugText extends DebugShape {
|
|
|
204
227
|
*
|
|
205
228
|
*/
|
|
206
229
|
text: string;
|
|
207
|
-
constructor(location: minecraftserver.Vector3, text: string);
|
|
230
|
+
constructor(location: minecraftserver.DimensionLocation | minecraftserver.Vector3, text: string);
|
|
208
231
|
}
|
|
209
232
|
|
|
210
233
|
export interface HandleCounts {
|
|
@@ -229,6 +252,7 @@ export interface RuntimeStats {
|
|
|
229
252
|
functionLineCount: number;
|
|
230
253
|
functionSize: number;
|
|
231
254
|
memoryAllocatedCount: number;
|
|
255
|
+
memoryAllocatedLimit: number;
|
|
232
256
|
memoryAllocatedSize: number;
|
|
233
257
|
memoryUsedCount: number;
|
|
234
258
|
memoryUsedSize: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/debug-utilities",
|
|
3
|
-
"version": "1.0.0-beta.1.
|
|
3
|
+
"version": "1.0.0-beta.1.26.0-preview.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"email": "mikeam@microsoft.com"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
-
"
|
|
15
|
+
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
17
|
"@minecraft/server": "^1.17.0 || ^2.0.0"
|
|
18
18
|
},
|