This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
NearEDGE's profile picture

DigCubeArea | A Cube Mining Program | NearEDGE

Started by NearEDGE, 08 May 2017 - 04:06 AM
NearEDGE #1
Posted 08 May 2017 - 06:06 AM
Hey Folks!

I'm pretty new to ComputerCraft, but I've been dabbling with it more recently.

A few days ago I downloaded a cube mining program from another user on here and I really did not have a fun time with it.

Being the somewhat impatient person that I am, I just took matters into my own hands and decided to create my own cube miner, and I figured I'd share it as well!


https://pastebin.com/NJBXZQ6c
https://pastebin.com/P0yThxen


pastebin get NJBXZQ6c NearEDGE-Functions
pastebin get P0yThxen DigCubeArea

This is split across two files, one only has a collection of functions that this program uses but are general enough to be utilized by any program that would need similar functions. This exists mainly for me as a way to have semi-modular coding practices, and is just a thing I do.

The other file, DigCubeArea, is the actual cube miner itself and the program you'll want to call to have it do work.

I'd love to know what you all think about it, and if there are any bugs.
buzzawak #2
Posted 28 May 2017 - 12:43 PM
dofile("NearEDGE-Functions") error returned file not found. :huh:/>
Lupus590 #3
Posted 28 May 2017 - 07:46 PM
dofile("NearEDGE-Functions") error returned file not found. :huh:/>

pastebin get NJBXZQ6c NearEDGE-Functions
pastebin get P0yThxen DigCubeArea
buzzawak #4
Posted 04 June 2017 - 01:44 AM
Sorry, Cant get it working. Pastbin was successful then try running DigCubeArea and nothing.
Lupus590 #5
Posted 04 June 2017 - 04:58 PM
did you save the file with the name instucted? are the two files in the same folder? try placing both files at root.
buzzawak #6
Posted 08 June 2017 - 05:00 AM
did you save the file with the name instucted? are the two files in the same folder? try placing both files at root.

Yes made sure the files were named as instructed and place then with all the other computercraft LUA programs.
I ended up getting it working by pasting the functions from NearEDGE-Functions into the DigCubeArea code itself.
It dug a 5x3x3 cube ok but then I got it to do a 200 depth by 5 wide by 3 high I got this instead and the turtle decided not to RETURN !

Edited on 08 June 2017 - 03:20 AM
Lupus590 #7
Posted 08 June 2017 - 11:22 AM
I see you have a disk drive, have you tried running it with the programs on the turtle's internal storage?

200 is quite far, perhaps it is a chunk loading problem?
Edited on 08 June 2017 - 09:32 AM
buzzawak #8
Posted 11 June 2017 - 11:46 AM
I see you have a disk drive, have you tried running it with the programs on the turtle's internal storage?

200 is quite far, perhaps it is a chunk loading problem?

Hi Lupus590, no have not tried running from the turtles memory.
Will give it a miss I don't like how it does its pattern.