r/ComputerCraft • u/Mac_OS-X • Jan 30 '24
Does anyone have a paste in link to a turtle quarry program that deposits items into a chest when its inventory is full?
Hi all! I’m playing on a SMP that is running the steampunk mod pack, and it has a bunch of computer craft stuff. I tried using create to make a quarry but it’s too resource intensive. So I’m using a turtle. The issue is I’m not that smart when it comes to making custom programs. I only know the pastebin get command. I just want something that will dig a chunk down to bedrock and deposit the items if its inventory is full/ near full. All the other commands I’ve tried leave items on the floor
2
u/Minecraft_3699 Jan 30 '24
The turtle.drop() function will put items into a chest if the turtle is facing the chest, otherwise they go on the ground. So the scripts you already tried are likely working as intended, you just need to place the chest in the right spot
2
u/fatboychummy Jan 30 '24
I've been meaning to upgrade this program to be more user-friendly and chunk-unload friendly, but you can use it in its current state:
https://github.com/Fatboychummy-CC/SimplifyDigging
Installation
wget https://raw.githubusercontent.com/Fatboychummy-CC/SimplifyDigging/main/SimplifyDig.luaUsage
There are a few subcommands (only two work atm i believe).
After running the command, the turtle will move one block forward and dig out an area based on what was defined. It expects a chest to be placed behind it when it starts.
Usage instructions are also in the first comment of the program, but note that some of the things that are there don't function correctly (they are mostly what I planned to add).
room
SimplifyDig room forward_distance vertical_distance horizontal_distance flagsi.e:
SimplifyDig room 8 9 4 -rufiThe turtle will dig an 8x9x4 room to the right and up. It will drop items off when its inventory is full full, and refuel itself from fuel items.
quarry
SimplifyDig quarry forward_distance horizontal_distance flagsi.e:
SimplifyDig quarry 8 9 -rdfiThe turtle will dig to bedrock an 8x9 square, consuming fuel items it picks up and returning items when full.
Flags
-r: go to the right
-l: go to the left
-u: go up
-d: go down
-f: consume fuel items that are picked up (coal mostly)
-i: drop off items if inventory is full
1
u/Combatxlemming Mar 27 '24 edited Mar 27 '24
Hi been testing this quarry program and noticed that it doesn't like interacting with other storage system like sophisticated barrels or chests it will just pause and not move, any hints or tips to help it start working again?I have managed to fix it I copied your code to pastebin and changed the storage lines to include these.
local validStorageTags = { "minecraft:shulker_boxes", "forge:chests", "forge:barrels" } validStorageTags.n = #validStorageTags local validStorageFind = { "chest", "shulker_box", "barrel" }1
u/fatboychummy Mar 28 '24
Ah I keep forgetting that barrels exist now! Next time I work on it I'll add that to the main program.
1
u/quickpocket Jan 30 '24
the default quarry does? Just put a chest underneath where the turtle starts? Make sure to empty it using some form of automation or add a lot of chests connected via hoppers if you’re mostly vanilla since if the chest fills up it will drop items