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
+39-48Lines changed: 39 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,56 +2,47 @@
2
2
3
3
Contributing infomation. This info changes because Script API is currently in active development, and breaking changes are frequent.
4
4
5
-
## Scripts
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.
8
-
9
-
**manifest.json**
10
-
11
-
This repository may have scripts that requires the following dependencies with their latest module version:
12
-
13
-
```json
14
-
"dependencies": [
15
-
{
16
-
"module_name": "@minecraft/server",
17
-
"version": "1.2.0-beta"
18
-
},
19
-
{
20
-
"module_name": "@minecraft/server-editor",
21
-
"version": "0.1.0-beta"
22
-
}
23
-
{
24
-
"module_name": "@minecraft/server-ui",
25
-
"version": "1.0.0-beta"
26
-
},
27
-
{
28
-
"module_name": "@minecraft/server-gametest",
29
-
"version": "1.0.0-beta"
30
-
},
31
-
{
32
-
"module_name": "@minecraft/server-admin",
33
-
"version": "1.0.0-beta"
34
-
},
35
-
{
36
-
"module_name": "@minecraft/server-net",
37
-
"version": "1.0.0-beta"
38
-
}
39
-
]
40
-
```
5
+
## Creating a new script sample
6
+
7
+
- Create a new directory for your script sample in the [**scripts**](./scripts/) directory. The directory name is your sample name and should be is unique and infomative.
8
+
9
+
- Create a folder structure based on the following:
> Above image shows all checks have passed and the pull request should be able to be merged.
31
+
32
+
If the check did not pass, go to the 'details' section and see what section of the check went wrong, and attempt to fix the issue by pushing another commit to your branch.
33
+
34
+
## Create an editor extension sample
35
+
36
+
An editor extension sample should only be used in Minecraft Editor, otherwise the sample should be hosted in 'scripts' folder.
37
+
38
+
- Create an editor extension sample in [editorExtensions](./editorExtensions/) directory.
39
+
40
+
- Create the same folder structure as used in scripts folder and a header in main file like creating a new script sample.
41
+
42
+
- We recommend using TypeScript for editor extension samples.
43
+
44
+
## Don't edit docs folder
45
+
46
+
Documentation are no longer being updated as mentioned in README.
Please do not submit any pull requests that changes any content to the docs directory. Instead, please visit [Bedrock Wiki](https://wiki.bedrock.dev/scripting/starting-scripts) and perhaps contribute scripting documentation in Bedrock Wiki GitHub repository: https://github.com/Bedrock-OSS/bedrock-wiki/tree/wiki/docs/scripting
Copy file name to clipboardExpand all lines: README.md
+21-55Lines changed: 21 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,73 +2,39 @@
2
2
3
3
This repository is filled with community driven script samples for Minecraft Bedrock Script API.
4
4
5
-
## Script Samples
5
+
<hr/>
6
6
7
-
-### [scripts](./scripts/)
7
+
### 🔴 USE `stable` not `main` 🔴
8
8
9
-
Community driven scripts that use Script API to do all kinds of crazy stuff in Minecraft.
10
-
11
-
> ⚠️ Some scripts might use API modules that are only enabled in specific environments, including:
12
-
> -`@minecraft/server-net` and `@minecraft/server-admin`: Modules that can only be used in [Bedrock Dedicated Servers](https://www.minecraft.net/en-us/download/server/bedrock).
13
-
> -`@minecraft/server-editor` and `@minecraft/server-editor-bindings`: Modules that can only be used on Editor projects in [Minecraft Editor](https://github.com/mojang/minecraft-editor).
14
-
15
-
-### [docs](./docs/)
16
-
Contains technical documentation of Script API features.
17
-
> 🚫 Documentation are no longer being updated. Check out [Bedrock Wiki](https://wiki.bedrock.dev/scripting/starting-scripts) and [Microsoft Learn](https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/) for up-to-date infomation.
18
-
19
-
## Contributing
20
-
21
-
Please contribute to this repository if you can.
22
-
23
-
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.
9
+
**Check out the `stable` branch from here: https://github.com/JaylyDev/ScriptAPI/tree/stable**.
10
+
The `main` branch is used for script development for Minecraft Preview and may often be in a **broken** state.
24
11
25
-
To create a new script package, create a folder structure based on the following:
|`index.js` or `index.ts`| This is main file for the package. |
30
-
|`tests.js` or `tests.ts`| This contains sample code which tests the typings. This code does _not_ run, but it is type-checked. |
31
-
|`tsconfig.json`| This allows you to run `tsc` within the package. |
32
-
|`README.md`| Infomation for the package. |
14
+
-### [Scripts](./scripts/)
33
15
34
-
To add yourself as a script author:
35
-
36
-
Adding your name to the end of the line, as in `// Author: Alice <url>, Bob <url>`.
37
-
Or if there are more people, it can be multiline
38
-
39
-
```js
40
-
// Author: Alice <url>
41
-
// Bob <url>
42
-
// Steve <url>
43
-
// John <url>
44
-
```
45
-
46
-
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
-
48
-
```js
49
-
// Script example for ScriptAPI
50
-
// Author: Alice <https://github.com/alice>
51
-
// Bob <https://github.com/bob>
52
-
// Steve <https://steve.com/>
53
-
// Project: https://github.com/JaylyDev/ScriptAPI
54
-
```
16
+
Community driven scripts that use Script API to do all kinds of crazy stuff in Minecraft.
55
17
56
-
### Script Versioning
18
+
> ⚠️ Some scripts might use API modules that are only enabled in specific runtime environments, including:
19
+
>
20
+
> -`@minecraft/server-net` and `@minecraft/server-admin`: Modules that can only be used in [Bedrock Dedicated Servers](https://www.minecraft.net/en-us/download/server/bedrock).
57
21
58
-
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.
22
+
-### [Editor Extensions](./editorExtensions/)
59
23
60
-
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).
24
+
Community driven editor extensions samples for editing Minecraft worlds. Only available on Editor projects in [Minecraft Editor](https://github.com/mojang/minecraft-editor).
61
25
62
-
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.
26
+
Highly recommend checking out Mojang's [editor extension starter kit](https://github.com/Mojang/minecraft-editor-extension-starter-kit) if you're experimenting with editor API for the first time!
Contains technical documentation of Script API features.
30
+
> **🚫 Documentation are no longer being updated**. Check out [Microsoft Learn](https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/) and [Bedrock Wiki](https://wiki.bedrock.dev/scripting/starting-scripts) for up-to-date infomation.
65
31
66
-
## Script status
32
+
## Contributing
67
33
68
-
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.
34
+
Please contribute to this repository if you can. Check out [**Contributing Guidelines**](./CONTRIBUTING.md) for more infomation.
Most of the time the checks succeed, which means scripts inside should not have any syntax errors when using in stable version of Minecraft.
39
+
Copyrights on the script files are each contributor listed at the beginning of each script file.
73
40
74
-
If the check failed, it's worth creating a bug report if a fix is not implemented, or a pull request if you may find a solution to a fix to the problem.
0 commit comments