This post will examine a code library that you can import, modify and run to quickly build complex structures in Minecraft E:E. This library may change over time as more features are added. Please be careful when making modifications as there is quite a bit of code now and you may accidentally break something. If that happens you can always start again by re-importing the code.
Most of the commands will require you to have the operator permission in the world. This is due to the powerful nature of the builder to create large ‘world changing’ structures. The builder is different to the agent as it is invisible and has more powerful commands. To position the builder using the tpb (teleport builder) and bt (builder turn) commands which are described below. When using these commands to build structures they are always built in a forward and right direction. While building a structure the builder will move but should always return to the starting point.
Structure Builder Commands
Name | Parameters | Description & Example |
---|---|---|
help | (none) | Displays a list of all the available command in the chat window. |
clr | x, y, z | Clears all blocks in a rectangular prism in the forward and left direction. E.g. ‘clr 10 5 8’ will clear a space that is 10 blocks wide, 5 blocks high and 8 blocks long. |
re | x, y, z | Creates a rectangular prism (filled) with the current block. E.g. ‘re 5 3 7’ will create a rectangular block that is 5 blocks wide, 3 blocks high and 7 blocks long. |
walls | x, y, z | Creates 4 walls using the current block. E.g. ‘walls 6 4 3’ will build a rectangular set of 4 walls that are 6 blocks long, 4 blocks high and 3 blocks wide. |
beacon | 1-5 | Creates a beacon of different sizes. The number is the width of the beacons in the middle. E.g. beacon 3 will create a beacon that is 3 x 3 blocks on an iron block base that is 5 x 5. |
block | 0-N | Selects the current block from the block list. E.g. ‘block 2’ will set all the current block to bricks. |
blocks | (none) | Displays a list of blocks numbers that can be used by the ‘block’ command. |
blockr | (none) | Randomises the current blocks to any blocks in the block list. Use the ‘block 0’ command to reset the blocks. |
blocku | 0-3, 1-N | |
pyr | x, z | Creates a pyramid (roof) like structure of x width using the current block. E.g. ‘pyr 20’ will create a pyramid that is 20 blocks wide at the base. This can also do rectangular based pyramids like a house roof. |
house | x, y, z | Creates a house of length x, height y and width z. Uses blocks from the block list (base, walls, window, roof). E.g. ‘house 8 3’ will create a house that is 8 blocks wide (on the outside) and 3 blocks high (not including the roof) with windows on opposite walls and a doorway. Now also contains a bed and torches. |
box | x, y, z | Creates an empty rectangular structure using the current block and no base and lighting strips in the roof. E.g. ‘box 10 7’ will create a box like structure that is 10 x 10 blocks wide and 7 blocks high. |
tpb | (none) | Teleports builder to current location. This will place blocks to indicate the location and direction the builder is facing. Red is where the builder is positioned and green is the direction it is facing. Default direction is east. |
bm | x, y, z | Moves builder blocks forward (x), up (y) and left (z). Numbers may be negative for the opposite directions. |
bt | (0, 1, -1) | Turns the builder to right (1) or left (-1). If you enter 0 or any other number it will place the position indicators so you can see where the builder is located and the direction it is facing. |
stairsUp | x, y, z | Creates a series of rectangular steps (x, z) that is y blocks high. Also clears space above each step so you can use it underground. |
stairsDn | x, y, z | Same as stairs up but goes downward instead. |
tun | x, y, z | Creates a tunnel by clearing blocks and placing a lighting strip on the roof |
tube | x, y, z | Creates a tunnels with walls, floor and ceiling with lighting strips |
cp | x, y, z | Copies blocks relative to builder location into memory. Use the paste command to clone to new location. |
ps | N | Paste (clone) blocks copied using cp command to builder location |
lab | x, z | Teleport to the lab in current territory (x and z should have values 0-15). E.g. Lab 10 10. You must be close by go to a lab. Use the where command to identify the area you are in. Use the tparea command to teleport to a different area. The lab coordinates are the same as the area coordinates that it is located within. |
tparea | x, z | Teleport to specified area in current region (x and z should have values 0-3). Each area is a 64 block wide square |
where | (none) | Shows current area, region and territory coordinates |
houseu | 1-3, 1-N | Changes specific items in the block usage list used by the code and rebuilds the house. 1-floor, 2-wall, 3-roof |
houser | 1-3 | Selects a random item from the block list to replace the component and rebuilds the house: 1-floor, 2-wall, 3-roof |
Structure Builder Code URLs
Version | URL | Notes |
---|---|---|
2.29 | https://makecode.com/_hRrgX9CJCWd8 | I’ve split this code library into 2 parts now. The lab functions have been removed (see section below). House command updated to include bed and torches. New command to update a house part (houseu) and also to randomise a part and rebuild the house (houser). Removed blockshow, compass, roof, tpbst, tpreg, tpterr and wall commands. tpb command now places a structure block where the builder is located. |
2.27 | https://makecode.com/_YPybHvALmA06 | Some more bug fixes and message additions. |
2.25 | https://makecode.com/_UAJD6EXp6FUj | Added copy list so you can copy multiple structures and paste them. Labs now have compass directions on the walls and chunk numbers written in the ground. Added pslc (paste lab chunk). |
2.24 | https://makecode.com/_3Ph43j3FEb2c | Added blockshow and blocku commands. Renamed a few others and internal cleanup. Over 1000 lines now. Others can now safely customise blocks using published block names and data values. |
2.23 | https://makecode.com/_J8jACWcd4c5v | Adding commands to copy and paste lab chunks (15×15). Labs have chunk corner indicators using glowstone. Also double walls to prevent water entry. Nearly 1000 lines of code! |
2.22 | https://makecode.com/_Js8Dkd2zE1zM | Added default values for commands and more helpful error messages. Added tpbs command to teleport builder and place structure block at the same location. Changed makelab. Added roof and agent (tp agent) command. |
2.21 | https://makecode.com/_15sfzkJUvhF1 | House command now supports width – no more square houses. Roof uses stair block and so do stairs. |
2.20 | https://makecode.com/_20XXVLcCj8r2 | Added over 40 blocks to the block list (78 now). |
2.19 | https://makecode.com/_F4yLAqVcMdpX | Added blockadd to add blocks from the agent inventory into the block list and replace commands to replace blocks in a region. |
2.18 | https://makecode.com/_X7MiiuJKY2Mj | Fixed bug with diamonds. Changed blockr to randomly select materials for floor, walls and roof. Using the block command sets the floor walls and roof to the same block (not the windows). |
2.17 | https://makecode.com/_gJVTpu4r7bUq | Added blockr command to randomise the build block |
2.16 | https://makecode.com/_PJM3i86JqWcx | Added commands and blocks to build with: builder move (bm), tp to lab (lab), beacon, tp to area (tpa), tp to territory (tpt). House now uses current block if it has been changed. |
2.15 | https://makecode.com/_dgDXzFgHvH1J | Added labcopy and labpaste commands to duplicate a whole lab. |
2.14 | https://makecode.com/_UhRetbaf40Hm | Changed build direction to be forward and to the right. Default builder direction is east. |
2.13 | https://makecode.com/_V6HJFoM7uD6j | Added blocks command to list all blocks that can be selected by the block command |
2.12 | https://makecode.com/_R8i7guXMP1YE | Changed stairs command to stairsUp and stairsDn (down) |
2.11 | https://makecode.com/_YtdeCu0hjCbM | Added makelab command to create a lab in a specific area of the current region. Removed scaff and clrarea commands. |
2.10 | https://makecode.com/_MywbrAHYFH4q | Added lab command to teleport to specific lab in current region. Removed unnecessary use of global variables and compacted code. |
2.9 | https://makecode.com/_ck2WUybHa45X | Improved clear code to handle larger volumes. Added clrarea command to clear the current area between 2 Y values. This will be used for creating labs. |
2.8 | https://makecode.com/_dAphMygUL7rM | Tube, tun and box all use lighting strips in the roof. 1 new block added to blocklist – sea lantern. |
2.7 | https://makecode.com/_KYLeud2XyTdJ | Added tube command. |
2.6 | https://makecode.com/_i1qWTiUUwdsj | Added tunnel (tun) and box commands. Modified stairs to clear blocks above each step for use underground. tpb command now uses stained glass blocks instead of carpet. |
2.5 | https://makecode.com/_M8fYAX4DUahK | Code comments and changed marka to markr to mark every area in region. Help command to show list of commands and parameters. 3 new blocks in blocklist. |
2.4 | https://makecode.com/_E4Vfs0agaeyD | Javascript version. Bug fixes and clean up. |
2.3 | https://makecode.com/_Wz2UpFiMHgXv | Fixed a few bugs |
2.2 | https://makecode.com/_ekr5hq8HTCDo | Added ‘where’, ‘marka’ and extra teleport commands: atp, rtp and ttp |
Territories, Regions, Areas and Labs
The code library introduces a few concepts designed to make collaboration with others simpler. I’ve defined 4 spaces:
- Territory: These are 1024 blocks wide and long. You can navigate between territories using the ‘tpterr’ command and providing 2 numbers which are the coordinates relative to (x=0, z=0) in the world. The coordinates can be negative. E.g. tpterr 0 -1
- Region: Within each territory is 16 regions that are 256 blocks wide and long. You can navigate between regions using the ‘tpreg’ command and providing 2 numbers which are the coordinates relative to NW corner of the territory. These coordinates are always positive numbers from (0 – 3). E.g. tpreg 0 3
- Area: Within each territory is 256 areas that are 64 blocks wide and long (16 per region). You can navigate between areas using the ‘tparea’ command and providing 2 numbers which are the coordinates relative to the NW corner of the territory. These coordinates are always positive numbers from (0 – 15). E.g. tparea 3 3
- Lab: A lab is an underground workspace that is the same size and location as each area. So if you are in area (3, 3) then the lab (3, 3) will be directly below that area (y=11). You can navigate to a lab using the ‘lab’ command and providing 2 numbers which are the same as the area (e.g. lab 3 3). You must create a lab before you can teleport there with the command ‘makelab’ (e.g. makelab 3 3).
Lab Builder Commands
Name | Parameters | Description |
---|---|---|
blocks | (none) | |
blocku | 0-3 | |
bm | x y z | Moves builder blocks forward (x), up (y) and left (z). Numbers may be negative for the opposite directions. |
bt | (0, 1, -1) | Turns the builder to right (1) or left (-1). If you enter 0 or any other number it will place the position indicators so you can see where the builder is located and the direction it is facing. |
cp | x y z | Copies blocks relative to builder location into memory. Use the paste command to clone to new location. Use the structure block for accuracy. |
cplc | x z c | Copy lab chunk. X and Z are the lab coordinates and C is the chunk number which is from 0 – 15. |
help | (none) | Displays a list of all the available command in the chat window. |
lab | x z | Teleport to the lab in current territory (x and z should have values 0-15). You may need to teleport to the area first using ‘tparea’ if you are too far away to detect the lab. |
labcopy | x z | Copy the contents of the lab into memory. Lab must not be too far away. To paste you must use the labpaste with the same x, z. |
labpaste | x z | Paste contents from lab (x, z) into the lab you are in which must be empty (i.e. no blocks on top of the centre block – glowstone). |
makelab | x z | Create the lab in a specified area of the current territory. Use lab to teleport (x and z should have values 0-15). Each lab is 64 x 64 x 20 blocks. |
ps | N | Paste (clone) blocks copied using cp command to builder location. |
pslc | N | This pastes a lab chunk from the list. N is the index number. |
tpb | (none) | Teleports builder to current location. This will place blocks to indicate the location and direction the builder is facing. Structure block is where the builder is positioned and green is the direction it is facing. Default direction is east. Use ‘bt 0’ to redisplay markers. |
tpreg | x z | Teleport to a specified region in the current territory (x and z should have values 0-3). Each region is a 256 block wide square. |
tpterr | x z | Teleport to a specified territory. Each territory is a 1024 block wide square. |
Lab Builder Code URLs
Version | URL | Notes |
---|---|---|
1.3 | https://makecode.com/_WRsFoaPWxEPW | Removed unnecessary code to make it more compact. Also made commands consistent with the structure builder code library. |
1.0 | https://makecode.com/_R40MWwWzkJEC | First version |
0 Comments