Building.
td.build places a layered blueprint, bottom to top, from one block above each layer. When it runs short of a block it fetches more from your storage and comes back.
Blueprints.
A blueprint is a table with two fields:
palette: character to block id, e.g.{ ["B"] = "minecraft:stone_bricks" }.layers: a list of layers from bottom to top. Each layer is a list of row strings. Rows run away from the turtle (the first row is the one it starts in), and the characters of a row run to its right.
A character that is not in the palette, such as "." or a space, leaves that cell alone. The turtle starts on the bottom-front-left cell of the build: layer 1 is at its own level, and it works standing one block above each layer, placing downwards.
td.build.
Build a blueprint. A cell that already holds the right block is skipped. Blocks from the palette stay on board when the job unloads. A protected block in the way stops the build.
Returnstrue, or false, reason. Raises "bad blueprint" if palette or layers is missing.
namestringdefault "Build"Job name shown in the Console.fromLayernumberdefault 1Resume at this layer (1-based).skipExistingtrue | falsedefault falseLeave any block already in a cell. Without it, a different block is dug out and replaced.pauseEachLayertrue | falsedefault falseWait after each layer (not the last) until the deck says continue, e.g. so modems can be clicked.returnHometrue | falsedefault trueCome back to the start and unload afterwards.dropJunktrue | falsedefault falseWhen the inventory fills, drop junk blocks before unloading.
Restocking.
Before each layer the turtle counts what that layer needs against what it carries. When it is short:
- It goes to the shared supply chest set on the deck, or home if there is none. With neither the build stops.
- It puts junk from its inventory into that chest, then asks the relay for the missing blocks plus a few spare. The relay asks the world's storage station to deliver them into the supply chest.
- It takes what arrives and goes back to the build. If the blocks have not all arrived after two minutes, the build stops and says what is missing.
If another turtle is at the supply chest it waits its turn. See Build crews for builds shared between turtles.
Upgrading barrels.
Walk a width by length area one block above a barrel layer, replacing every from barrel below with to. Each barrel is emptied through the carried ender chest, broken, and the new one placed. Short of new barrels, it restocks like a build.
This needs the walkway layout of the storage tower built from the deck, where every barrel layer stays reachable from the open layers above it.
Returnstrue, or false, reason.
fromblock iddefault "sc-goodies:iron_barrel"The barrel to replace.toblock iddefault "sc-goodies:diamond_barrel"The barrel to put in its place.enderitem iddefault "sc-goodies:ender_storage"The ender chest to empty barrels through. It must be on board, linked to the deposit chest.widthnumberdefault 10Columns to the turtle's right, counting its own.lengthnumberdefault 10Rows away from the turtle, counting its own.