You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,22 @@ Contributing infomation. This info changes because Script API is currently in ac
4
4
5
5
## Scripts
6
6
7
-
When submitting a new package. The scripts are assumed that they can be used with the latest beta module of script modules in latest version of Minecraft Preview, the following is a reference of a manifest dependencies and NPM packages for meeting the criteria of submitting or updating a script sample:
7
+
When submitting a new package. The scripts are assumed that they can be used with the latest beta module of script modules in latest version of Minecraft Preview, the following is a reference of a manifest dependencies and NPM packages for meeting the criteria of submitting or updating a script sample.
8
8
9
9
**manifest.json**
10
10
11
+
This repository may have scripts that requires the following dependencies with their latest module version:
12
+
11
13
```json
12
14
"dependencies": [
13
15
{
14
16
"module_name": "@minecraft/server",
15
-
"version": "1.1.0-beta"
17
+
"version": "1.2.0-beta"
16
18
},
19
+
{
20
+
"module_name": "@minecraft/server-editor",
21
+
"version": "0.1.0-beta"
22
+
}
17
23
{
18
24
"module_name": "@minecraft/server-ui",
19
25
"version": "1.0.0-beta"
@@ -33,6 +39,15 @@ When submitting a new package. The scripts are assumed that they can be used wit
33
39
]
34
40
```
35
41
42
+
This repository may have scripts that requires the following capabilities:
Copy file name to clipboardExpand all lines: README.md
+35-36Lines changed: 35 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,63 +7,62 @@ This repository is filled with community driven script samples for Minecraft Bed
7
7
-### [scripts](./scripts/)
8
8
Community driven scripts that use Script API to do all kinds of crazy stuff in Minecraft.
9
9
> ⚠️ Some scripts might use `@minecraft/server-net` and `@minecraft/server-admin` module, which the modules are only available in [Bedrock Dedicated Servers](https://www.minecraft.net/en-us/download/server/bedrock) and cannot be used on Minecraft clients.
Basic usage of executing HTTP-based requests using `@minecraft/server-net` module
11
+
-### [docs](./docs/)
12
+
Contains technical documentation of Script API features.
13
+
> 🚫 Documentation are no longer being updated. Check out [Bedrock Wiki](https://wiki.bedrock.dev/) and [Microsoft Learn](https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/) for up-to-date infomation.
25
14
26
15
## Contributing
27
16
28
17
Please contribute to this repository if you can.
29
18
19
+
The repository features a Pull Request system that inspires heavily from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped). This implementation serves to ensure the attribution of code ownership to the script authors who manages of their scripts.
20
+
30
21
To create a new script package, create a folder structure based on the following:
31
22
32
-
```
33
-
JaylyDev/ScriptAPI (root)
34
-
└───scripts
35
-
└───my-package
36
-
index.js
37
-
index.ts (optional)
38
-
LICENSE (optional)
39
-
tests.js
40
-
tests.ts (optional)
41
-
README.md (optional)
23
+
| File | Purpose |
24
+
| ------------- | ------- |
25
+
|`index.js` or `index.ts`| This is main file for the package. |
26
+
|`tests.ts`| This contains sample code which tests the typings. This code does *not* run, but it is type-checked. |
27
+
|`tsconfig.json`| This allows you to run `tsc` within the package. |
28
+
|`README.md`| Infomation for the package. |
29
+
30
+
To add yourself as a script author:
31
+
32
+
Adding your name to the end of the line, as in `// Author: Alice <url>, Bob <url>`.
33
+
Or if there are more people, it can be multiline
34
+
```js
35
+
// Author: Alice <url>
36
+
// Bob <url>
37
+
// Steve <url>
38
+
// John <url>
42
39
```
43
40
44
-
In the example `new-package` is the package name, you must include
45
-
- a main file (e.g. `index.js` or `index.ts`)
46
-
- a test file (e.g. `tests.js` or `tests.ts`).
41
+
Each package is versioned via GitHub repository tags. In order to secure credentials for scripts, each main file requires basic credentials with the right format. For example, here are the first few lines of script example:
47
42
48
-
### Script modules version
43
+
```js
44
+
// Script example for ScriptAPI
45
+
// Author: Alice <https://github.com/alice>
46
+
// Bob <https://github.com/bob>
47
+
// Steve <https://steve.com/>
48
+
// Project: https://github.com/JaylyDev/ScriptAPI
49
+
```
49
50
50
-
The script samples are intended to be used with the latest beta module of script modules in latest version of Minecraft Preview, and the latest version of Minecraft, this depends on the scale of changes happens in Scripting API in Minecraft Preview.
51
+
### Script Versioning
51
52
52
-
For submitting or updating script samples, we recommend upload scripts that uses the latest version of Script API modules. For more infomation please visit [here](./CONTRIBUTING.md).
53
+
The script samples are intended to be used within the latest version of Minecraft or Minecraft Preview, using latest development version of Script API modules.
53
54
54
-
### Acknowledgements
55
+
For submitting or updating script samples, you must upload scripts that works in the latest version of Script API modules in latest Minecraft Preview. For more infomation please visit [here](./CONTRIBUTING.md).
55
56
56
-
When you submit a new package and you want to publicly declare your work, you are allowed to insert credits under the following files:
57
+
To access older versions of scripts, this repository uses [GitHub's tags feature](https://github.com/JaylyDev/ScriptAPI/tags)to allow users to access previous versions of repository for scripts that uses a specific Minecraft version.
57
58
58
-
-`LICENSE` file with the license and your name
59
-
- Adding your name to the end of the line, like `// Author: JaylyDev <https://github.com/JaylyDev>`.
60
-
- Add your name in `README.md` file in the package
This repository uses TypeScript compiler to test script files by validing with declaration files of Script API modules, making sure they are up-to-date when using in the latest Minecraft versions.
0 commit comments