https://github.com/christopherwk210/bedrock-typings
TypeScript definitions for the Minecraft Bedrock Edition Scripting API
https://github.com/christopherwk210/bedrock-typings
api bedrock minecraft typescript-definitions
Last synced: over 1 year ago
JSON representation
TypeScript definitions for the Minecraft Bedrock Edition Scripting API
- Host: GitHub
- URL: https://github.com/christopherwk210/bedrock-typings
- Owner: christopherwk210
- License: mit
- Created: 2018-12-11T02:25:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T03:42:57.000Z (over 7 years ago)
- Last Synced: 2025-01-27T11:45:22.830Z (over 1 year ago)
- Topics: api, bedrock, minecraft, typescript-definitions
- Size: 88.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Bedrock Typings
TypeScript definitions for the Minecraft Bedrock Edition Scripting API
This allows you to have code autocompletion in modern code editors (like Visual Studio Code) when working with the Minecraft Bedrock Edition Scripting language. All definitions were derived from the [official wiki](https://minecraft.gamepedia.com/Bedrock_Beta_Script_Documentation#Entity_Queries).
## Usage
Download the `bedrock.d.ts` from this repo ([right click this and save-as](https://raw.githubusercontent.com/christopherwk210/bedrock-typings/master/bedrock.d.ts)) and put it into your current scripting project folder.
Your project structure may look something like this:
Open up any script you want to use these typings in, and copy this into the very top line of that script:
```
///
```
Each `../` represents going upwards one directory. Depending on your project structure, you may need to modify the path to correctly point to where you saved `bedrock.d.ts`.
Once that's done, add this **directly** above where you call `.registerSystem()` like this:
```js
/** @type {Bedrock.System} */
var clientSystem = client.registerSystem(0, 0);
```
or
```js
/** @type {Bedrock.System} */
var serverSystem = server.registerSystem(0, 0);
```
That's it! You may have to restart your editor for the changes to take effect. Now when you type `clientSystem.` you'll see autocomplete suggestions.