trace Path
Trace the path traveled from the last marked position with the selected block type.
You can trace the ||builder:teleport to||
, ||builder:move||
,
and ||builder:shift||
builder actions with ||builder:trace path||
.
builder.tracePath(GRASS);
Parameters
- block: the type of block used to trace the path
Example
Make the builder move randomly around the player. Trace where the builder goes with gold blocks.
builder.teleportTo(pos(0, 2, 0));
builder.mark();
builder.move(FORWARD, Math.randomRange(0, 11));
builder.move(LEFT, Math.randomRange(0, 11));
builder.move(UP, Math.randomRange(0, 11));
builder.tracePath(GOLD_BLOCK);
See Also
Here’s an example project that uses the builder: Build a house.