mbcore-gametest
v2.7.12
Published
A set of scripts aimed to make some things easier with the GameTest Framework.
Downloads
15
Readme
MBCore-GameTest-Module
A set of classes aimed to make some things easier with the Minecraft Bedrock GameTest Framework.
If you're just starting out with the GameTest Framework, there's a neat Starter Pack available.
Pre-requisites
- Minecraft Bedrock Edition
- npm - NodeJS Install Guide
- typescript - NPM Package
- Regolith - Installation Guide
Dependencies
- gametest-maths - Documentation
- mojang-minecraft - NPM Package
Docs
Docs generated by Type Doc can be found here
Installation
- Download latest release using
npm i mbcore-gametest
Example
Script:
import { EventEmitter } from 'mbcore-gametest';
const events = new EventEmitter();
events.on('example', (msg) => {
console.log(msg);
})
events.emit('example', 'Hello');
// Output: Hello
events.emit('example', 'World');
// Output: World
Regolith Config:
{
"name": "example",
"author": "example",
"packs": {
"behaviorPack": "./packs/BP",
"resourcePack": "./packs/RP"
},
"regolith": {
"profiles": {
"dev": {
"unsafe": false,
"filters": [
{
"url": "github.com/ShiCheng-Lu/Regolith-Filters/module_importer"
},
{
"url": "github.com/MajestikButter/Regolith-Filters/ts_transpiler",
"settings": {
"removeTS": true,
"compilerOptions": {
"module": "ES2020",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"target": "ES2020",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": false
}
}
}
],
"export": {
"target": "development"
},
"dataPath": "./packs/data"
}
}
}
}