CC: Tweaked · Automation · Intermediate
How to Automate Strip Mining & Quarries with Mining Turtles
Manual mining is one of the most time-consuming tasks in survival Minecraft, often taking hours away from complex base building and automation. With CC: Tweaked, you can deploy programmable Mining Turtles to carve out massive quarries and strip mines completely hands-free. This guide will walk you through crafting a Mining Turtle, setting up an automated fueling and chest-dumping station, and running both built-in and custom Lua mining scripts.
What you need
- 1 Turtle (or Advanced Turtle for a color screen and mouse support)
- 1 unenchanted, undamaged Diamond Pickaxe
- 2 Chests (to form a Double Chest for loot collection)
- At least 1 stack of furnace fuel (Coal, Charcoal, or Lava Buckets)
- Basic familiarity with opening the Turtle terminal and typing commands
Step by step
1Craft and Equip the Mining Turtle
Combine your standard Turtle or Advanced Turtle with a fresh, unenchanted Diamond Pickaxe in a Crafting Table to create a Mining Turtle. Alternatively, place the standard Turtle in the world, put the Diamond Pickaxe into its selected inventory slot, and run the command `lua` followed by `turtle.equipLeft()` or `turtle.equipRight()`. Once equipped, the pickaxe is visually mounted on the side of the unit and never loses durability.
Tip: Always check JEI for the exact Turtle crafting recipe in your specific modpack, as some packs alter the core Computer recipe.
2Label Your Turtle for Data Persistence
Place your Mining Turtle on the ground and right-click it to open the CraftOS terminal. Type `label set Miner01` (or any name you prefer) and press Enter. Labeling a turtle assigns it a permanent internal ID; without a label, breaking the turtle to move it will wipe all of its saved programs and stored fuel level.
Tip: Check your current label and remaining fuel at any time by typing `label get` and `refuel` in the command prompt.
3Build the Home Station and Drop-off Chest
Choose your mining starting point and place your Mining Turtle facing the direction you want to dig. Directly behind the turtle, place two Chests side-by-side to create a Double Chest. This specific orientation is critical because both the built-in quarry script and most custom mining loops expect to turn 180 degrees at their starting coordinate (0, 0, 0) to deposit harvested blocks.
Tip: If you have storage mods installed, you can connect hoppers or item pipes to the bottom of this Double Chest to route cobblestone and ores directly into your main sorting system.
4Load Initial Fuel and Test Refueling
Open the Turtle GUI and place a stack of Coal or Charcoal into the top-left slot of its 16-slot inventory (Slot 1), ensuring the black frame highlights that slot. Type `refuel all` in the terminal to convert the entire stack into internal movement points, or type `refuel 10` to consume just ten pieces. A single piece of coal typically grants 80 movement points, while a Lava Bucket grants 1000.
Tip: Leave a spare stack of Coal in Slot 1 even after fueling; smart mining scripts will automatically consume fuel from their own inventory or freshly mined coal veins when running low.
5Run the Built-in Excavate Quarry Program
If you want an instant vertical quarry without writing code, use CraftOS's pre-installed `excavate` program. From the terminal, type `excavate 5` and press Enter to make the turtle dig a 5x5 square pit all the way down to bedrock. The turtle will automatically calculate its coordinates, return to the surface to dump items into your Double Chest when full, and resume where it left off.
Tip: Start with a small size like `excavate 3` or `excavate 4` first to verify that your chest alignment and fuel reserves are sufficient before committing to a massive `excavate 16` chunk quarry.
6Create a Custom Strip-Mining Script
To target specific ore levels (like diamond level) without digging wasteful surface dirt, create a custom horizontal tunnel script. Type `edit strip.lua` in the terminal to open the built-in text editor. Write a loop that checks fuel, digs a 1x2 tunnel forward, and tracks the distance traveled so it knows exactly how many blocks to back up.
Tip: Press the Ctrl key inside the `edit` screen to open the bottom menu, allowing you to Save or Exit using the arrow keys.
7Program the Auto-Fuel and Dig Loop
Inside `strip.lua`, add a helper function at the top: `function checkFuel() if turtle.getFuelLevel() < 100 then turtle.select(1) turtle.refuel(4) end end`. Next, write a `for i = 1, 50 do` loop that calls `checkFuel()`, executes `while turtle.detect() do turtle.dig() end`, moves forward with `turtle.forward()`, and clears the upper block with `turtle.digUp()`. Adding the `while turtle.detect()` loop ensures falling Gravel or Sand does not desynchronize the step count.
8Add the Return-to-Chest Inventory Dump Logic
Below your forward digging loop in `strip.lua`, program the return journey: `turtle.turnLeft()`, `turtle.turnLeft()`, followed by `for i = 1, 50 do turtle.forward() end`. Once back at the starting block, faces the chest, and run `for slot = 2, 16 do turtle.select(slot) turtle.drop() end` to dump all mined items while keeping your reserve coal in Slot 1 intact. Save the file, exit the editor, and type `strip` to launch your automated strip miner.
Tip: You can also move the inventory dump routine inside the main digging loop by checking `if turtle.getItemCount(16) > 0` so the turtle makes mid-run drop-offs if its 16th slot fills up early.
How it works
Every Turtle action in CC: Tweaked is governed by synchronous Lua API calls and an internal fuel counter. Breaking blocks (`turtle.dig()`), turning (`turtle.turnLeft()`), and interacting with chests (`turtle.drop()`) are completely free and consume zero energy. Only physical block-to-block movement commands—`turtle.forward()`, `turtle.back()`, `turtle.up()`, and `turtle.down()`—deduct 1 fuel point per block moved.
Because standard Turtles do not possess a global GPS coordinate sensor out of the box, mining scripts rely on dead reckoning (relative coordinate tracking). When you run `excavate` or a custom `for` loop, the script counts every successful `turtle.forward()` return value (`true` or `false`). If gravel falls in front of the turtle or a mob blocks its path, `turtle.forward()` returns `false` and the turtle stays put; wrapping movement in a `while not turtle.forward() do turtle.dig() end` check forces the turtle to clear the obstacle until the move actually succeeds, keeping its mental map accurate.
Inventory interaction works through block adjacency. When the turtle returns to its starting coordinate and faces the Double Chest, calling `turtle.drop()` checks if the block directly in front has a valid inventory capability. Instead of throwing items onto the floor as entities, the API inserts the selected stack directly into the first available chest slot, preventing item despawning and server lag.
Common mistakes
- Forgetting to label the turtle before breaking it: An unlabeled turtle resets its computer ID when broken, permanently deleting your Lua scripts and erasing thousands of points of stored fuel. Always run `label set <name>` immediately after crafting.
- Not accounting for falling Gravel and Sand: Using a simple `turtle.dig()` followed by `turtle.forward()` will fail when gravel falls into the newly vacated space before the turtle can step forward. Always use a `while turtle.detect() do turtle.dig() end` loop or check the boolean result of `turtle.forward()`.
- Letting the turtle dig outside loaded chunks: If your strip mine or quarry extends beyond your player load distance (or chunkloader radius), the turtle will enter an unloaded chunk and instantly reboot, halting its program and forgetting its relative coordinates.
- Dumping Slot 1 into the drop-off chest: If your return loop runs `turtle.drop()` across slots 1 through 16, the turtle will throw away its emergency coal stack and stall on the next trip. Always start your dump loop at Slot 2 (`for s = 2, 16 do`) and keep Slot 1 reserved for fuel.
FAQ
Does the Diamond Pickaxe on a Mining Turtle ever break?
No. Once a Diamond Pickaxe is crafted onto or equipped by a Turtle, it has infinite durability and will never wear out, though it cannot retain or use tool enchantments like Fortune or Silk Touch.
How does my turtle handle water and lava underground?
Turtles are completely immune to lava and water damage and can move right through fluid blocks without losing items or programs. In fact, if you leave an empty Bucket in its inventory, you can program it to run `turtle.place()` and `turtle.refuel()` to drink lava source blocks for 1000 free fuel points.
Why did my turtle stop moving mid-quarry with an error or stuck state?
The two most common causes are running out of fuel or hitting an unbreakable block (like Bedrock or a claimed chunk boundary), or having an entity (like a Bat or Zombie) standing directly in its path. Use `turtle.attack()` in your movement validation loop to clear mobs that block movement.
Can I recover a turtle that stalled deep inside a 1x2 tunnel?
Yes, either dig down the 1x2 tunnel to retrieve it manually, or craft a Wireless Pocket Computer and a Wireless Mining Turtle so you can transmit remote return commands over Rednet.
By labeling your Mining Turtle, pairing it with a home drop-off chest, and using obstacle-safe movement and fueling loops, you can automate both deep quarries and targeted diamond-level strip mines with minimal resource investment.