Skip to content

Mojang/minecraft-editor-extension-samples

Repository files navigation

Bedrock Editor Samples

This folder contains a set of sample Bedrock Editor extensions that you can use for reference or to get started with your own extensions.

We recommend that you familiarize yourself with the

before you start working with these samples.

Test them out

We've included an Editor Sample Extension Package extension package with the sample files compiled and ready to go so you can test them out in the Editor right away.

Just download the Editor Sample Extension Package file and double-click it to install it in the Editor. When you create a new test world, just browse into the Resource Packs and Behavior Packs section of the world settings and add the sample packs to your world - you should see them appear in the tool rail when you start the edit session.

Note: If you install the extension addons by double-clicking, make sure you select Minecraft Bedrock Preview as the default app to open the file with. If you don't, then the samples won't be visible to the Minecraft Bedrock Preview version of the game and you won't be able to see them.



Samples

Sample Description
Empty An empty template that just registers an extension - ready for you to fill in with all your amazing code!

Notes: Completely empty apart from very basic extension registration boilerplate code - use this as a starting template when you start your new extension.
Author: Dave (I put a ton of work into this one! ;) )
Minimal A mostly pointless and largely empty extension that just has a 'click me' button -- but it does serve as a good example on how to set up a basic extension.

Notes: This is a good example to jump off with as a learning resource.
This extension demonstrates the use of UI components and registering an extension while reserving player specific storage space
Author: Dave
Camera Grapple Adds an extension which has NO UI components. The extension is bound to global key bindings and demonstrates using the experimental /camera command to perform smooth client-side grapple movement. The extension also implements a frame up function which will zoom to fit a selection area so that it fills the screen.

This extension demonstrates the use of global key bindings, and the /camera command, and invoking slash commands from within script.
Author: Jonas
Dye Brush Adds a brush mechanism that allows the user to paint any entity that has a minecraft:color component with a dye color specified on a UI dropdown box.

This extension demonstrates the use of the selection volumes, user cursor and entity component access

Notes: Activated from the tool rail. Although the extension works, the results are only visible if Actor Simulation is UN-PAUSED (i.e. Actors are animated/moving). This example also shows the use of the scroll-wheel to cycle through the selected colors.
Author: Eser
Farm Generator Adds a dialog that allows you to place a selection of randomized farms containing different combinations of crops and animals, as well as adding irrigation to help grow plants.

This extension demonstrates the use of UI components, block placement and mouse input.

Notes: Activate using CTRL+SHIFT+F or from the tool rail.
Author: Molly
Goto Mark Adds a dialog that allows you to modify the players current position in the world by directly typing coordinates. In addition, you can set the players default spawn position (and jump to it at any time during editing).
The extension also allows you to set up to 9 custom world locations as named bookmarks, and jump to them at any time during editing.

This extension demonstrates dynamic UI component updates, text input, and persistent storage using entity dynamic properties.

Notes: No input required, activated from tool rail.
Author: Chloe, Eser & Dave
Portal Generator Adds a dialog that allows you to place either Nether or End portals (in various states of completion).

This extension demonstrates dynamic UI component updates, and block placement.

Notes: Activated using CTRL+SHIFT+P or from tool rail.
Author: Andrew.
Simple Empty Adds an extension which as a very basic set of barely functional components designed to demonstrate setting up a new Editor tool using the Simple Tool wrapper. The extension demonstrates how to set up the data definitions that will ultimately direct how the tool registers itself with the Editor, and sets up the visual layouts - ready for the creator to fill in the functionality.
Author: Dave
Simple Locate Biome Adds an extension which demonstrates the use of sub-panes to group together UI controls, and uses the visibility of those sub-panes to create different views of data. The extension also demonstrates the use of the mutually exclusive visibility properties of sub-panes, and some use of the Biome API.
Author: Dave & Mitch
Star Brush Shape Adds a brush shape 'Star' to the new brush shape manager.
Author: Gordon
Tree Generator Adds a dialog that allows you to place a selection of randomized trees of certain types wherever you click in the world.

This extension demonstrates the use of UI components, block placement and mouse input.

Notes: Activated using CTRL+SHIFT+T or through the tool rail.
Author: Jake

How to use these samples

Use the Editor Extension Starter Kit to create a new extension project.

  • Copy the sample TypeScript file into the <my new extension>/src folder
  • Update the <my new extension>/src/index.ts file to register the extension
  • Copy any image files from the sample into the <my new extension>/assets/resource/textures/ folder (create it if you have to)
  • Copy any en_US.lang files into the <my new extension>/assets/texts/ folder (create it if you have to)

Building

  • Follow the Extension Starter Kit instructions to deploy the assets (prepare the resource pack)
  • Follow the Extension Starter Kit instructions to build and deploy the extension
  • Start the Minecraft Bedrock Preview app, and add your new Behavior & Resource packs to your world
  • Start the Editor - you should see the new extension in the tool rail (or check the Log Window for any debug/error messages)

Alternatively - just use the Editor Extension Starter Kit and choose which sample extension you want to deploy from the installer menu.

About

Minecraft Bedrock Editor Extension samples repo.

Resources

Stars

Watchers

Forks