What TerraScript Can Do¶
World Manipulation¶
TerraScript has many features that allow for the manipulation of the world that include:
Setting block NBT data (Spawner NBT data, sign NBT data, etc).
Applying loot tables to inventories.
In Development
World Data Reading¶
TerraScript is also capable of reading data from the world in different ways to allow for efficient structure generation that include:
Reading location types (
AIR
,LAND
, orOCEAN
) for fast checking and spawn validation.Reading block states for slower, but more accurate checking.
Setting Marks that allow scripts to “mark” locations, then check marks later in a way that does not affect generation.
Recursive Scripting¶
One powerful capability of TerraScript is the ability to generate scripts recursively with functions to:
Invoke other scripts at offset locations within the current script, and check whether the sub-structure was successfully generated
Check the amount of recursions in the current script
Essential Language Features¶
TerraScript utilizes essential language features that include:
Example Use Cases¶
In the overworld config pack that comes pre-packaged with Terra, TerraScript is utilized for:
Vegetation features such as trees, giant mushrooms, and giant bushes for various variations.
Landform features such as boulders, fossils, and icebergs for various variations.
Dynamic block states for features such as vines, sculk, and coral fans that adjust based on surroundings.
Randomized block state stages for features such as bee nests, sea pickles, and cocoa beans.
Checking surrounding blocks for valid feature placement such as lava columns.
Note
You can take a look at the Terra Community Packs and their usage
of TerraScript in their .tesf
files typically located within a structures
folder.