All functions can use 3 diffrent variations of position. For most examples, the first one will be used.
pos(0,0,0) - Places a block adjacent to player X,Y and Z position
posLocal(0,0,10) - Places where the player faces. It uses the parameters left/right, up/down and forward/backward. I recommend sticking to just changing the last value
world(0,0,0) - Places a block at a world coordinate (X,Y and Z)
Coordinates can be turned on in the settings.
Places a single block.
This code will create an area of gold blocks that are 10x10 and 5 high. This function has a max size of 32,768 blocks. You code will not run if you exceed this amount. No warning will be given.
Take 4 arguments
Block - The block used to fill the area
StartPos - Where to start filling in the blocks
EndPos - Where to end filling in the blocks
Fill Operation - How will the blocks be filled in (see below)
replace: Replaces every block within the specified coordinate bounds with the target block, overwriting anything that was previously there.
destroy: Replaces all blocks in the region and forces any existing blocks to drop their respective items as if they were manually broken.
hollow: Fills only the outer shell (walls, floor, and ceiling) of the 3D volume with the target block, while replacing all interior blocks with air.
outline: Fills only the outer shell (walls, floor, and ceiling) of the volume with the target block, but keeps any existing blocks inside the structure untouched.
keep: Only replaces air blocks within the selected region. Pre-existing blocks are left completely untouched.
This code will replaces all grass block with gold in a 20x20x20 area around the player. This function has a max size of 32,768 blocks. You code will not run if you exceed this amount. No warning will be given.
Take 4 arguments
newBlock- The block to place
OldBlock - The block to replace
StartPos - Start pos for the area to search for the old block
EndPos - End pos for the area to search for the old block
Clones an area and places it somewhere else in the world
This function takes 5 arguments
StartPos - Starting point of the area to clone
EndPos - End point of the area to clone
NewLocation - Where to place the cloned area
CloneMask - how to copy the area
REPLACE- Destorys all blocks in the new location with the clone blocks
MASKED- Only clones non air blocks
CloneMode - How to move the area
MOVE - Cuts and paste the cloned area
NORMAL - Copy and paste the cloned area
FORCE - Allows the clone to happy even if the regions overlap.
Warning - This code is very slow (10 seconds to create the image above)
This code will create text in the sky made out of a block of the players choice
Take 4 arguments
Message - The message to create
Block - The block to use
Pos - Where to create the message in the sky
Direction - Direction to place the sign
Check for a block at a location and returns true or false
The example checks if there is a grass block below the player and replaces it with a gold block.
Saves an area of blocks into memory. Can be loaded at any point. This can be great way to speed up placing multiple of the same structure.
This function takes 3 arguments
Structure - Name of the structure - you will need to remember this to load your structure
StartPos - Starting point of the area to clone
EndPos - End point of the area to clone
Loads a structure to a set location
This function takes 2 arguments
Structure - Name of the structure to load
pos- Where to place the structure
Deletes a structure from memory - This good practice if you make a strucutre by mistake
Note - This does not delete a structure you put in the wrong place.
This function takes 1 arguments
Structure - Name of the structure to delete