This repository is filled with community driven script samples for Minecraft Bedrock Script API.
Check out the stable
branch from here: https://github.com/JaylyDev/ScriptAPI/tree/stable.
The main
branch is used for script development for Minecraft Preview and may often be in a broken state.
Community driven scripts that use Script API to do all kinds of crazy stuff in Minecraft.
Important
Some scripts might use API modules that are only enabled in specific runtime environments, including:
@minecraft/server-net
and @minecraft/server-admin
: Modules that can only be used in Bedrock Dedicated Servers.
@minecraft/vanilla-data
and @minecraft/math
: These are external Minecraft libraries published to NPM. They are not part of Minecraft's native modules.
There are two ways to use external Minecraft libraries in behavior pack scripts:
-
Standalone file
Download standalone files available from jaylydev.github.io for quick, small-scale projects.
-
Bundling
Installing it through npm, with advanced build configurations and bundling with esbuild:
npm i @minecraft/math npm i @minecraft/vanilla-data
Guide on bundle Minecraft Scripts with the following bundlers:
- ESBuild (Recommended): Bundle Minecraft Scripts with ESBuild
- Webpack: Bundle Minecraft Scripts with Webpack
Check out the following links for Script API documentation:
- Official Script API Documentation - Microsoft's official documentation of high-level introduction of experimental Script API
- Jayly's Script API References - Jayly's Script API documentation with guides and easy to use and understand API references for programming beginners.
- Bedrock Wiki - Learn the basics of the Script API on Bedrock Wiki.
Please contribute to this repository if you can. Check out Contributing Guidelines for more infomation.
This project is licensed under the MIT license.
Copyrights on the script files are each contributor listed at the beginning of each script file.