Started pack for working with the new GameTest Framework API. Usable in windows, and mobile in worlds and realms!

Overview

Logo

GameTest FrameWork

GameTest FrameWork is a new feature in Minecraft Bedrock Edition. This gives you the ability to script! In this example I will be using the Module 'Minecraft'. This module gives you a lot of abilities. Such as giving you the ability to make custom commands, and many more!
Explore the docs »

View Demo · Report Bug · Request Feature

Contributors Forks Stargazers Issues MIT License

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

There aren't many examples out there on this new feature 'GameTest'. I have made this to help you out and give you a solid example on what this new feature can be used for! This project includes a command handler in ES6, which is really easy to understand if you have the basic JS knowledge. I have left comments through out the project for you to understand what's going on better!

  • This is basically a starter kit. You won't have to build your's from scratch, if you were planning to make custom commands.

  • I have built you a custom command handler! So, you won't need to repeat your code over and over again.

  • Built in event listeners. Making it easier for you to listen for events!

  • The files/commands are very organized. This will make your navigations way easier.

Built With

Getting Started

Easy Method

  • Download this zip folder and name it to .mcpack and import it by clicking on the file. This method will only world, if you have Minecraft Bedrock Edition in the same device you are doing this action on.

Recommended Method

  • Another Method would be to take the zipped folder and unzip/extract it. Take you folder can move it to the folder 'development_behavior_packs', which can be found in a path like '\Users\USER_NAME\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\development_behavior_packs'. This will make your life way easier, while developing this pack. It will update the content inside your game everytime you make any changes to the script. For the changes to apply you must leave and rejoin your world where the pack is applied at.

Installation

  1. Clone the repo
    git clone https://github.com/notbeer/MCBE-GameTest-FrameWork.git

Usage

Most of the features should work as of now version 1.17.10. A lot of the class, methods, properties and more may change a lot. Since GameTest FrameWork is in heavy development as of now.

WARNING: If you are going to apply any GameTest related scripts to your world, please make a copy of your world before you do so! I'm not responsible if anything goes wrong-

Create a new world, since GameTest FrameWork is still experimental. Make sure in your settings you have GameTest FrameWork enabled under Experiments category. At last type in the game chat +help for the list of commands or +help [command name] to get information on a specific command! You can edit/add commands to the pack in the folder.

Documentation on GameTest FrameWork

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

You can share your amazing talent with other people! Any Contributions are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Discord - notbeer#9204

Project Link: https://github.com/notbeer/MCBE-GameTest-FrameWork

Acknowledgements

You might also like...

A group listening chat app that utilizes the spotify api to enable the users to queue, pause, change songs, as well as chat with each other

Next.js + Tailwind CSS Example This example shows how to use Tailwind CSS (v3.0) with Next.js. It follows the steps outlined in the official Tailwind

Dec 19, 2021

A CLI to add and remove local development environments and create HTTPS certificates for them.

A CLI to add and remove local development environments and create HTTPS certificates for them.

A CLI used to create a local https dev environment with the green lock. Setup takes less than 5 minutes and all of your projects will be running locally over HTTPS with custom domain names in no time!

Sep 19, 2022

Find and fix problems in your JavaScript code.

Find and fix problems in your JavaScript code.

ESLint Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room ESLint is a tool for ident

Jan 8, 2023

Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Dec 29, 2022

Test your internet connection speed and ping using speedtest.net from the CLI

Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Jan 7, 2023

Detect copy-pasted and structurally similar code

Detect copy-pasted and structurally similar code

Detect copy-pasted and structurally similar JavaScript code. Requires Node.js 6.0+, and supports ES6, JSX as well as Flow. Note: the project has been

Dec 26, 2022

Move files and directories to the trash

Move files and folders to the trash Works on macOS (10.12+), Linux, and Windows (8+). Note: The Linux implementation is not very good and not maintain

Dec 29, 2022

Pipeable javascript. Quickly filter, map, and reduce from the terminal

Pipeable JavaScript - another utility like sed/awk/wc... but with JS! Quickly filter, map and reduce from the command line. Features a streaming API.

Dec 10, 2022

Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

kill-tabs Kill all Chrome tabs to improve performance, decrease battery usage, and save memory Works on macOS, Linux, Windows. I'm a tab-abuser and I

Jan 8, 2023
Comments
  • Floating Leaderboard

    Floating Leaderboard

    Why this not working??

    `//Importing stuff that is used in this file import * as Minecraft from 'Minecraft'; import * as allCommands from './commands/export.js'; import * as misc from './utils/misc.js'; import * as utils from './utils/others.js';

    var config = { commandPrefix: "+" //Our custom command prefix };

    Minecraft.World.events.beforeChat.subscribe(chatmsg => { //Event to listen for message being sent in chat if(!chatmsg.message.startsWith(config.commandPrefix)) return; //If message doesn't start with the prefix don't execute any of the stuff below

    const args = chatmsg.message.slice(config.commandPrefix.length).trim().split(/ +/); //args just splits the message by "space" so you can take different inputs of the user message
    const commandName = args.shift().toLowerCase(); //The first index of the array from variable "args" will be stored in commandName
    const command = allCommands[commandName]; //We look if "commandName" can be found inside "allCommands"
    
    if(!command || (command.commandInfo.ownerOnly && !utils.findTag({ entityRequirements: `[type=player,name="${chatmsg.sender.name}"]` }, { searchTag: 'OWNER'}))) return utils.runCommand(`tellraw "${chatmsg.sender.name}" {"rawtext":[{"text":"§c"},{"translate":"commands.generic.unknown", "with": ["§f${commandName}§c"]}]}`); //Throw error if command doesn't exist OR the command is avaiable to selected players and the player who executed the command isn't one of the selected
    
    if(command.commandInfo.cancelMessage) chatmsg.canceled = true; //This goes to the command file and looks if variable "commandInfo" has a propert "cancelMessage" set to true. If it does it will make sure the message the user sent in chat never actually gets displayed in chat
    
    try { //Try to execute the command file
        command.execute(chatmsg, args, Minecraft);
    } catch (error) {
        utils.runCommand(`say : §c${error}`);
    };
    

    });

    //I seperated these stuff to make stuff more organized Minecraft.World.events.beforeChat.subscribe(chatmsg => { //Another chat listening event if(chatmsg.message.startsWith(config.commandPrefix)) return; //If they are trying to execute a custom command don't execute the stuff below if(utils.findTag({ entityRequirements: [type=player,name="${chatmsg.sender.name}"] }, { searchTag: 'rainbowText'})) chatmsg.message = misc.rainbowText(chatmsg.message); //Look for the tag 'rainbowText' on the player who executed the command, if they have the tag make their chat text to rainbow misc.displayRank(chatmsg); //This will check if they have a rank, if they do add a rank to their text in chat });

    //!This will execute a function inide it which will be "setTickInterval" only once when the server side is loaded let tickExeOnce = 0; Minecraft.World.events.tick.subscribe(() => { //Run stuff inside every world tick if(tickExeOnce >= 1) return; utils.runCommand(tellraw @a {"rawtext":[{"text":"§eGameTest FrameWork API Starter Pack§r\n§bCredit: §rThis pack was made by §anotbeer\n§9Discord: §fnotbeer#9204\n§aXbox Live: §fColoringEmy86\n\n§dType §a${config.commandPrefix}help §dfor more information!"}]}); //utils.setTickInterval(startupFunctions, 20); tickExeOnce++; });

    function startupFunctions() { misc.writeLeaderboard( { floatingTextIdentifier: 'notbeer:floating_text', leaderboardEntity: 'MoneyL', objective: 'money', displayLength: 10 }, { leaderboardHeading: 'Money Leaderboard\nTop players with the most Money\n§r\n', leaderboardLayout: '§e#$(RANK) §b$(GAMERTAG) §f- §a$§c$(SCORE)' }, { compressScore: false } ); };

    export { config }; `

    opened by marco441-png 1
  • Ask for help

    Ask for help

    How to write the subscription destruction box and how to do HTTP get

    import {Commands, World} from 'mojang-minecraft';
    /*
        执行指令
    /*————*/
    const log = function(msg) {
        Commands.run(`tellraw @a {"rawtext":[{"text":"${msg}"}]}`, World.getDimension('overworld'));
    }
    World.events.BlockBreakEvent.subscribe((event) => {
        /*
            订阅玩家破坏方块消息
        */
        blocks(event);
    })
    function blocks(event) {
        var blocktype = event.block.id;//方块类型
        var playername = event.player.name;//玩家名称
        log(`${playername} 破坏 ${blocktype}`);
    }
    
    opened by cyear 1
  • Add a broadcast function for translations.

    Add a broadcast function for translations.

    The proposal is simple; create a broadcast function that instead accepts a translation key as an argument, as well as a list of text to substitute within the translation. This could be implemented using the tellraw command. And could also be extended to errors in custom commands when one is thrown.

    opened by SIsilicon 1
Releases(v3.0.1)
Owner
null
Windows command line tool to block outbound connections for files within a directory.

fwg A Windows command line tool to block outbound connections for files within a directory. fwg utilizes the power of PowerShell and Windows Network S

raymond wang 3 Jul 19, 2022
Working around a Safari IndexedDB bug

Safari 14 IndexedDB fix Safari on macOS Big Sur 11.4 and iOS 14.6 has a nasty bug where IndexedDB requests get lost and never resolve. This library (w

Jake Archibald 43 Sep 21, 2022
Mobile icon generator

mobicon-cli Mobile app icon generator Install $ npm install --global mobicon-cli Note: Make sure to install GraphicsMagick as well. Usage $ mobicon -

Sam Verschueren 102 Dec 8, 2022
Mobile app splash screen generator

mobisplash-cli Mobile app splash screen generator Install $ npm install --global mobisplash-cli Usage $ mobisplash --help Usage $ mobisplash <

Sam Verschueren 65 Oct 3, 2022
Wordle and Termooo style classic word guessing game for the command line. One new word per day!

Wordle and Termooo style classic word guessing game for the command line. One new word per day!

Anderson Silva 3 Nov 27, 2022
Google Chrome extension which randomly generates a customisable 3D bamboo forest in your new tab

Bamboo-New-Tab bamboo-new-tab-demo.mp4 bamboo-new-tab-options-demo.mp4 Try it out Hosted version: https://conwayjw97.github.io/Bamboo-New-Tab/ To run

James 15 Nov 16, 2021
A fullstack(NestJS、React) framework for building efficient and scalable applications

A fullstack(NestJS、React) framework for building efficient and scalable applications. Description The Kunlun CLI is a command-line interface tool that

图灵人工智能研究院前端技术团队 3 Mar 12, 2022
Node.js Open CLI Framework. Built with 💜 by Heroku.

oclif: Node.JS Open CLI Framework ?? Description ?? Getting Started Tutorial ✨ Features ?? Requirements ?? CLI Types ?? Usage ?? Examples ?? Commands

oclif 8k Jan 4, 2023
NodeJS Framework for Interactive CLIs

Cliffy - A Framework For Interactive CLIs Cliffy is a simple, powerful utility for making interactive command line interfaces. Cliffy is run as a REPL

Drew Youngwerth 318 Dec 30, 2022
A simple CLI tool to create and manage xhelpers-api projects

A simple CLI tool to create and manage xhelpers-api projects

null 2 Feb 25, 2022