Skip to content

Commit 8308d0c

Browse files
committed
add stuff
1 parent 6a29a78 commit 8308d0c

7 files changed

Lines changed: 402 additions & 22 deletions

File tree

docs/JavaScript/ErrorReference.md

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
# JavaScript error reference
2+
3+
These errors can be a helpful debugging your code, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. This includes native implemented JavaScript errors by Minecraft.
4+
5+
<!--
6+
These strings are dumped from quickjs.c (https://github.com/bellard/quickjs/blob/master/quickjs.c)
7+
then they're verified in Minecraft by checking if the string exist in the game executable.
8+
-->
9+
10+
### InternalError: string too long
11+
12+
### InternalError: out of memory
13+
14+
- This error occurs when the combined memory usage exceeds 250 megabytes.
15+
- This saves and shuts down the world by Watchdog termination and cannot be canceled using `BeforeWatchdogTerminateEvent`.
16+
- The memory limit can be adjusted in `server.properities` by modifying `script-watchdog-memory-limit`. (Setting this value to 0 disables the limit.)
17+
18+
### InternalError: stack overflow
19+
20+
- Occurs when there is a recursive function (a function that calls itself) without an exit point.
21+
22+
- Example code:
23+
24+
```js
25+
function loop(x) {
26+
// The base case is missing
27+
loop(x + 1); // Recursive call
28+
}
29+
loop(0);
30+
// InternalError: stack overflow
31+
```
32+
33+
### InternalError: interrupted
34+
35+
### InternalError: invalid index for append
36+
37+
### InternalError: invalid ret value
38+
39+
### InternalError: iterator_close_return
40+
41+
### InternalError: too many local variables
42+
43+
### InternalError: too many arguments
44+
45+
### InternalError: unexpected ellipsis token
46+
47+
### InternalError: too many closure variables
48+
49+
### InternalError: invalid digit
50+
51+
### InternalError: out of memory in regexp execution
52+
53+
### RangeError: invalid array length
54+
- Occurs when specifying an array length that is either negative, a floating number or exceeds the maximum supported by the platform. [**Source**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length)
55+
56+
### RangeError: invalid array index
57+
58+
### RangeError: radix must be between 2 and 36
59+
60+
### RangeError: invalid number of digits
61+
62+
### RangeError: invalid code point
63+
64+
### RangeError: invalid repeat count
65+
66+
### RangeError: bad normalization form
67+
68+
### RangeError: Date value is NaN
69+
70+
### RangeError: invalid array buffer length
71+
72+
### RangeError: invalid offset
73+
74+
### RangeError: invalid length
75+
76+
### RangeError: invalid byteOffset
77+
78+
### RangeError: invalid byteLength
79+
80+
### RangeError: out of bound
81+
82+
### ReferenceError: unsupported reference to 'super### ReferenceError: 'this' can be initialized only once
83+
84+
### SyntaxError: unparenthesized unary expression can't appear on the left-hand side of ### SyntaxError: invalid regular expression flags
85+
86+
### TypeError: unsupported operation
87+
88+
### TypeError: invalid object type
89+
90+
### TypeError: not an object
91+
92+
### TypeError: not a symbol
93+
94+
### TypeError: object is not extensible
95+
96+
### TypeError: circular prototype chain
97+
98+
### TypeError: operand 'prototype' property is not an object
99+
100+
### TypeError: invalid 'instanceof' right operand
101+
102+
### TypeError: expecting \<brand> private field
103+
104+
### TypeError: invalid brand on object
105+
106+
### TypeError: no setter for property
107+
108+
### TypeError: could not delete property
109+
110+
### TypeError: toPrimitive
111+
112+
### TypeError: cannot convert symbol to number
113+
114+
### TypeError: cannot convert symbol to string
115+
116+
### TypeError: null or undefined are forbidden
117+
118+
### TypeError: invalid 'in' operand
119+
120+
### TypeError: invalid property access
121+
122+
### TypeError: value is not iterable
123+
124+
### TypeError: iterator must return an object
125+
126+
### TypeError: parent class must be constructor
127+
128+
### TypeError: parent prototype must be an object or null
129+
130+
### TypeError: must be called with new
131+
132+
### TypeError: not a function
133+
134+
### TypeError: derived class constructor must return an object or undefined
135+
136+
### TypeError: class constructors must be invoked with 'new### TypeError: iterator does not have a throw method
137+
138+
### TypeError: value has no property
139+
140+
### TypeError: not a constructor
141+
142+
### TypeError: not a generator
143+
144+
### TypeError: cannot invoke a running generator
145+
146+
### TypeError: not an AsyncGenerator object
147+
148+
### TypeError: import.meta not supported in this context
149+
150+
### TypeError: no function filename for import### TypeError: bytecode function expected
151+
152+
### TypeError: eval is not supported
153+
154+
### TypeError: circular reference
155+
156+
### TypeError: cannot convert to object
157+
158+
### TypeError: invalid getter
159+
160+
### TypeError: invalid setter
161+
162+
### TypeError: cannot have setter/getter and value or writable
163+
164+
### TypeError: not a prototype
165+
166+
### TypeError: proxy preventExtensions handler returned false
167+
168+
### TypeError: not a object
169+
170+
### TypeError: Array loo long
171+
172+
### TypeError: empty array
173+
174+
### TypeError: Array too long
175+
176+
### TypeError: not a number
177+
178+
### TypeError: not a boolean
179+
180+
### TypeError: not a string
181+
182+
### TypeError: regex not supported
183+
184+
### TypeError: regexp must have the 'g' flag
185+
186+
### TypeError: string expected
187+
188+
### TypeError: flags must be undefined
189+
190+
### TypeError: RegExp exec method must return an object or null
191+
192+
### TypeError: revoked proxy
193+
194+
### TypeError: proxy: inconsistent prototype
195+
196+
### TypeError: proxy: bad prototype
197+
198+
### TypeError: proxy: inconsistent isExtensible
199+
200+
### TypeError: proxy: inconsistent preventExtensions
201+
202+
### TypeError: proxy: inconsistent has
203+
204+
### TypeError: proxy: inconsistent get
205+
206+
### TypeError: proxy: inconsistent set
207+
208+
### TypeError: proxy: cannot set property
209+
210+
### TypeError: proxy: inconsistent getOwnPropertyDescriptor
211+
212+
### TypeError: proxy: defineProperty exception
213+
214+
### TypeError: proxy: inconsistent defineProperty
215+
216+
### TypeError: proxy: inconsistent deleteProperty
217+
218+
### TypeError: proxy: properties must be strings or symbols
219+
220+
### TypeError: proxy: duplicate property
221+
222+
### TypeError: proxy: target property must be present in proxy ownKeys
223+
224+
### TypeError: proxy: property not present in target were returned by non extensible proxy
225+
226+
### TypeError: set/add is not a function
227+
228+
### TypeError: promise self resolution
229+
230+
### TypeError: resolving function already set
231+
232+
### TypeError: not an Async-from-Sync Iterator
233+
234+
### TypeError: not a Date object
235+
236+
### TypeError: invalid hint
237+
238+
### TypeError: object needs toISOString method
239+
240+
### TypeError: ArrayBuffer is detached
241+
242+
### TypeError: cannot use identical ArrayBuffer
243+
244+
### TypeError: new ArrayBuffer is too small
245+
246+
### TypeError: TypedArray length is too small
247+
248+
### TypeError: cannot be called
249+
250+
### URIError: expecting %%
251+
252+
### URIError: expecting hex digit
253+
254+
### URIError: malformed UTF-8
255+
256+
### URIError: invalid character
257+
258+
### URIError: expecting surrogate pair

docs/MinecraftApi/npm-packages.md

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,57 @@
11
# npm packages
22

3-
## Latest Beta Script Modules for Minecraft Preview
3+
## Release 1.19.50
44

5-
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/beta)**
5+
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/1.1.0-beta.release.1.19.50)**
66

7-
- **[@minecraft/server-ui@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-ui/v/beta)**
7+
- **[@minecraft/server-ui@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-ui/v/1.0.0-beta.release.1.19.50)**
88

9-
- **[@minecraft/server-admin@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-admin/v/beta)**
9+
- **[@minecraft/server-admin@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-admin/v/1.0.0-beta.release.1.19.50)**
1010

11-
- **[@minecraft/server-gametest@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-gametest/v/beta)**
11+
- **[@minecraft/server-gametest@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-gametest/v/1.0.0-beta.release.1.19.50)**
1212

13-
- **[@minecraft/server-net@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-net/v/beta)**
13+
- **[@minecraft/server-net@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-net/v/1.0.0-beta.release.1.19.50)**
1414

1515
```
16-
npm install @minecraft/server@beta
17-
npm install @minecraft/server-ui@beta
18-
npm install @minecraft/server-net@beta
19-
npm install @minecraft/server-admin@beta
20-
npm install @minecraft/server-gametest@beta
16+
npm install @minecraft/server@1.1.0-beta.release.1.19.50
17+
npm install @minecraft/server-ui@1.0.0-beta.release.1.19.50
18+
npm install @minecraft/server-net@1.0.0-beta.release.1.19.50
19+
npm install @minecraft/server-admin@1.0.0-beta.release.1.19.50
20+
npm install @minecraft/server-gametest@1.0.0-beta.release.1.19.50
2121
```
2222

23-
## Latest Beta Script Modules Minecraft (Release)
23+
- **[@minecraft/server@1.0.0](https://www.npmjs.com/package/@minecraft/server/v/1.0.0-preview.1.19.50.22)**
24+
> ⚠️Warning: This script module is not compatible with Beta API script modules
25+
26+
```
27+
npm install @minecraft/[email protected]
28+
```
2429

25-
- **[@minecraft/server@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server/v/latest)**
30+
## Preview 1.19.60.22
2631

27-
- **[@minecraft/server-ui@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-ui/v/latest)**
32+
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/1.1.0-beta.preview.1.19.60.22)**
2833

29-
- **[@minecraft/server-admin@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-admin/v/latest)**
34+
- **[@minecraft/server-ui@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-ui/v/1.0.0-beta.preview.1.19.60.22)**
3035

31-
- **[@minecraft/server-gametest@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-gametest/v/latest)**
36+
- **[@minecraft/server-admin@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-admin/v/1.0.0-beta.preview.1.19.60.22)**
3237

33-
- **[@minecraft/server-net@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-net/v/latest)**
38+
- **[@minecraft/server-gametest@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-gametest/v/1.0.0-beta.preview.1.19.60.22)**
39+
40+
- **[@minecraft/server-net@1.0.0-beta](https://www.npmjs.com/package/@minecraft/server-net/v/1.0.0-beta.preview.1.19.60.22)**
3441

3542
```
36-
npm install @minecraft/server@latest
37-
npm install @minecraft/server-ui@latest
38-
npm install @minecraft/server-net@latest
39-
npm install @minecraft/server-admin@latest
40-
npm install @minecraft/server-gametest@latest
43+
npm install @minecraft/[email protected]
44+
npm install @minecraft/[email protected]
45+
npm install @minecraft/[email protected]
46+
npm install @minecraft/[email protected]
47+
npm install @minecraft/[email protected]
48+
```
49+
50+
- **[@minecraft/server@1.0.0](https://www.npmjs.com/package/@minecraft/server/v/1.0.0-preview.1.19.50.22)**
51+
> ⚠️Warning: This script module is not compatible with Beta API script modules
52+
53+
```
54+
npm install @minecraft/[email protected]
4155
```
4256

4357
## Preview 1.19.60.20
@@ -60,6 +74,13 @@ npm install @minecraft/[email protected]
6074
npm install @minecraft/[email protected]
6175
```
6276

77+
- **[@minecraft/server@1.0.0](https://www.npmjs.com/package/@minecraft/server/v/1.0.0-preview.1.19.50.22)**
78+
> ⚠️Warning: This script module is not compatible with Beta API script modules
79+
80+
```
81+
npm install @minecraft/[email protected]
82+
```
83+
6384
## Preview 1.19.50.25
6485

6586
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/1.1.0-beta.preview.1.19.50.25)**
@@ -80,6 +101,13 @@ npm install @minecraft/[email protected]
80101
npm install @minecraft/[email protected]
81102
```
82103

104+
- **[@minecraft/server@1.0.0](https://www.npmjs.com/package/@minecraft/server/v/1.0.0-preview.1.19.50.22)**
105+
> ⚠️Warning: This script module is not compatible with Beta API script modules
106+
107+
```
108+
npm install @minecraft/[email protected]
109+
```
110+
83111
## Preview 1.19.50.24
84112

85113
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/1.1.0-beta.preview.1.19.50.24)**
@@ -129,6 +157,7 @@ npm install @minecraft/[email protected]
129157
```
130158
npm install @minecraft/[email protected]
131159
```
160+
132161
## Preview 1.19.50.21
133162

134163
- **[@minecraft/server@1.1.0-beta](https://www.npmjs.com/package/@minecraft/server/v/1.1.0-beta.preview.1.19.50.21)**
@@ -217,6 +246,7 @@ npm install @minecraft/[email protected]
217246
```
218247

219248
## Minecraft 1.19.30 or above (Using script module version 0.1.0)
249+
220250
> ⚠️Warning: These script module is not compatible with other script modules listed above
221251
222252
- **[[email protected]](https://www.npmjs.com/package/@types/mojang-minecraft/v/0.1.6)**

0 commit comments

Comments
 (0)