14eredit Basic Documentation
14eredit Basic Documentation
14erEdit
Documentation
To Use This Documentation:
Command reference is at the bottom
Tables of functions, operations, IDs, variables, etc. are at the top
Italics indicate features coming in the next release. Depreciated features are being
removed as part of the upcoming v2.0.0 update.
Get 14erEdit
Table of Contents
Table of Contents
Operators
Sample operations
Macros
Operators
The new way to make modifications to the world!
Written in prefix notation; nesting is allowed. Valid operators here:
Any of the symbols are valid in the 1.15+ versions of 14erEdit. Only the first symbol is
valid in other versions.
You can use () and [] to help organize operators. They will be stripped from the operator
before it gets parsed.
Symbol Args #1 #2 #3
The cutoff value in the noise node is ignored. You must provide the correct number of
nodes equal to the number of regions.
Example usage of multinoise:
/fx br s 12 if bedrock m# 3 ## perlin 3 120 3 set white_concrete set orange_concrete
set magenta_concrete
$ macro 1 Macro
Returns true once <count> of the <total> sub-operations return true - executed in order.
Sample: /fx br s 5 if anyof 2 3 orange_concrete white_concrete at 0 1 0 not air set
stone
4
A note on conditions. Using a string prefaced with a # will target all blocks whose IDs
contain that string. For example, "#stair" will target all blocks with "stair" in their ID.
The if syntax is similar to: if <condition> <when true> [else <when false>]
: else 1 Else
operation
/* 0 Begin comment
*/ 0 End comment
When combining multiple blocks together, please connect each block with ; rather than
, otherwise it might not work.
e.g. 25%dirt;75%stone
In the block node, you can use the keyword "same" to indicate that the block should not
be changed, e.g. 50%stone;50%same
Replace a block with another block, supporting multiple blocks separated by a | symbol.
Supports all functions of a normal block node for each element.
Sample: /fx br s 5 replace gold_block|cobweb diamond_block|gravel
get_block_data
false 0
true 0
Returns true when the block's coordinate on the given axis mod base is in [low,high)
Returns true when the block's coordinate on the given axis is in (-inf,value]
To use absolute coordinates, preface the value with the letter "a".
Ex: at 0 a255 0
grav gravity 0
6
<<n get_nbt 0
/ link 2 Op 1 Op 2
x 0
y 0
z 0
set 1 Value
+ 0
inc 1 Value
mult 1 Value
8
pow 1 Value
exp 1 Value
trn 0
type 1 Type
data 1 Data
nbt 1 NBT
type 1 Text ID
name 1 Text.
Underscore
= space
lore 1 Text,
Underscore
= space,
cnt 1 Value
flag 1 Value
9
unbreak 1 true/false
dmg 1 Value
type 1 Type
name 1 Text
(supports
color)
pass 1 Monster
variable
name
tag 1 Tag
Sample operations
These make for a great starting point, and are easily
editable. As written, they will turn the item in your main
hand into a sphere brush that does as listed.
/fx undo 1
/un
Undo the last edit
/fx redo 1
/re
Redo the last thing you undid
/fx wand
Gives you a selection wand
/fx br none
Remove the brush from the current item
Macros
These are special functions that can be called as part of an operation, often to perform
even more complex functions. They are passed parameters, each in a pair of {}
appended (without spaces) to the name of the macro. Parameters are separated by
semicolons.
Note that using a macro with a brush of more than one block is undefined, and may
cause unintended behaviors. To get a one block brush, use radius 0 and radius
correction 0.5.
Macro Arguments Description
are a bigger ellipse. This must be more than double the inner-focii
distance. The larger the ratio of this to the full focal length, to more
spherical the ellipse.
❏ spike|sp <height> <base radius> [inner base size] <op> - Create a
spike/crystal brush. Spikes go both directions from the click point,
and grow both directly toward and away from the player. Setting an
inner radius will make a hollow spike.
❏ flood|fill|floodfill <max distance> <condition op> <op> - Perform a
floodfill with a maximum distance from the start of max distance
(using the shortest path of connected blocks), performing op on any
blocks that meet the condition op that are connected to the starting
block (which must also satisfy the condition op)
❏ none - Remove the brush from the currently held item
❏ br - Alias for brush
❏ wand - Give this player a wand. Right/left click to create a selection
❏ selection
❏ op <operation> - Perform the specified operation on the current
selection
❏ expand <amt> <direction> - Expand the current selection
❏ reset - Remove the selection
❏ copy - Copy the current selection to the clipboard, including NBT
❏ paste - Paste the current clipboard
❏ paste <setAir> - Paste the current clipboard, relative to the position
you had when copying. Can set to place air or not using true/false.
❏ origin <shift/set> <x/y/z> <value> - Shifts or sets the origin of the
current clipboard by the given amount along the given axis
❏ schem - Alias for schematic
❏ pos1 [x y z] - Set the first position of the selection box to the player
❏ pos2 [x y z] - Set the second position of the selection box to the
player
❏ mirror <x|y|z> - Set the mirror axes for the current clipboard (eg
mirror xy). Does not update the origin when mirroring.
❏ rotate <value> - Sets the rotation of the schematic. Takes a value
between 0 and 5 specifying the rotation.
❏ clone <xOffset> <yOffset> <zOffset> <times> <deleteOriginal> -
Clone a selection region (much like move or stack in WorldEdit).
Specify a relative offset, a number of times to clone, and if the
original blocks should be deleted or not.
❏ sel - Alias for selection
20
with flowers, and an airSpaces value of 5 with density 0.5 (half of the
blocks). Mixture is specified like the blocks in set script.
❏ overlay <radius> <block> <depth> [air] - Create an overlay brush. Defaults
to 3 blocks of air above
❏ line <block> <length> - Draw a line from the player's position in the
direction clicked, going out length blocks. Length is not exact number of
blocks, but is close.
❏ catenary <block> <droop> [step] - Create a catenary between the two
corners of the selection brush. If there are gaps, shrink the step count
from 0.01 to something smaller (but larger than zero). Droop is a magic
value, but around -35 seems to be good
❏ clone <xMin> <xMax> <yMin> <yMax> <zMin> <zMax> <xOff> <yOff>
<zOff> - Clone a box's materials (no NBT) to a location with a given offset.
Does not register an undo.
❏ operate <xMin> <xMax> <yMin> <yMax> <zMin> <zMax>- Run an
operation on an entire selection. Does not register an undo.
❏ cat - Alias for catenary
❏ cs - Alias for script
❏ un [number] - Undo a number of world edits, defaults to one
❏ re [number] - Redo a number of world edits, defaults to one
❏ run <operation> - Execute an operation without a defined region. Any world
editing operations will be centered on the player's location without the ability to
undo
❏ runat <x> <y> <z> <brush> <operation> - Simulate a brush stroke at the given
coordinates, without registering an undo.
❏ debug - Toggle the debug messages in chat
❏ error - Toggle verbose error messages
❏ confirm [number=1 | auto] - Confirm large async edits that cannot be undone
❏ cancel [number=1] - Cancel large async edits that cannot be undone
❏ async - Commands for working with the async system
❏ drop - Drop the async queue, stopping all edits in place and forcing them
to be restarted
❏ status - Query the async queue. Gets the number of remaining blocks to
process, as well as the estimated completion time.
❏ dump - Dump some more detailed stats about the async queue to the
chat.
❏ queue - Alias for status
❏ brmask <blocks, space separated> - Changes the blocks that a brush can pass
through. Default is air. Ex: /brmask air water lava
22
Each line in 14erEdit functions falls into one of five categories, each with a different
purpose:
1. Lines that are blank or only contain whitespace
a. These lines may be used for helping format the file. They will not be run.
2. Lines that start with any amount of whitespace followed by a #
a. These lines are considered comments. Anything on these lines will be
ignored
3. Lines that start with any amount of whitespace followed by a !
a. These lines are considered commands to be executed by the function file
interpreter. The formatting of these lines is as follows:
!<command> [args...]
Between the ! and the command should be no space, between the
command and args a single space, and between each arg a single space.
4. Lines that start with any amount of whitespace followed by a :
a. These lines are considered to be labels, usable in certain interpreter
commands. They will not be run.
5. Lines that have any amount of whitespace followed by other text
a. These lines will be executed by the player who ran the function as a
command. Any commands that the player would normally be able to type
in-game are valid for usage.
Special Symbols
● Template variables: $1 $2 $3 ...
There are an unlimited number of template variables. They will be replaced with
each input the player gives in the command when calling the function, split on
each space. These are substituted as the first step when running a line in the
function, before making any determination as to what should happen for this line.
● Variables: $v0 $v1 $v2 ... $v999
These are each a numeric variable comparable to a double in a standard
24
Interpreter Commands
● Player Interaction
○ setslot <slot> <item ID>
■ Set the item in the slot to the item ID. Can use an int, or hand.
○ swap <slot 1> <slot 2>
■ Swaps the contents of the two slots. Must use an int.
○ getpos <var> <dim>
■ Gets the user's coordinate for the given dimension, storing it into
var
If in an operation, returns the current block's location.
dim: x=0, y=1, z=2
○ prtdbg <text>
■ Print text to the debug output stream
○ prterr <text>
■ Print text to the error output stream
○ gettarget <var> <dim>
■ Get what the player is looking at, storing it into var.
dim: x=0, y=1, z=2
● World Interaction
25
■ Get the value from the stack, with an optional offset, and set a
variable to the value.
Invalid stack locations will return 0.
○ remove
■ Remove the topmost variable from the stack
○ getval <variable> <arg>
■ Pull a numerical value from a user argument into a variable. The
arg is an index (no $), whereas the variable is the full variable
name. Sample: !getval $v0 0
○ defaultarg <pos> <arg>
■ Sets the default value for a template arg if one was not provided.
Make sure they are set in increasing order of pos.
● Math
○ setvar <variable> [value = 0]
■ Set the variable to the value
○ rand <variable> <min> <max>
■ Set the variable to a random integer in the range [min,max)
min and max can both either be integers or variables
○ inc <variable>
■ Increase variable by 1
○ dec <variable>
■ Decrease variable by 1
○ add <var1> <var2> <dest>
■ Add the two variables and store the result in the dest variable
○ sub <var1> <var2> <dest>
■ Subtract the two variables and store the result in the dest variable
○ mult <var1> <var2> <dest>
■ Multiply the two variables and store the result in the dest variable
○ mod <var1> <var2> <dest>
■ Treat both variables like integers, and computer var1 % var2;
storing the result into the dest variable
○ div <var1> <var2> <dest>
■ Divide the two variables and store the result in the dest variable
○ sin <variable> <dest>
■ Take the sine of the variable and store the result in the dest
variable. Takes degrees
○ cos <variable> <dest>
■ Take the cosine of the variable and store the result in the dest
variable. Takes degrees
27