Skip to content
Shylie edited this page Jan 31, 2021 · 7 revisions

A basic intro to Fullcircle

A spell is an instance of a VM executing bytecode compiled from terracotta blocks in-world representing a stack-based language. Each spell begins with a and proceeds to read blocks in a line based on the direction the caster was facing when casting the spell. Instructions are then read down the line and processed with the following meanings (Operation (Blocks) - Description of stack modification ║ Stack before 🠪 Stack after):


NEGATE () - Negates the top value on the stack

…, NumberValue 🠪 …, NumberValue

ADD () - Adds the top two values on the stack

…, NumberValue (2) 🠪 …, NumberValue

SUBTRACT () - Subtracts the top value from the value below it on the stack

…, NumberValue (2) 🠪 …, NumberValue

MULTIPLY () - Multiplies the top two values on the stack

…, NumberValue (2) 🠪 …, NumberValue

DIVIDE () - Divides the second-top-most value on the stack by the top value on the stack

…, NumberValue (2) 🠪 …, NumberValue

DUPLICATE () - Duplicates the top value on the stack

…, Value 🠪 …, Value (2)


VECTOR NEGATE () - Negates the top three values on the stack

…, NumberValue (3) 🠪 …, NumberValue (3)

VECTOR ADD () - Adds the top six numbers on the stack in pairs (as if they were two 3D vectors)

…, NumberValue (6) 🠪 …, NumberValue (3)

VECTOR SUBTRACT () - Subtracts the top six numbers on the stack in pairs (as if they were two 3D vectors)

…, NumberValue (6) 🠪 …, NumberValue (3)

VECTOR MULTIPLY () - Multiplies the top six numbers on the stack in pairs (as if they were two 3D vectors)

…, NumberValue (6) 🠪 …, NumberValue (3)

VECTOR DIVIDE () - Divides the top six numbers on the stack in pairs (as if they were two 3D vectors)

…, NumberValue (6) 🠪 …, NumberValue (3)

VECTOR DUPLICATE () - Duplicates the top three values on the stack, preserving order (as if it was a 3D vector)

…, NumberValue (3) 🠪 …, NumberValue (6)


RAYCAST BLOCK POSITION () - Performs a raycast given the position (second vector from top) and look (top vector) and pushes the found block position (if succeeded) to the stack, followed by a 0 for success and 1 for failure.

…, NumberValue (6) 🠪 …, NumberValue (4)

RAYCAST BLOCK SIDE () - Performs a raycast given the position (second vector from top) and look (top vector) and pushes a vector representing the side of the block looked at (if succeeded) to the stack, followed by a 0 for success and 1 for failure.

…, NumberValue (6) 🠪 …, NumberValue (4)


ENTITY POSITION () - Pushes the position of the entity on the top of the stack to the stack

…, EntityValue 🠪 …, NumberValue (3)

ENTITY EYE POSITION () - Pushes the eye position of the entity on the top of the stack to the stack

…, EntityValue 🠪 …, NumberValue (3)

ENTITY LOOK () - Pushes the look vector of the entity on the top of the stack to the stack

…, EntityValue 🠪 …, NumberValue (3)

ENTITY LOOKED AT () - Pushes the entity looked at by the entity on the top of the stack to the stack

…, EntityValue 🠪 …, EntityValue


CASTER () - Pushes the entity that casted the spell to the top of the stack

… 🠪 …, EntityValue


PAUSE () - Pauses execution of the spell

…, NumberValue 🠪 …

ADD MOTION () - Adds motion to the entity specified

…, EntityValue, NumberValue (3) 🠪 …

SPAWN ENTITY () - Summons the entity via registry name (eg, minecraft:cow) at the specified position

…, StringValue (2), NumberValue (3) 🠪 …, EntityValue

CREATE EXPLOSION () - Creates an explosion that does not destroy blocks with size specified on the top of the stack and position beneath that

…, NumberValue (4) 🠪 …

MOVE BLOCK () - Moves the block at the second vector on the stack by the delta vector on the top of the stack

…, NumberValue (6) 🠪 …

MODIFY ENTITY NBT () - Sets the entity's NBT data

…, EntityValue, NBTValue 🠪 …


Valid NBT types

Formatted as type (fullcircle type) are any of the following:

  • byte (NumberValue)
  • short (NumberValue)
  • int (NumberValue)
  • long (NumberValue)
  • float (NumberValue)
  • double (NumberValue)
  • string (StringValue)
  • nbt (NBTValue)

NEW NBT () - Pushes a blank NBTValue to the stack

… 🠪 …, NBTValue

NBT GET () - Gets a value from a NBT tag and pushes it to the stack. Uses . to indicate nested NBT, such as Item.Count for {Item:{Count:1b}}

…, NBTValue, StringValue 🠪 …, Value

NBT SET () - Sets a value on a NBT tag of the given type, keeping the NBT tag on the stack. Uses . to indicate nested NBT, such as Item.Count for {Item:{Count:1b}}

…, NBTValue, StringValue (value location), StringValue (value type), Value 🠪 …, NBTValue


can be any of

CONSTANT () - Pushes a number constant to the stack

… 🠪 …, NumberValue

CONSTANT LONG () - Pushes a number constant to the stack (has more digits than CONSTANT)

… 🠪 …, NumberValue

CONSTANT DOUBLE () - Pushes a floating-pointe number to the stack with the last two numbers after the decimal place

… 🠪 …, NumberValue

STRING () - Pushes a string to the stack - right click with a named piece of paper to change the string

… 🠪 …, StringValue


RETURN () - Ends program execution


can be any of

LOAD () - Loads the value at register and pushes it to the stack

… 🠪 …, Value

VECTOR LOAD () - Loads the 3 values at vector register and pushes them to the stack

… 🠪 …, Value (3)

STORE () - Stores the value on the top of the stack into register and pops it from the stack

…, Value 🠪 …

VECTOR STORE () - Stores the top three values of the stack into vector register and pops them from the stack

…, Value (3) 🠪 …


REDIRECTION () - Redirects execution in the direction of the arrow on the top of the block's texture.

… 🠪 …

IF () - Pops the top value on the stack and turns execution to the left if negative, continues straight if zero, and turns execution to the right if positive.

…, NumberValue 🠪 …


KEY

: White glazed terracotta

: Orange glazed terracotta

: Magenta glazed terracotta

: Light blue glazed terracotta

: Yellow glazed terracotta

: Lime glazed terracotta

: Pinkglazed terracotta

: Gray glazed terracotta

: Light gray glazed terracotta

: Cyan glazed terracotta

: Purple glazed terracotta

: Blue glazed terracotta

: Brown glazed terracotta

: Green glazed terracotta

: Red glazed terracotta

: Black glazed terracotta

: any of the following:

Clone this wiki locally