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

Self-Replicating Turtle - Revisited

Started by Inksaver, 10 May 2014 - 08:46 AM
Inksaver #1
Posted 10 May 2014 - 10:46 AM
******** New version (Dec 2018) uploaded to pastebin now using the url given before********
The 2014 version has been moved to https://pastebin.com/JVD1RPfg


Hi All

My first post here, so treat me gently.

In sept 2012 this post: http://www.computerc...62-competition/ launched a competition to create a self-replicating turtle.

It appears nobody ever completed it, but it caught my interest, as I run a computer club at my son's school, and looked to be a topic worth investigating.

I started 6 months ago, having never even heard of Lua, let alone used it, but I am fairly proficient with VB6

I finally have a Lua script working. It is >11,500 lines long, uses classes, objects, functions (and recursive functions) and follows most of the rules in the original post:
Competition Rules
Competition rules:

To be provided as a zip file, attached to a post on this thread.
Must contain a single directory with a unique name.
Extracted files may not exceed 1MB.

Code is on pastebin: http://pastebin.com/2Zf5an8H
The filesize is 385kB

The zip file will be extracted in /rom, so if your directory is "foo" your files will be under /rom/foo.
The "start" program in that directory will be run. In above example, would run /rom/foo/start

For ease of use the file is called "start.lua" so that it looks pretty when using Notepad++ to edit.
It is placed in the windows directory %appdata%.minecraft\saves\SaveName\computer\0\start.lua, where
SaveName is the name of your world, and 0 is the number of the turtle you are using.


Starting/running conditions:
EDIT: By popular demand, environment will be vanilla Minecraft, ComputerCraft 1.42 and a chunk loader

Computercraft 1.58 used, no chunk loader used, as turtle stays within 33 X 33 block
Player will neither help nor deliberately obstruct the turtle.

When starting the script, coordinates are input, but that is it. This is vital while debugging, to track the position of errors
Player may end up in turtle's movement path, but will not deliberately do so.

Player just gets attacked until he moves Mobs are attacked, if in the way, until they leave or get destroyed.

Challenge:

A crafty mining turtle starts at base of a normal tree in a large oak forest.

You can start on Oak, Birch or Jungle tree, and have two of the above in the harvesting area (33 x 33) The script handles 2 types of wood and saplings


The starting tree will be at least 6 blocks tall.

If the tree has branches or is a 2X2 jungle tree, recursive functions harvest most of the available wood.


There will be at least one other tree trunk within 8 blocks of the starting tree.

Just 2 trees would not be enough. Generally placing in a forested area is required.
There will be water and at least 6 sand within 16 blocks of the starting tree.
ADDED: To enable programming more turtles without any other mods, one sugar cane will be planted by the

sand/water. This will be within a 33x33 area centred around the starting tree (known safe from chunk

unloading). This will not be a naturally spawned cane (don't want to be searching for days).

Run in creative mode, so build a cane with 5 blocks, no need to wait for it to grow.

A Railcraft World Anchor will be placed in the air above the trunk of the starting tree.

Not required

Turtle should not break this

Not applicable

Turtle should stay within a 3x3 chunk area to avoid being unloaded. 16 horizontal blocks in any

direction from the starting tree will be known safe.

Done


Base goal:

Turtle must acquire all the resources it needs to operate by itself.

Done

Turtle must place a torch near its starting location by full dark.

One torch placed to the right of starting point, with a furnace above the start point. As tree harvesting continues, a second torch is placed to the left.

Turtle must check this torch before nightfall every day, and replace it if missing.

The turtle passes through the torch on every harvest run (10 in all) and replaces it if missing.
Also diamond mining is done in 4 levels, each level in 8 sectors, with a return to base after each sector
Turtle must acquire all the resources required to build additional crafty mining turtles.

Done

Must craft two crafty mining turtles, and place them in a chest near the starting location.

Two created if 6 or more diamonds are discovered, else only one is made. They are placed on top of and to the right of a disk drive, which copies the file start.lua over to them, and sets their labels to Miner2 and Miner3. Placing in a chest would be a very simple procedure, but it looks better with them all grouped together.

Must place a sign over that chest reading "Complete" when and only when this goal has been met.

The sign reads "mission Complete", but easily altered if needed, and is placed below Miner1

Youtube VideosEpisode 1

[media]http://www.youtube.com/watch?v=Y1wAB_swnhU[/media]

Episode 2

[media]http://www.youtube.com/watch?v=OVjlZO_mK5g[/media]

Episode 3
[media]http://www.youtube.com/watch?v=kfYBXgUbNs8[/media]

Episode 4
[media]http://www.youtube.com/watch?v=kz74v3_5cjg[/media]

Episode 5
[media]http://www.youtube.com/watch?v=3G4xd-YUMiA[/media]

Episode 6
[media]http://www.youtube.com/watch?v=MgU2HAdRaOU[/media]

Episode 7
[media]http://www.youtube.com/watch?v=fcjquZtlJes[/media]

Episode 8
[media]http://www.youtube.com/watch?v=qpA4iKT-UHk[/media]

Episode 9
[media]http://www.youtube.com/watch?v=IMS0c3M92Y8[/media]

Episode 10
[media]http://www.youtube.com/watch?v=H0bs9PkEGpg[/media]

Episode 11
[media]http://www.youtube.com/watch?v=N0SnhSaCKcU[/media]

Episode 12
[media]http://www.youtube.com/watch?v=nZkfmQZESrM[/media]

Episode 13
[media]http://www.youtube.com/watch?v=PvSp48f0XFs[/media]

Episode 14
[media]http://www.youtube.com/watch?v=xC6X3H1hetY[/media]

Brief description: the first tree is harvested, a cobble base camp is constructed with a furnace in the centre, then the trees in a 33 X 33 area are harvested, with mineshafts dug down to level 40 at the end of each run to get coal and ironore only.
When enough saplings are available (min 5) a treefarm is constructed to provide fuel or wood in the future.
When complete a single deep mineshaft goes down to level 14 and 2 corridors are dug in a cross shape centred on the original tree. (2 blocks high to allow player to explore). This is repeated on level 10 and level 7.

Each quarter of the cross shape is mined in two halves, by completely removing all blocks, and placing cobble on the ceiling to create 3 chambers 33 x 33 x 2. This method is faster than strip mining, where the constant turtle rotation to check walls takes longer than simply removing it. The final layer to bedrock is mined vertically.


For anybody who wants to get started, here is an easy method:

First VERY IMPORTANT!

Open this file in notepad:
"%appdata%\.minecraft\config\ComputerCraft.cfg"

in 'general' section find:
"# The disk space limit for computers and turtles, in bytes"
Change the following line to:
"I:computerSpaceLimit=10000000"
That is a tenfold increase in size.
find:
"# The disk space limit for floppy disks, in bytes"

Change the following line to:
"I:floppySpaceLimit=500000"
Save and re-start Minecraft

if you do not do this, the file start.lua is too big to copy to a floppy disk, and the logFiles produced by the script to debug can run to 6MB or more in the computerSpaceLimit. This will cause the script to fail.
I have tested a number of worlds to try out the script:

IMPORTANT - Choose or create a tree with a minimum of 6 logs, otherwise you are likely to run out of fuel!

Sample Worlds———Option 1 Birch and Oak forest—–
single player
create new world
world name: oakforest
game mode creative
more world options: seed = oakforest
F3 to get coordinates visible
sugar cane at: 151,63,282
place 5-6 block high sugar cane on the sand

move to 162,67,282 facing 3 (birch tree)
place crafty mining turtle
right-click
label set Miner1 >- Enter
edit test >- Enter
ctrl - save >- Enter
ctrl - exit >- Enter
Windows explorer:
put start.lua in oakforest/computer/0/start.lua
delete oakforest/computer/0/test
copy game save file: oakforest - Copy

This completes in 2hours 50 minutes

By making a backup copy of the world, you can always delete the original and start again if any errors occur. The logfiles are essential for debugging, and are created in the same directory

——–Option 2 Branched Oak and Birch——
create new world
world name: largebirchforest
game mode creative
more world options: seed = largebirchforest
F3
move to:
tree at: -3, 63, 298
turtle at: -2, 63, 298
standing at: -1, 63, 298
sugar cane at: 8, 62, 291
place crafty mining turtle
right-click
label set Miner1
edit test
ctrl - save
ctrl - exit
Windows explorer
put start.lua in largebirchforest/computer/0/
delete largebirchforest/computer/0/test
copy game save file: largebirchforest - Copy

———Option 3 JUNGLE and OAK———-
create new world
world name:Self Replicating Turtle
game mode creative
more world options: seed = Self Replicating Turtle
F3
move to:
sugar cane at: -176, 63, 116 on sand, next to water
move to:
tree at: -173, 65, 103 (jungle tree, place on right side, as dirt at base on left side)
turtle at: -173, 65, 104 facing North
standing at: -173, 65, 105 facing North
place crafty mining turtle
right-click
label set Miner1
edit test
ctrl - save
ctrl - exit
Windows explorer
put start.lua in: Self Replicating Turtle/computer/0/
delete: Self Replicating Turtle/computer/0/test
copy game save file: Self Replicating Turtle - Copy

———Option 4 Oak and Birch————

create new world
world name:Oak Tree
game mode creative
more world options: seed = Oak Tree
F3
move to:
sugar cane at: -137, 66, 134 on sand, next to water
move to:
tree at: -132, 67, 140 (oak tree)
turtle at: -131, 67, 140 facing West
standing at: -130, 67, 140 facing West
place crafty mining turtle
right-click
label set Miner1
edit test
ctrl - save
ctrl - exit
Windows explorer
put start.lua in: Oak Tree/computer/0/
delete: Oak Tree/computer/0/test
copy game save file: Oak Tree - Copy
download script from: http://pastebin.com/2Zf5an8H
Current Pastebin updated to Version 1.1.1
Jul 17 2014 12:18 GMT

As updates are put on Pastebin, I will post again in this thread
Edited on 09 December 2018 - 05:13 PM
H4X0RZ #2
Posted 10 May 2014 - 01:05 PM
That's AMAZING!!
Cozzimoto #3
Posted 10 May 2014 - 05:51 PM
DAM, someone actually did it, dude congrats! +1
viluon #4
Posted 10 May 2014 - 06:14 PM
Well, this seems… AWESOME! Great job! (+1)
Inksaver #5
Posted 12 May 2014 - 09:52 PM
Thanks for the comments guys.

All videos uploaded from start to finish, heavily edited and annotated to keep them short.

Any improvements to the script would be appreciated. After all I am still a beginner!

Would it be presumptuous to post a tutorial for the whole script in the tutorials section?
(It looks like most of the tutorials there are by experts in LUA.)
I have learned a lot about classes, objects, functions etc. from the 8 months I have been working in this script, and would love to pass the knowledge on.

Enjoy
TurtleHunter #6
Posted 13 May 2014 - 02:24 AM
On every run i get this error in different moments: Start.lua: 2779: Slot number 0 out of range

it appears to be when the turtle is behind the furnace with the chest on the bottom and tries to craft something

Logs(same run):
pastebin.com/vSJcH4f8
pastebin.com/7EzfeX5p
pastebin.com/Bby0kB4y
pastebin.com/WMCwNKPN


edit: wrong ones

EDIT: seems i cannot replicate anymore…
Edited on 13 May 2014 - 02:20 AM
flaghacker #7
Posted 13 May 2014 - 11:51 AM
After all I am still a beginner!
No. You're really not.

Would it be presumptuous to post a tutorial for the whole script in the tutorials section?
(It looks like most of the tutorials there are by experts in LUA.)
I have learned a lot about classes, objects, functions etc. from the 8 months I have been working in this script, and would love to pass the knowledge on.
I would really love a tutorial!
Edited on 13 May 2014 - 09:51 AM
theoriginalbit #8
Posted 13 May 2014 - 01:07 PM
Wow really nice work! I doff my cap to you sir, 'tis truly fine work you've done there…

if i were to pick on anything code wise it would be your lack of local variables/functions, they are a little more efficient and it means once the program stops running the global scope isn't littered with variables from your program, otherwise there's nothing too major I can see that I would say you could improve. you could probably shorten the script a little by removing non-essential comments (for example, commented out test code)

as to your question about tutorials, I feel like you'd be fine to write one up, you seem to have the expertise and intellect to be able to make an intelligent tutorial with good and thorough explanations. :)/> I think potentially doing a tutorial of the whole script could turn out a little long, I'd probably say as a rule of thumb I wouldn't go much longer than the tutorials posted by Lyqyd or myself, due to the fact of the young audience we have here on these forums the attention span isn't always there to accompany long tutorials, also keeping it basic as as dumbed down as possible could be beneficial due to the wide range of programmatic skills we have here too, even referring them to read tutorials from the Ask a Pro renewal series to lessen your work while still providing them with the information.
Edited on 13 May 2014 - 11:09 AM
Inksaver #9
Posted 13 May 2014 - 03:02 PM
@TurtleHunter
post the seed of your world, along with the coordinates of the tree you are starting from, and the direction facing, and I will see if I can sort the problem

@flaghacker
Tutorial started

@theoriginalbit
Thanks very much for your constructive criticism. I have started to change the functions to local, and clear out some of the unused code.
Regards tutorials, the club I run is for 12 to 16 yrs, and I know exactly what you mean regarding attention span of that age group! I will post one soon to see how it goes down, and take it from there.
TurtleHunter #10
Posted 13 May 2014 - 03:32 PM
@TurtleHunter
post the seed of your world, along with the coordinates of the tree you are starting from, and the direction facing, and I will see if I can sort the problem

@flaghacker
Tutorial started

@theoriginalbit
Thanks very much for your constructive criticism. I have started to change the functions to local, and clear out some of the unused code.
Regards tutorials, the club I run is for 12 to 16 yrs, and I know exactly what you mean regarding attention span of that age group! I will post one soon to see how it goes down, and take it from there.
I used the seed from the option 4, i think that it is because i give him saplings manually(when it haves one or more alredy)
Edited on 13 May 2014 - 01:33 PM
Inksaver #11
Posted 13 May 2014 - 04:12 PM
If you change anything manually, the script will not recognise what you have put in , so best not to interfere once it is running. I will re-run option 4 later, in case I missed something, or worse, created another problem by solving something else!
TurtleHunter #12
Posted 13 May 2014 - 09:16 PM
If you change anything manually, the script will not recognise what you have put in , so best not to interfere once it is running. I will re-run option 4 later, in case I missed something, or worse, created another problem by solving something else!
Also another bug: you cant put it on a dir cause it will crash when trying to copy itself to the floppy
Inksaver #13
Posted 13 May 2014 - 09:25 PM
Also another bug: you cant put it on a dir cause it will crash when trying to copy itself to the floppy

You DID change the config file:
"I:floppySpaceLimit=500000"
?

otherwise it will crash
TurtleHunter #14
Posted 13 May 2014 - 09:30 PM
Also another bug: you cant put it on a dir cause it will crash when trying to copy itself to the floppy

You DID change the config file:
"I:floppySpaceLimit=500000"
?

otherwise it will crash
I did, the thing is that you suppose that the file is named start.lua and that its not on a dir like in line 3275. You should use shell.getRunningProgram and shell.resolveProgram to get the absolut path to the file

and just in case i have a chickenchunks chuck loader 3 blocks up of the starter tree with a radius of 3 chunks
Edited on 13 May 2014 - 07:37 PM
Inksaver #15
Posted 13 May 2014 - 10:24 PM
The creation of a copy of start.lua to a floppy disk, then from there to new turtles has not caused any errors with the worlds I have used it on so far.
Now you have highlighted a problem, I will need to investigate it.
The line you are referring to is:

startFile.writeLine('fs.copy("/disk/start.lua", "start.lua")')
Could you use windows explorer to see what you have in there is similar to this:
0 is the original turtle Miner1
1 is Miner2
2 is Miner3
disk

disk contains:
0
which has:
minerList.txt
start.lua
startup

Bear in mind the line quoted above is not a line of code run by start.lua. It is a line of text written to a file called startup
So it is only when startup is run by either Miner2 or Miner3 when they are activated.
Edited on 13 May 2014 - 08:30 PM
TurtleHunter #16
Posted 13 May 2014 - 10:52 PM
The creation of a copy of start.lua to a floppy disk, then from there to new turtles has not caused any errors with the worlds I have used it on so far.
Now you have highlighted a problem, I will need to investigate it.
The line you are referring to is:

startFile.writeLine('fs.copy("/disk/start.lua", "start.lua")')
Could you use windows explorer to see what you have in there is similar to this:
0 is the original turtle Miner1
1 is Miner2
2 is Miner3
disk

disk contains:
0
which has:
minerList.txt
start.lua
startup

Bear in mind the line quoted above is not a line of code run by start.lua. It is a line of text written to a file called startup
So it is only when startup is run by either Miner2 or Miner3 when they are activated.
You dindt undesrtand me :P/>, I downloaded your file as start/start.lua and it crashed because it didnt find start.lua in / cause it was on /start, you should detect the path of your file to copy it to the disk, its a pretty simple fix
cptdeath58 #17
Posted 13 May 2014 - 11:20 PM
Dude… How did you do this…
This is freaking awesome
Edited on 13 May 2014 - 09:20 PM
TurtleHunter #18
Posted 13 May 2014 - 11:59 PM
Crash: Turtle has full inventory and is trying to craft something. The error was Slot 0 out of range

logs: pastebin.com/wyY8Lkmy
pastebin.com/gPrWfTfg
pastebin.com/BU9vJEQ1
pastebin.com/FH2UEffg

Screenshots: http://imgur.com/a/5FEH0

Im the bug hunter :P/>
Edited on 13 May 2014 - 10:08 PM
darkrising #19
Posted 14 May 2014 - 01:02 AM
Really nice, I like!

Not to be a dick or anything but Lua is not an acronym it actually means "moon" in Portuguese so you don't have to write it in caps :)/>
theoriginalbit #20
Posted 14 May 2014 - 01:21 AM
@theoriginalbit
Regards tutorials, the club I run is for 12 to 16 yrs, and I know exactly what you mean regarding attention span of that age group! I will post one soon to see how it goes down, and take it from there.
we've had people as young as 6 (iirc) on these forums before. and obviously making it even more difficult when they're ESL ;)/>

I do agree with TurtleHunter, I'd probably use a dynamic method, although you don't really need to use shell.resolve, just shell.getRunningProgram
if you wanted to get really tricky you'd also use fs.getName so that when you continue to create the new programs they're still named the same as what the original user specified.

Example

if disk.isPresent("bottom") then
  local filepath = shell.getRunningProgram()
  local filename = fs.getName(filepath)
  fs.copy(filepath, "/disk/"..filename)

  -- snip --

  startFile.writeLine('fs.copy("/disk/'..filename..'", "'..filename..'")')

  -- snip --
end

if you wanted to be even more clever about it you could also use disk drive detection and getting its mount path as a just in case, but you shouldn't really need it in this instance.
Edited on 13 May 2014 - 11:45 PM
Inksaver #21
Posted 14 May 2014 - 07:57 AM
@TurtleHunter
Thanks for posting the problem area. I have only looked at the image so far, and it is the presence of flint that is worrying me. the dig.digNew{} method should have identified and disposed of flint, and you never see it in the inventory, so I need to refine it. Also sticks and signs are still in the inventory because storageSigns and storageSticks chests have not yet been created and placed. I will perhaps change the code so that signs cannot be crafted until a storage chest has been placed.

@originalbit
Thanks also to the for the ideas concerning the file system. These will definitely be implemented. I am a bit OCD with code, and I like to anticipate any and all possibilities.

@darkrising
You are of course correct. lua means moon, and as it has been adopted as a proper noun to name the OS, then Lua with capitalisation on the first letter is the correct way of writing it. You will not see it again in all caps from me, and when I next edit my posts, it will be corrected.Nice to see others are also OCD…

First part of the tutorial has been written, should be uploading to the tutorials forum later today.
Inksaver #22
Posted 15 May 2014 - 12:36 PM
The problem highlighted by TurtleHunter shows how useful a logfile can be. The logfile he uploaded http://pastebin.com/wyY8Lkmy which is logHarvestRight1.txt has the following clues as to why a flint was still present in the turtle inventory


Line 614: dig.checkForItem: checkForItems = 'ironore','gravel','coal'
Line 615:		  slot.update: Slot 8 contains 1 item2 status = unknown

Not sure what item1 is at this stage as it has been there for a while, but item2 is almost certainly gravel or flint


Line 620: dig.checkForItem: checkForItems = 'ironore','gravel','coal'
Line 621:		slot.update: Slot 9 contains 1 item3 status = unknown

item2 and item3 are almost certainly gravel and flint


dig.checkForItem: checkForItems = 'ironore','gravel','coal'

At this stage another gravel dug into slot 8, allowing a test to be made, as need 2 blocks to test:

checkSandGravel: gravel or sand dropped, moving down
checkSandGravel: checking for gravel/sand - found gravel in slot 8
checkSandGravel: checking for gravel/sand - found gravel in slot 8
dig.newDig: sorting inventory after identifying new item
sortInventory: Sorting started, moveItems = true
sortInventory: resetting unknown items
sortInventory: debug log
		sortInventory: slot 1 slotCount = 9 of wood			 slotState = known
		sortInventory: slot 2 slotCount = 1 of chests		   slotState = known
		sortInventory: slot 3 slotCount = 52 of dirt			slotState = known
		sortInventory: slot 4 slotCount = 2 of saplings		 slotState = known
		sortInventory: slot 5 slotCount = 61 of cobble		  slotState = known
		sortInventory: slot 6 slotCount = 3 of sand			 slotState = known
		sortInventory: slot 7 slotCount = 2 of gravel		   slotState = known
		sortInventory: slot 8 slotCount = 1 of item1			slotState = unknown
		sortInventory: slot 9 slotCount = 3 of item2			slotState = unknown

The gravel in slot 8 (item2) has been identified and sortInventory() has re-allocated the itemX names to the remaining unidentified items, after moving gravel into slot 7, so all identified items are grouped together.

I guess item1 is now definitely flint. The reason it was not identified is the function checkSandGravel() only tries to identify the item in the slot passed to it. As sand was already known, there was no need to confirm gravel by breaking it until flint is produced. This was obviously a mistake, so the function has been re-written to confirm gravel by breaking it until it turns to flint, then the new flint, and any already present can be dumped in one go.
The function has now been moved into the dig() object and renamed clsDig.checkSandGravel()

I will be uploading the changes to pastebin very shortly, with a version number on the first line of 1.0.1
Part 2 of the tutorial is nearly ready
TurtleHunter #23
Posted 15 May 2014 - 09:48 PM
Suggestions: 1- Use the new computercraft features to use rednet on the turtle(swapping the crafting table with a rednet modem) to another computer
2- If it find enoght gold, craft advanced turtles
Pizza Fox #24
Posted 18 May 2014 - 03:55 PM
I keep having a bug when it places a furnace


harvestAllTrees: changing logFile Name
from logStart.txt to logHarvestRight1.txt END OF LOGFILE!
restoreTorches: started. side =
rightside colNo = 0
start.lua:10317: attempt to compare number with string expected, got number

I am using MC 1.6.4 CC 1.6.3.
Edited on 01 April 2020 - 08:44 AM
Inksaver #25
Posted 19 May 2014 - 04:28 PM
I will upgrade to CC 1.6.3 later today and give it a test run.
Could you please post the seed of the world you are using, the coordinates of the tree, and the direction you are facing when placing the turtle.
Pizza Fox #26
Posted 20 May 2014 - 10:39 PM
I will upgrade to CC 1.6.3 later today and give it a test run.
Could you please post the seed of the world you are using, the coordinates of the tree, and the direction you are facing when placing the turtle.

My coordinates from standing behind the turtle facing the tree, with the chest thing facing me (East) are, X 161, Y 67, Z 282 I am using the seed oakforest like in the instructions.
Edited on 01 April 2020 - 08:44 AM
mistamadd001 #27
Posted 21 May 2014 - 11:32 AM
I keep getting a slot 0 out of range error, it has happened every time the program is run, I am replacing the turtle and replacing the tree every time.

Please give me an idea as to why this is happening

the seed is: -2785521036684775193

and my coords are: -227x, 64y, 239 facing south

the error occurs straight after returning to ground level after completely mining the firstTree, I'm assuming the turtle tries to place the chest it crafted and then dump stuff into it, however the chest does not get placed and the turtle just spits its items out

I also had one on saplingCheck just now during the firstTree object

Hoping this helps
Inksaver #28
Posted 22 May 2014 - 08:43 AM
@ minecrafter1094
The version has changed a couple of times since I first posted, and I did not keep backups of the earlier versions, so the error at line 10317 no longer gives the correct error point.
Could you download the latest version from Pastebin The first line of the script reads – start.lua Version 1.0.2

Try it again and if it comes up with the same error, give the message as you did before, with the line number hopefully being more meaningful.
Also if you post the logfile either as an attachment here, or on pastebin, that would be very helpful.

When I used the location you posted, the tree is not big enough, and the turtle ran out of fuel at the end of its first run, so try a different position. I have edited my original post to emphasise the tree height is important.

@mistamad001
Could you check the seed you posted is exactly the same, as the one above is nowhere near any trees, so I am guessing there might be a number missing, or in the wrong place
Edited on 22 May 2014 - 06:44 AM
Dragon53535 #29
Posted 22 May 2014 - 09:58 AM
Your turtle fails to craft items sometimes and screws up. one error was on line 7167, there were no planks to refuel so it tried searching item slot 0 and failed since there is no slot 0.
Inksaver #30
Posted 22 May 2014 - 11:03 AM
The line causing the error is

turtle.select(slot.getItemSlot(slot, "planks"))
This means there is no slot containing planks, which in turn means they were not crafted on the previous line

craft{craftItem = "planks", craftQuantity = numLogs * 4, sourceItem1 = "wood", destSlot = 0, doSort = false}
The only reason I can think why this might happen is if the tree was less than 6 blocks high.
Try altering the last few lines of code in firstTree() to

numLogs = turtle.getItemCount(slot:getItemSlot("wood")) - 1
if numLogs < 3 then
  saveToLog("firstTree: Only "..numLogs.." logs available. Not enough to continue. Re-start at a taller tree", true)
  error()
end
if numLogs > 4 then
  numLogs = 4
end
if craft{craftItem = "planks", craftQuantity = numLogs * 4, sourceItem1 = "wood", destSlot = 0, doSort = false} then
  turtle:select(slot.getItemSlot("planks"))
  turtle.refuel()
  slot.update{self = slot, item = "planks", delete = true}
else
  saveToLog("firstTree: Failed to craft planks. Check if more than 1 wood available", true)
  error()
end
It may be easier to re-download from Pastebin (Version 1.0.3)
Could you try that and report back, or even better reply with the seed of your world, and the coordinates of the tree you are placing your turtle
Edited on 22 May 2014 - 09:11 AM
theoriginalbit #31
Posted 22 May 2014 - 11:24 AM
Can i make a suggestion… make use of

[spoiler]
[/spoiler]


and/or

[namedspoiler=name]
[/namedspoiler]


in the OP so that its not as long ;)/> just nicer to have things grouped, etc.
Inksaver #32
Posted 22 May 2014 - 11:49 AM

if suggestion == "good idea" or suggestion == "makes sense" then
	os.run("execute suggestion")
end
Dragon53535 #33
Posted 22 May 2014 - 08:43 PM
Turtle just crashed after first tree with the updated script
start.lua:6501: attempt to index ? (a nil value)
the line is if self.slotContains == item then
It just finished sorting inventory when it stopped.
Inksaver #34
Posted 22 May 2014 - 09:27 PM
Ah very sorry, that's what happens if you do things in a rush.

Change

turtle.select(slot.getItemSlot("planks"))

to

turtle.select(slot:getItemSlot("planks"))
on line 7170
Note colon instead of dot
Edited on 22 May 2014 - 07:38 PM
Dragon53535 #35
Posted 22 May 2014 - 09:51 PM
Ah very sorry, that's what happens if you do things in a rush.

Change

turtle.select(slot.getItemSlot("planks"))

to

turtle.select(slot:getItemSlot("planks"))
on line 7170
Note colon instead of dot

Did, quit at the same spot, it expected a number there…
Inksaver #36
Posted 22 May 2014 - 11:55 PM
Check you have not got turtle:select (with a colon instead of a dot.)

I got it running on cc 1.6.3 but with a strange error when it came to placing the torch in front of the chest placed to act as a storage chest for torches. At this point I mis-spelt the variable used to hold text in the line

local markerlogText = "placeStorage: placing marker "..storageName
(line 6199)
Then when called to write to the logfile, because I put:

saveToLog(markerLogText, true, false)
(Note the capital L)
this called:

function saveToLog(text, toScreen, verbose)
  toScreen = toScreen or true
  verbose = verbose or false

  if toScreen then
	print(text)
  end
  if fso:getUseLog() then
	fso:appendLine(text, verbose)
  end
end
On cc 1.5.2 this had no effect that I was trying to write Nil to a text file, but on 1.6.3 the code simply stopped, with no error report.
To prevent this happening again, I modified the code to:

function saveToLog(text, toScreen, verbose)
  toScreen = toScreen or true
  verbose = verbose or false
  text = text or "Nil instead of text supplied, check your code!"

  if toScreen then
	print(text)
  end
  if fso:getUseLog() then
	fso:appendLine(text, verbose)
  end
end

Re-uploaded to pastebin as version 1.0.5
Dragon53535 #37
Posted 23 May 2014 - 03:33 AM
I've been testing your turtle, it worked to the gather cobble, but when it went to find more wood, it found the sugarcane and broke.

It did not give an error however it dug 2 sand underneath the sugarcane and started just spitting out this forever

dig.newDig: did not succeed after detect(), bedrock reached dig = 0 of bedrock into slot 0 at x=273 y=60 z=257

It's odd as it only hit smooth stone…
The turtle did however find the top of the sugarcane and dig down onto it, but then just dug the 2 sand underneath and broke
i had to terminate the program afterwards…

The same problem sort of happened again, however this time it didn't encounter the sugarcane and instead started or tried to start it's mine right next to water and when it went down a couple of blocks it said something about a cobble stopper, but didn't do anything, so i blocked off the water and he worked again, he even mined in the water a bit afterwards which confused me.

the water is the problem, after it dug up the second side on the mine, it encountered water above it while trying to go up, and calls it bedrock… removing the water works. Also i think my turtle got in a loop on checking if the sand is gravel. Eventually it stops and sorts, and then goes at it again. The line it tells me about is line 356 when i terminated which, guess what, you didn't have anything there about if it WAS sand.
Edited on 23 May 2014 - 02:48 AM
Inksaver #38
Posted 23 May 2014 - 07:23 AM
Thanks for reporting the errors you are getting. We seem to be making progress!
It would be very helpful if you could post the seed of your world and the coordinates and direction facing at the first tree
(press T while playing then type /seed Enter)

Edit: sand and gravel check now working. Just need to look at the water problem, will upload ASAP
Also discovered a redstone from storage problem at the turtle crafting stage.
Edited on 23 May 2014 - 10:36 AM
Dragon53535 #39
Posted 23 May 2014 - 05:27 PM
Coords of first tree (i've remade the tree a few times so i don't know if it was high enough, made sure it was every time afterwards.)
x:264 y:65 z:254 Seed is -991485530 i faced west on the tree and started the turtle facing that way.

There was no sugarcane nearby so i put the sugarcane on x:273 z:257
Edited on 23 May 2014 - 03:28 PM
mistamadd001 #40
Posted 24 May 2014 - 03:37 AM
Hi InkSaver, I've just tried the latest program 1.0.5 but am having the same error, I am running 1.4.7 so I fear that that is the reason my program is failing so early. I'm still getting a turtle:18: Slot number 0 out of range.

There are several things that I am noticing are a bit odd, every time the turtle collects a sapling (spruce) it is spitting it out and not checking to see if it in fact a sapling, saying instead that it is an apple.

Im not sure if this is because of 1.4.7 or what but it is strange.
Inksaver #41
Posted 24 May 2014 - 01:24 PM
@Dragon53535

Thanks for posting the seed. This is a great world for testing, as the turtle's first mining run starts on sand and exits in water, so some considerable re-coding is required here. I am getting past this and on the 3rd harvesting run, there is a wierd bug when refuelling, where the chest is placed, but not in front of the turtle as expected, but with a 1 block gap. I suspect this is a bug in cc 1.6.3, as the post regarding LavaLake 1.0 also refers to the same error when using buckets to get lava using turtle.place().

@mistamadd001
The seed you posted earlier would not reproduce the exact world if you are in a different version of Minecraft. The script was developed on Minecraft 1.6.4 with cc 1.5.8. Are you able to upgrade to the newer versions of both? I am testing with cc 1.6.3 to check everything is working. Could you check if the seed you posted earlier is correct?
Lyqyd #42
Posted 24 May 2014 - 09:30 PM
Moved to Turtle Programs.
Dragon53535 #43
Posted 24 May 2014 - 10:02 PM
Hey new problem, it just spit out every item (on the same world doing the same thing) log is here, http://pastebin.com/MajCcT9J it's up for 1 day so i suggest you download it and read it then.
On turtle error is at 6835: Slot number 0 out of range. Looking at that, whatever called the function is to blame for the failure…
Inksaver #44
Posted 24 May 2014 - 11:30 PM
If you look at my last post you will see I had the same problem. It is a bug in cc 1.6.
3 where the chest does not place correctly. I am trying to work round it.
Dragon53535 #45
Posted 24 May 2014 - 11:38 PM
Create two chests? and compare so that you can see if there is a chest there first?

Or since he tried placing it in water and failed, test for the chest, if you can, and if it's not there or "bedrock" is then plug it and go down and try again
Edited on 25 May 2014 - 12:08 AM
Inksaver #46
Posted 25 May 2014 - 11:02 AM
Thanks, but I did not want to make another chest too soon as it uses resources.

I have got round it by simply using turtle.detect() If nothing there, move forward, grab the chest, move back and try again

I have reported the bug (with video) along with a simple way to replicate it on this post

I am just re-testing your world from scratch then will re-upload with the version 1.1.0 as soon as I can

Edit

Your world is working now (screenshot attached)

Just a couple of minor tweaks and pastebin will be re-uploaded
Edited on 25 May 2014 - 02:22 PM
Chaoscode #47
Posted 25 May 2014 - 01:05 PM
I have a question. I see how you would copy the program over but how would you run it after the new turtle is created?
Little Spazz #48
Posted 25 May 2014 - 05:14 PM
This is an amazing program, I'm just curious if there is any future plans to make this work in modpacks such as tekkit or tekkit lite. (as there are more resources that can be mined in such modpacks)

I tried to see if it would spit extra items out as 'junk blocks' to no avail, it'll find certain items and crash thinking they are flint.

I understand if it won't be expanded to work in them, I was just curious. Great work on the program, I am in awe.
Inksaver #49
Posted 25 May 2014 - 05:26 PM
Latest version 1.1.0 has just been posted to http://pastebin.com/2Zf5an8H fully compatible with cc 1.6

It would not work with any modpacks, simply because of the large numbers of different blocks, and the difficulty identifying them.

Thanks for your comments!
Little Spazz #50
Posted 25 May 2014 - 05:27 PM
It would not work with any modpacks, simply because of the large numbers of different blocks, and the difficulty identifying them.

Yeah that's what I figured, couldn't hurt to ask though.
Thanks for the answer and the program, again great work.
Dragon53535 #51
Posted 25 May 2014 - 08:19 PM
I shall test myself on my computer just to make sure, however i will say good job on fixing the bugs :D/> now i'm kind of glad that you made this so i could help. i'll try testing the program on another world and see if it crashes, if all goes well on the first world
Inksaver #52
Posted 25 May 2014 - 09:17 PM
Luckily the world you use had 13 diamonds in the first couple of layers, so it completed fairly quickly.

I would be glad to get to the bottom of any other problems you discover on other worlds, so please go ahead!

I am now wondering what next?

With some modification, it should be possible to increase the storage capacity on the surface, retain some of the flowers, seeds, cobble, dirt and gravel that was simply dropped, then build a house on the surface with doors and windows, complete with water and lava sources, fencing, gravel paths etc.

With the current version of CC, a diamond hoe can be constructed and swapped out for the pickaxe for creating a wheat farm.

Well… Maybe not

Edit

Just had a thought…

If at least one turtle is reproduced, then each one could run separate programs to carry out tree and wheat farming, while the original could build the house and grounds. These would be additional scripts that would only run after the main script had completed. All coordinates of the position of the mineshafts, furnace, tree farm and storage chests would be known. If a chunk loader is installed, then we could even go deep mining in neighboring areas.

I've got a headache coming on….

Any volunteers to write continuing scripts to do the above tasks? All you need to do is run the current one, and use the changes made to the world to be taken into account

All this, of course, WITHOUT player intervention…
Edited on 25 May 2014 - 09:05 PM
Dragon53535 #53
Posted 26 May 2014 - 09:47 PM
You and your menus, i like how you setup the first screen saying that it needs the config changed lol

You could probably change your first few menus so that it uses os.pullEvent() instead of typing. Not including the coordinates
Edited on 26 May 2014 - 11:46 PM
Battan #54
Posted 17 June 2014 - 01:12 PM
Hello! I wonder how to get this to work in multiplayer if i create my own server and such!
Inksaver #55
Posted 19 June 2014 - 04:36 PM
I have not tried it on a server, but as long as it is Vanilla Minecraft, i.e. no additional blocks or ores, it should work.
Beware of chunk loading issues causing the turtle to stop working.
Beeskee #56
Posted 24 June 2014 - 08:47 AM
This is really beautiful. :)/>

I love all the different stuff it does. I think time management is important for turtles too, you may want to have it use the first turtle it creates to do something useful while it continues the hunt for diamonds. It could even bring resources such as fuel to a standard spot for the second turtle so it can focus on it's task, as well as haul away the outputs. I like the challenge ideas from the original thread too. The ideas in this thread are good as well, something like a little house, and storing excess supplies for the player, even if it is just cobble and dirt to begin with.

In games I often use my first 3 diamonds for a mining turtle, even if I do just end up running excavate instead of something more clever, so things the script considers trash like flowers and seeds are still pretty valuable at that point.

I'm super tempted to try running it on my FTB Unleashed game. :D/>
Lion4ever #57
Posted 28 June 2014 - 08:35 PM
Great Job :)/>

You can use turtle.refuel(0) and turtle.craft(0) to check whether it is possible without actually refueling/crafting it. That is quite useful^^

Can you please make an option to completly disable loggin (and optionally put a "pastebin get <program>" on the floppy instead of the start.lua), so the program can be used on a server where we cant change the configs?
Edited on 28 June 2014 - 07:16 PM
Inksaver #58
Posted 29 June 2014 - 10:47 AM
The original script was written before the .refuel(0) and .craft(0) functions were available, so that is why they are not implemented directly

I had not thought about playing this on a server before, so just thinking aloud:

1) you are not able to see any logfiles, which is essential in the debugging process, so if it crashes at some point, you would have very little clue as to the cause

2) I note there is a http.post(string url, string postData [, table headers]) which theoretically could allow the logs to be posted to your own pastebin account, but not sure about the logging in to pastebin. This is going to need some investigation.

3) Disabling logging entirely is easy as an interim measure.

4) Putting pastebin .get on the floppy is straightforward, and can be given as an option at the start. It was not part of the original challenge so I never even considered it

5) these measures mean there is no need to alter the config files.

Okay I will get onto that and update here when it is done.
Beeskee #59
Posted 29 June 2014 - 09:32 PM
I wrote up some notes for materials in modpacks, I was going to take a look at the code but I have a lot going on, so no promises.

So far I just have identification info for copper and tin:

Notes for Self-Replicating Turtle
Mod detection and material identification

Common alternate metals are tin and copper.

Tin can be used to craft a bucket. Copper cannot.

Neither tin nor copper can make a vanilla hopper, or the computer/turtle objects that require iron.

Possible easy modpack detection: Try to smelt iron. - Or just ask the player if it is vanilla or a modpack during startup. :D/>

Vanilla allows placement of an iron ingot into a furnace inventory along with fuel in the bottom, but nothing happens, and no fuel is consumed.

Most IC2-based or similar themed modpacks have something happen when iron is smelted in a furnace, and it works in the stone furnaces. Usually this produces something like refined iron. This should work for most FTB and Tekkit packs.
Inksaver #60
Posted 29 June 2014 - 09:36 PM
@Lion4ever
Could you try this thrown together pastebin test on the server you use:
http://pastebin.com/25xQ8LwT

When started it will create a dummy logfile, then ask you if you have a pastebin account.
If you have not, then get one!

It will then paste the logfile onto your account for you to view or delete at your leisure

If you are running your own server, or trust the owner, you can store your pastebin account details in the gamesave.

If this works, I can incorporate the code into the main script, to allow server users to run the program and still report any bugs with logfiles

I will now get on with using the .get function onto the floppy.
Beeskee #61
Posted 01 July 2014 - 03:14 PM
I did try this out on vanilla 1.6.4 and I noticed a bug with the mine entrances - sometimes it demolishes the block that the sign or torch is on.
Buho #62
Posted 01 July 2014 - 04:01 PM
Awesome work! I'm blown away! I read that old thread last year and was dismayed nobody completed it.

Keep in mind, if the player doesn't move very much (sits still), turtles can move infinitely in any direction with no problems.

Looking forward, I'd love to see the one or two new turtles fueled up to the max, given a starting inventory, and then sent off into the wild, seeking a suitable place to replicate again! For purity, the program could be identical to its parent, but having a given inventory would simplify derivative generations. Perhaps send Miner2 in one direction and the parent in the opposite direction, while Miner3, if it exists, does something like tree farming. A fractal pattern could be made so children don't tread on old ground.
_gjkf_ #63
Posted 01 July 2014 - 04:22 PM
Wow, just wow. You blew my mind, many compliments, a completely automated self-replicating crafty-mining turtle, just awesome. Just wow. Great job
Beeskee #64
Posted 02 July 2014 - 05:12 AM
Well butter my butt and call me a biscuit. I had a nice little surprise waiting for me when I got home:



It doesn't seem to have actually found the birch trees that were nearby. :D/> It never bothered the chunkloader either, but I placed it a few blocks above the starting tree like the original thread specified, with an air gap.


Edit: I saw it break the torch marker for a mine again. It's placing the torch, then reinforcing the entrance which breaks the block the torch is on.

The diamond mine sign in the back says Level 2, sector 5. And it's hard to see because of the sign, I just realized, but it did make 2 turtles. :)/>
Edited on 02 July 2014 - 07:10 AM
Inksaver #65
Posted 02 July 2014 - 07:44 AM
@Beeskee
Thanks for posting the pic of the completed run. I am puzzled why it did not get the birch trees, and why the mine entrance gets trashed.
Could you post the seed of your world, the coordinates of both the sugar cane and the tree you start from, and the direction you are facing.

I am already working on allowing use on a server, and could incorporate these bug fixes at the same time.

@Buho
I did start on making an enhanced version with ideas similar to those you suggested, but I am a bit short on spare time at the moment.
Edited on 02 July 2014 - 05:46 AM
Beeskee #66
Posted 02 July 2014 - 08:45 AM
The birch trees were just coincidentally outside of the harvesting area. They were inside what looked like the visible area of harvesting, but the pattern of movement just happened to line up so that no tree was in the path of the harvesting. :D/> The pic doesn't show but there's like 5 more birch trees around, all just one block out of range. It was funny to watch the turtle seeming to avoid every birch tree nearby. The second run I am doing, it harvested the birch trees just fine. I made sure one was in the actual harvesting area.

The mine entrance thing happens several times early on during the first run.

Seed: -737401980332805217 - be advised, if you use just the seed, the starting spot is unsuitable. I built up the tree and planted sugar cane manually in creative mode. The world save below was edited to make the area more suitable. It didn't need much work.
x=-156 y=65 z=197 facing west - starting spot - I can't get the sugar cane coordinates, I'm doing another test run and the originals were harvested, but it was very close by and the replicating turtle found that just fine. The save I made shows everything though:

World save from just before start
Logs from the first run

I made a backup before I began. The world save is from just before the start, the only thing that needs to be done is to download the program onto the already-placed turtle, and set a label on it.

The only mods were ComputerCraft 1.63, ChickenChunks 1.3.3.4 for the chunk loader, CodeChickenCore 0.9.0.9 which is a library needed for chunk loader, and NotEnoughItems 1.6.1.9.

There is a placed chunkloader so you'll need that mod if you don't have it. Let me know if it's a problem and I can make a copy of the starting save with the chunk loader removed. :)/>



Edit: Spotted another thing as I was watching the second run end, the turtle sucks up a bunch of redstone from the storage chest and then dumps most of it on the ground to decay, during the part of the process where it is constructing the new turtles. Oops :D/> (You already won, this is for the "bribe the player with resources" bonus now, btw. And again this is amazing, I love it.)


Second run:


Ended with 5 spare diamond :)/> Run 1 had 3 spare diamond. No gold this time tho. ~4-5 hours. Logs

My suggestion for the endgame is to place the turtles off to the side and include a mini tree farm program or mining program or whatever, based off your existing code, designed to use the unused area the turtle is conveniently facing. Then the main turtle can optionally continue mining.

And speaking of "won", I dunno if the original person is still around, but I'd love to get you some prize or something for completing this. :)/>



3rd run glitch: x=-123 y=65 z=149 facing east - built up a bit like 1 and 2 with extra wood and sugar cane - the replicator seemed to think it had the sugar cane chest placed already and dumped them all on the ground to decay. I terminated the run, sorry I don't have a save from just before I started that one, I knew I should have. Logs - Happened again in run 4, it does not seem to like finding sugar cane early. Further testing - seems to happen when it identifies sugar cane before sand.
Edited on 02 July 2014 - 10:26 AM
Inksaver #67
Posted 02 July 2014 - 12:55 PM
Thanks for all the information. I will try and get onto debugging this as soon as possible, and get back to you.
Beeskee #68
Posted 02 July 2014 - 01:10 PM
Let me know if you want me to try something in particular. Or if I'm bugging you. :D/>
Inksaver #69
Posted 02 July 2014 - 07:18 PM
Just d/l your world. I did not have NEI, so added that, and caused a minecraft crash. I removed it and tried again, but cc errors were reported, and the save is in survival mode with /gamemode 1 disabled and no turtles to be seen. I wonder if you could upload it again in creative mode?

I did create a new world using the seed, and have identified the location from your screenshot. I am guessing you placed the sugar cane on the sand to the left, next to the water. The exact location should not matter too much, but I wanted it to be harvested before sand as an experiment.

BTW I noted you made a backup of your file. You might be interested in a VB6 project I wrote to make backups every 5 minutes of any minecraft world you are using, either in vanilla or technic formats. The VB sourcecode and a compiled .exe file are available. You will need to add the enclosed .ocx files to C:\Windows\SysWOW64\ and register them (Instructions in readme.txt). It runs on any version of Windows except RT as long as you register the ActiveX components

http://www.4shared.c...aft_Backup.html

[attachment=1779:screenshot.jpg]
Edited on 02 July 2014 - 05:53 PM
Beeskee #70
Posted 03 July 2014 - 05:37 AM
Oops, I run my worlds as servers so if minecraft crashes I don't lose my world. :D/>

I resaved run1start and run4start with /defaultgamemode creative, I think that will do it.
They still have chunkloaders from here: http://www.chickenbo...sions/links.php

Run4 starting spot:
x=-116 y=65 z=197 facing north


I also zipped up the whole server. The contents of the mods directory can be copied into the client mods directory.


And yeah I went a bit overboard with the sugar cane probably, but it seemed like the turtle identifying that before the sand was the only problem.


The problem in the code seems to be around ~1377, that section is marked "storageSand not yet placed". But then on line 1390 in that same block of code, it's storing identified sugar cane.


The backup utility seems cool, tho since I run mine as servers various programs can't back that up since the files are locked.


Edit:
I started a new world and a new run, with some new fun. :D/>

world2
seed: -4093190322563353815
run1: x: 183, y: 65, z: 256, facing south 0
I started this one in single player creative mode first and the start spot is near spawn so it should be good. There's also a beacon.

This one has failed twice in 2 different ways. The first, it had too much wood and crashed. Turns out there's a generated mineshaft below. Oops. The second failure, it ran out of fuel in the bottom of the lake, thinking sand was wood.
The logs are in the world zips under computer #0's directory.

I was able to reproduce the error in a third run, and remembered to take a screenshot this time. I also got a look at what was going on with the flower and dirt, there's a 2-block dirt 'cliff' with a flower on top, it finds that and thinks it found something else. Logs are in the zip in world2\computer\0






Edit: I finally saw enough about what was going on with the signs/torches at the entrances. It happens when the block the sign or torch is placed on is a grass block or becomes a grass block, since it can't compare that to the dirt. Still, might want to rearrange the code a little to make it reinforce the entrance with cobble and then place down the marker. Confirmed with more observation, it leaves dirt blocks alone but re-breaks grass blocks. Grass grows randomly, sometimes fast. You can't count on a dirt block not becoming a grass block unless you're certain the area has no grass anywhere nearby.
Edited on 03 July 2014 - 08:55 AM
Inksaver #71
Posted 03 July 2014 - 11:16 PM
world2
seed: -4093190322563353815
run1: x: 183, y: 65, z: 256, facing south 0
I started this one in single player creative mode first and the start spot is near spawn so it should be good. There's also a beacon.

This one has failed twice in 2 different ways. The first, it had too much wood and crashed. Turns out there's a generated mineshaft below. Oops. The second failure, it ran out of fuel in the bottom of the lake, thinking sand was wood.
The logs are in the world zips under computer #0's directory.

I was able to reproduce the error in a third run, and remembered to take a screenshot this time. I also got a look at what was going on with the flower and dirt, there's a 2-block dirt 'cliff' with a flower on top, it finds that and thinks it found something else. Logs are in the zip in world2\computer\0

This looks to be a great world for testing. I did think about what might happen if a disused mine was encountered. Now is my chance. There is a lot to do, so it will take some time to sort all these things out. Thanks again for your interest and input.
Beeskee #72
Posted 04 July 2014 - 05:28 AM
I'm glad I could help. So that I'm not all bad news, a second run in a nearby spot was completely successful:



Ended with 4 spare diamonds, though it had to hit the bedrock to do so. It appears to have avoided the generated mineshaft this time. :)/>
Edited on 04 July 2014 - 03:34 AM
Inksaver #73
Posted 04 July 2014 - 07:18 PM
Off topic

I note from the page source you use postimage.org to host your screenshots.
How do you rate them compared with some of the others which seem to have lots of restrictions and limits?
I have nearly used up all my allotted 500k allowed on computercraft forums, so need to find an alternative.
Lyqyd #74
Posted 04 July 2014 - 07:28 PM
Try imgur.com.
Inksaver #75
Posted 04 July 2014 - 08:17 PM
Thanks Lyqyd
I am onto it.

@Beeskee
I managed to download and use world2 in creative mode
I am now running the script to start debugging. This could be a long night…
Beeskee #76
Posted 04 July 2014 - 11:17 PM
Postimage deletes images if you don't have a paid account. I just started using them so I'm not sure yet, but based on that alone I wouldn't recommend them. I didn't know that when I started using them.

I used to use Imageshack but they delete images too and they just locked down non-paying accounts.

I'll probably check out imgur myself. :)/>


Edit: Oops:

As long as images are getting at least 1 view every 6 months, they will stick around forever. After that, your image may be removed to create more space for newer images.
Edited on 04 July 2014 - 09:20 PM
ReconTurtle #77
Posted 08 July 2014 - 09:59 PM
@Inksaver - Wow man, this is really impressive. I am completely blown away watching the videos you posted, it is a truly mesmerizing thing to watch. The thing that is really the most incredible to me is the way that you designed a log system specifically for debugging, because we all know how much of a pain that can be when working with Turtles, no doubt. I was just wondering if you could go a little more in-depth about that system in particular, and how reasonable it may be to adapt it to work with other programs. I haven't had the time to delve into your code, but if that's what you point me towards then I shall do so.

@Beeskee - I play ComputerCraft exclusively on Tekkit, so your notes on how it may work with such a modpack really intrigued me. I too may give a go and re-working this system to be compatible with Tekkit. My main concern is that it seems with first thought that the code may have to be not just tweaked but truly overhauled. A lot of the functions, such as getAllTrees (or whatever that was called) could be transplanted, for sure. For the most part, however, I believe it would have to be re-done simply so the turtle could have a directed system that can handle indentifying, sorting, and storing of all the miscellaneous ores and blocks that are added.
Inksaver #78
Posted 12 July 2014 - 01:51 PM
Sorry to have not posted for a while.
The changes requested by some of you are taking much longer than expected, and some major re-coding is required.
So far the following has been completed:

1) User start menu re-done to include creating an ini file to store your preferences, and allow the use of pastebin both to store logs, and to allow the new turtles crafted to download the code from pastebin via an instruction stored on the floppy disc. This allows server users to run the script, as no modifications are needed on the computercraft config files

2) The world2 posted by Beeskee in post #70 where early discovery of both sand and gravel has been fixed.

Still to be done is the discovery of wooden items in the disused mineshaft in this world. Nearly there!

@ReconTurtle

The logging system is an object, so should be fairly easy to export as an api. I have not looked into this in any depth, but I guess I am looking for something similar to the Python 'import' method of including modules written separately. As you say this is an incredibly useful way of debugging the code. I may well add the logging system as a tutorial when I get time. If you want to have a go yourself, the function to look at is called createLogfileObject(). I have modified this quite heavily in the version I am still working on, so it will be different when I upload the next version.

Running the script on Tekkit would be a real pain, due to the number of extra blocks available, and the shortage of storage space within the turtle. It would take a major re-write and not even sure it would be possible
Inksaver #79
Posted 17 July 2014 - 12:28 PM
Pastebin updated to version 1.1.1

You can now use the script on a server, and logfiles can be turned off completely.

The starting menu has been modified, and an .ini file is created to store your preferences if you are repeating runs to test it out.

If disused mines are encountered, the fences, planks and any other combustibles are simply used to refuel.

Please report any bugs you come across along with world seed, starting coordinates and position of the sugar cane.

crashes caused by the cc 1.63 bug concerning the .place() methods and long grass have been intercepted and dealt with, so you don't get the turtle contents spewing out because the chest is not in the right place. (I will be posting this fix in the bug reports forum.)

The world2 in post #70 now works properly.

Enjoy
Mister_Y #80
Posted 13 August 2014 - 11:16 PM
Hi Inksaver!

When I discovered ComputerCraft a month ago, I figured asked immediately: does a turtle can be autonomous and craft other turtles and so on?
When I realized that yes, it was possible, I was surprised to see so few videos on it! I have found quickly the self-replicating challenge and the beginnings of some youtube chain, to see that no one had succeeded…

What a joy to see your videos! Again, congratulations! That's very impressive!
It made me feel inclined to do the same!
So I did :P/> from scratch!

Well, not as robust (I do not do the thing of the torch, I not manage jungle tree, abandoned mines, buckets of lava …) but it is less than 2000 lines of code!

I want to know: are you planning to continue working on it, with created turtles working together …? You have ideas? :)/>
Edited on 13 August 2014 - 09:59 PM
Inksaver #81
Posted 19 August 2014 - 11:24 PM
Thanks for your comments.

I would love to see your code. Perhaps you could put it on pastebin?

I may contunue with this, but at the moment I am working on a mining script that uses a lot of the functions I wrote to enable a player in survival mode to place a turtle down anywhere, give it a chest, dirt, cobble, stone, gravel, a bucket and a full stack of wood, and it will craft all it needs and mine out a 33x33 area in multiple layers with ladders and stone staircases, with full resume after server restart. It uses recursive functions to mine ores as efficiently as possible, and constructs floors in all layers, with signs giving levels and compass bearings, so the player can explore the mine with ease.
lare290 #82
Posted 04 July 2015 - 06:37 PM
After all I am still a beginner!
Yeah, sure.
wood #83
Posted 13 January 2016 - 10:24 PM
@Inksaver, awesome progam !
I just started progaming during winter holiday and don't have much background in programing.
I'm going to try and make some sort of AI for my turtle, I hope I can do it as fast as you, if I'm done by the end of the year, it's a success :)/>
I read that you were going to make a tutorial, I was wondering if you started it ?
jaketheraven #84
Posted 06 June 2016 - 09:37 PM
When I run this it says slot number 0 out of range. I really want to use this. Please help.

Hey I just had an idea! What if you used the peripherals api to automatically activate the offsprings?
Edited on 07 June 2016 - 12:45 AM
Meit #85
Posted 24 July 2016 - 11:11 AM
Increase all slots number by 1 in the code, ITS COMMON SENSE..
They are going out of the range and ID's cause the codes been changed (slot ids start: 1, 1-10 = 9 slots)
So increase all slots Id's/numbers by 1 and it will work (even if it is 0 + 1 it should be 1,)
dropdead #86
Posted 17 November 2016 - 06:41 PM
Hi there!
I visit this forum for years since there is always a neat little program for this or that.
This self replicating turtle program is really great and obviously the creator took quite some time to make it that way.
I have tried it countless times but if it does not bug out because something confuses the turtle, the program stops when diamonds are found and it is back on the surface. The problem is always the same: slot number 0 out of range.
I get the problem but my grasp of Lua is not good enough to dig through all the code and fix it. I DO understand that Lua is a bit peculiar since it starts counting with 1 and not with 0 like most other languages.
And if I understand then slot 0 is out of range because it simply does not exist.
I tried all the world seeds the creator gave because they should work but somehow I am out of luck. The most of the program I've seen one time is the turtle making a pickaxe and then spitting it out for whatever reason. I never got that far again.

Any idea how to fix this since I've read more than once about this problem or is this thread too old? I could even provide the logs and such but I don't want to put all this stuff here if nobody can help anyway.


Thanks in advance!

Edit: Fixed some stuff. Stupid typos.
Edited on 18 November 2016 - 04:32 AM
Lupus590 #87
Posted 18 November 2016 - 12:32 PM
-snip-
does the error give a line number?
dropdead #88
Posted 18 November 2016 - 01:50 PM
-snip-
does the error give a line number?

It does, though I'd have to lie if I said anything more than it was about 3000 and had this time something to do with wood… (@_o) but I have started the program once again and it is already over two hours and the turtle has lots of resources gathered (deep mining soon). The error doesn't appear in the log and since your guess is as good as mine which line number the error threw yesterday time, I will tell you when
the program stops because if it finishes THIS TIME it would be a first.

-snip-
does the error give a line number?

Hi again.

Since I am still a brand new member, the first posts have to be approved but I have an error now. It occurs in line 2719 (function craft):


function craft(arg)
		-- code...
if arg.doSort == nil then
  arg.doSort = false
end
if arg.doSort then
  sortInventory(true)
end

if arg.sourceItem1 == nil then
  sourceSlot1 = 0
  sourceQuantity1 = 0
else
  sourceSlot1 = slot:getItemSlot(arg.sourceItem1)
  sourceQuantity1 = turtle.getItemCount(sourceSlot1) -- THIS IS LINE 2719!
end
	  
		-- code ...
end

This time the turtle didn't even find diamonds. Ten places in the turtles inventory contain items:

1x chest, 61x dirt, 61x cobblestone, 31x ironore,
1x stone, 24x coal, 61x gravel, 1x bucket,
1x redstonedust, 1x torch

Hope this helps.

Addendum1: Line 2719 is the same like yesterday and I can't shake the feeling that it is ALWAYS that line when the dig goes wrong.

Addendum2: Well, tried once again and it is line 2718 that throws the same error. Is it possible that the turtle is too packed with stuff?
This time it carried 16 slots full of items, spit out the planks and the program spit out that damn error…

MC 1.64
CC 1.63
Forge 9.11.1.1345
Edited on 19 November 2016 - 02:28 PM
Inksaver #89
Posted 09 January 2017 - 01:52 AM
Hi all
I have not looked at these forums for some time, so apologies to anybody who has left comments which I have not answered.
I just spotted this thread was still active, as I was about to post another program called "Survival Toolkit" which has been developed for use in survival mode and allows you to make use of your first Crafty Mining Turtle to mine without needing any supervision, flatten and clear surface areas, and create tree farms.

This version of the self-replicating turtle was developed before the ability to identify blocks and items was added, which is why it is so complicated.

There is a logging system, which if enabled can give clues to the cause of the errors described above.

As a suggestion, if you add a line above 2718:
print("About to use line 2718. arg.SourceItem1 = "..tostring(arg.SourceItem1))
and it errors out because arg.SourceItem1 = nil, and consequently sourceSlot1 = 0, which gives the error.

There is an updated version of this using MC 1.7.10 here http://pastebin.com/2Krm3Yva
Beeskee #90
Posted 12 August 2017 - 04:16 PM
This is still one of the most amazing computercraft things I've ever seen. :)/>
nagoL2015 #91
Posted 25 October 2017 - 09:12 PM
This is by far the best and well-done script I have ever seen before in my experience with lua . Great job, keep up the amazing work :D/>.
Edited on 27 October 2017 - 09:09 AM
dropdead #92
Posted 05 December 2017 - 06:51 PM
Might be late, but of course I've not forgotten about this neat program.

Without looking at the code before starting up the first time, it's easy to see that there are quite some changes.
For now the little guy is just cutting down trees. It hasn't even been looking for stone and so there is no oven anywhere to be seen. Guess it can power itself with wood now? It's running about an hour now and I wonder what the program does this time. This time I took a random world - I've seen the other ones so much there was time for a change there, too.

And: my thanks to the creator for not forgetting this thread!

Edit:
Well, it was interessting while it lasted. ^^
It dug down after it spit out out some trash and when it came back up it put the chest on the bottom and filled stuff in, got it out, filled it in, got it out and so on. After uncounted times it suddenly stopped doing anything and my inspection showed, that it had started itself to death. Or something of the sort. <g>

This time the program failed with an vm java error: again with an array access that was out of bounds. The last words:

getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
bios:80: vm error: java.lang.ArrayIndexOutOfBoundException: 256

The inventory of the turtle is chock full. Slot 13 does indeed contain wood but since the inventoy is full there would have been no place for planks.

slot 1: 30 oak sapling
slot 2: 37 dirt
slot 3: 15 sugar cane
slot4: 64 oak wood

slot 5: 64 cobblestone
and 6: 64 cobblestone
slot 7: 12 birch saplings
slot8: 64 oak wood

slot 9: 3 sand
slot 10: 63 birch wood
slot 11: 64 cobblestone
slot 12: 48 redstone

slot 13: 64 oak wood
slot 14: 17 cobblestone
slot 15: 1 furnace
slot 16: 1 chest

The log is in the spoiler.

SpoilerLog File Created
homeCoords.txt file created
x = -363, y = 64, z = 208, f = 2
Starting at function harvestFirstTree()
harvestFirstTree() Starting…
harvestFirstTree() Completed. Saving status '1'
harvestAllTrees() Starting…
harvestAllTrees() spiral arm no: 2
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=3, quantity=2
getStock()minecraft:log, slot=2, quantity=4
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 4, Water found = false
Water source found: checking suitability
Water found: x=-361rel X=2, z=206, rel Z=2
Water found: too close to base camp (rel X=2, rel Z=2)
Water source found: checking suitability
Water found: x=-361rel X=2, z=207, rel Z=1
Water found: too close to base camp (rel X=2, rel Z=1)
Water source found: checking suitability
Water found: x=-361rel X=2, z=208, rel Z=0
Water found: too close to base camp (rel X=2, rel Z=0)
harvestAllTrees() spiral arm no: 4
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=3, quantity=2
getStock()minecraft:log, slot=2, quantity=4
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 4, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 2, crafting planks
craft(): sd.pSlot=2, sd.pCount=10, sd.fSlot=2, sd.fCount=10
craft(): slot no: 2, log count:10
Water source found: checking suitability
Water found: x=-360rel X=3, z=207, rel Z=1
Water found: too close to base camp (rel X=3, rel Z=1)
Water source found: checking suitability
Water found: x=-360rel X=3, z=208, rel Z=0
Water found: too close to base camp (rel X=3, rel Z=0)
Water source found: checking suitability
Water found: x=-360rel X=3, z=209, rel Z=1
Water found: too close to base camp (rel X=3, rel Z=1)
harvestAllTrees() spiral arm no: 6
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=2
getStock()minecraft:log, slot=3, quantity=9
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 9, Water found = false
Water source found: checking suitability
Water found: x=-359rel X=4, z=207, rel Z=1
Water found: too close to base camp (rel X=4, rel Z=1)
Water source found: checking suitability
Water found: x=-359rel X=4, z=208, rel Z=0
Water found: too close to base camp (rel X=4, rel Z=0)
Water source found: checking suitability
Water found: x=-359rel X=4, z=209, rel Z=1
Water found: too close to base camp (rel X=4, rel Z=1)
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 3, crafting planks
craft(): sd.pSlot=3, sd.pCount=13, sd.fSlot=3, sd.fCount=13
craft(): slot no: 3, log count:13
harvestAllTrees() spiral arm no: 8
getStock()minecraft:reeds, slot=4, quantity=3
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=4
getStock()minecraft:log, slot=5, quantity=18
getStock()minecraft:log, slot=7, quantity=5
getStock()minecraft:log2= not found
reeds = 3, sand = 0, logs = 23, Water found = false
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 7, crafting planks
craft(): sd.pSlot=5, sd.pCount=18, sd.fSlot=7, sd.fCount=5
craft(): slot no: 7, log count:5
Water source found: checking suitability
Water found: x=-358rel X=5, z=208, rel Z=0
Water found: too close to base camp (rel X=5, rel Z=0)
Water source found: checking suitability
Water found: x=-358rel X=5, z=209, rel Z=1
Water found: too close to base camp (rel X=5, rel Z=1)
harvestAllTrees() spiral arm no: 10
getStock()minecraft:reeds, slot=4, quantity=6
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=4
getStock()minecraft:log, slot=5, quantity=22
getStock()minecraft:log, slot=6, quantity=4
getStock()minecraft:log2= not found
reeds = 6, sand = 0, logs = 26, Water found = false
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 6, crafting planks
craft(): sd.pSlot=5, sd.pCount=22, sd.fSlot=6, sd.fCount=4
craft(): slot no: 6, log count:4
Water source found: checking suitability
Water found: x=-357rel X=6, z=209, rel Z=1
Water found: too close to base camp (rel X=6, rel Z=1)
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 6, crafting planks
craft(): sd.pSlot=5, sd.pCount=28, sd.fSlot=6, sd.fCount=3
craft(): slot no: 6, log count:3
harvestAllTrees() spiral arm no: 12
getStock()minecraft:reeds, slot=4, quantity=12
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=5
getStock()minecraft:log, slot=5, quantity=28
getStock()minecraft:log, slot=6, quantity=2
getStock()minecraft:log2= not found
reeds = 12, sand = 0, logs = 30, Water found = false
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 6, crafting planks
craft(): sd.pSlot=5, sd.pCount=39, sd.fSlot=6, sd.fCount=2
craft(): slot no: 6, log count:2
harvestAllTrees() spiral arm no: 14
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=7
getStock()minecraft:log, slot=5, quantity=39
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
reeds = 15, sand = 0, logs = 40, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 6, crafting planks
craft(): sd.pSlot=5, sd.pCount=44, sd.fSlot=6, sd.fCount=1
craft(): slot no: 6, log count:1
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=48, sd.fSlot=9, sd.fCount=6
craft(): slot no: 9, log count:6
harvestAllTrees() spiral arm no: 16
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=9
getStock()minecraft:sapling, slot=8, quantity=1
getStock()minecraft:log, slot=5, quantity=48
getStock()minecraft:log, slot=9, quantity=5
getStock()minecraft:log2= not found
reeds = 15, sand = 0, logs = 53, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=55, sd.fSlot=9, sd.fCount=5
craft(): slot no: 9, log count:5
Water source found: checking suitability
Water found: x=-354rel X=9, z=206, rel Z=2
Water found: too close to base camp (rel X=9, rel Z=2)
Water source found: checking suitability
Water found: x=-354rel X=9, z=207, rel Z=1
Water found: too close to base camp (rel X=9, rel Z=1)
Water source found: checking suitability
Water found: x=-354rel X=9, z=208, rel Z=0
Water found: too close to base camp (rel X=9, rel Z=0)
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=56, sd.fSlot=9, sd.fCount=9
craft(): slot no: 9, log count:9
harvestAllTrees() spiral arm no: 18
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=11
getStock()minecraft:sapling, slot=8, quantity=2
getStock()minecraft:log, slot=5, quantity=61
getStock()minecraft:log, slot=9, quantity=8
getStock()minecraft:log2= not found
reeds = 15, sand = 0, logs = 69, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=63, sd.fSlot=9, sd.fCount=8
craft(): slot no: 9, log count:8
Water source found: checking suitability
Water found: x=-353rel X=10, z=216, rel Z=8
Water confirmed and saved to file x=-353, y=63, z=216
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=9, sd.fCount=7
craft(): slot no: 9, log count:7
harvestAllTrees() spiral arm no: 20
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=17
getStock()minecraft:sapling, slot=8, quantity=2
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=9, quantity=15
getStock()minecraft:log, slot=10, quantity=6
getStock()minecraft:log2= not found
reeds = 15, sand = 0, logs = 85, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=9, sd.fCount=15
craft(): slot no: 9, log count:15
getStock()minecraft:coal(0)= not found
Refuelling with log slot 11, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=11, sd.fCount=14
craft(): slot no: 11, log count:14
harvestAllTrees() spiral arm no: 22
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=1, quantity=17
getStock()minecraft:sapling, slot=8, quantity=3
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=9, quantity=22
getStock()minecraft:log, slot=11, quantity=13
getStock()minecraft:log2= not found
reeds = 15, sand = 0, logs = 99, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 11, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=11, sd.fCount=13
craft(): slot no: 11, log count:13
getStock()minecraft:coal(0)= not found
Refuelling with log slot 9, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=9, sd.fCount=22
craft(): slot no: 9, log count:22
getStock()minecraft:coal(0)= not found
Refuelling with log slot 11, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=11, sd.fCount=21
craft(): slot no: 11, log count:21
harvestSand() started
harvestSand() completed
getStock()minecraft:coal(0)= not found
Refuelling with log slot 11, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=11, sd.fCount=20
craft(): slot no: 11, log count:20
harvestAllTrees() spiral arm no: 24
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand, slot=11, quantity=3
getStock()minecraft:sapling, slot=1, quantity=18
getStock()minecraft:sapling, slot=8, quantity=4
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=10, quantity=40
getStock()minecraft:log, slot=12, quantity=19
getStock()minecraft:log2= not found
reeds = 15, sand = 3, logs = 123, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=19
craft(): slot no: 12, log count:19
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=18
craft(): slot no: 12, log count:18
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=31
craft(): slot no: 12, log count:31
harvestAllTrees() spiral arm no: 26
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand, slot=11, quantity=3
getStock()minecraft:sapling, slot=1, quantity=20
getStock()minecraft:sapling, slot=8, quantity=4
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=10, quantity=44
getStock()minecraft:log, slot=12, quantity=36
getStock()minecraft:log2= not found
reeds = 15, sand = 3, logs = 144, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=36
craft(): slot no: 12, log count:36
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=35
craft(): slot no: 12, log count:35
getStock()minecraft:coal(0)= not found
Refuelling with log slot 15, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=15, sd.fCount=1
craft(): slot no: 15, log count:1
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=13, sd.fCount=39
craft(): slot no: 13, log count:39
harvestAllTrees() spiral arm no: 28
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand, slot=11, quantity=3
getStock()minecraft:sapling, slot=1, quantity=25
getStock()minecraft:sapling, slot=8, quantity=5
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=10, quantity=64
getStock()minecraft:log, slot=13, quantity=38
getStock()minecraft:log2= not found
reeds = 15, sand = 3, logs = 166, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=13, sd.fCount=43
craft(): slot no: 13, log count:43
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=13, sd.fCount=48
craft(): slot no: 13, log count:48
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=13, sd.fCount=47
craft(): slot no: 13, log count:47
harvestAllTrees() spiral arm no: 30
getStock()minecraft:reeds, slot=4, quantity=15
getStock()minecraft:sand, slot=11, quantity=3
getStock()minecraft:sapling, slot=1, quantity=28
getStock()minecraft:sapling, slot=8, quantity=6
getStock()minecraft:log, slot=5, quantity=64
getStock()minecraft:log, slot=10, quantity=64
getStock()minecraft:log, slot=13, quantity=46
getStock()minecraft:log, slot=15, quantity=5
getStock()minecraft:log2= not found
reeds = 15, sand = 3, logs = 179, Water found = true
getStock()minecraft:coal(0)= not found
Refuelling with log slot 15, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=15, sd.fCount=5
craft(): slot no: 15, log count:5
getStock()minecraft:coal(0)= not found
Refuelling with log slot 14, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=14, sd.fCount=4
craft(): slot no: 14, log count:4
getStock()minecraft:coal(0)= not found
Refuelling with log slot 14, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=14, sd.fCount=3
craft(): slot no: 14, log count:3
getStock()minecraft:coal(0)= not found
Refuelling with log slot 14, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=14, sd.fCount=2
craft(): slot no: 14, log count:2
getStock()minecraft:coal(0)= not found
Refuelling with log slot 14, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=14, sd.fCount=11
craft(): slot no: 14, log count:11
harvestAllTrees() Completed
Saving Status: '2'
findCobble() Starting…
getStock()minecraft:coal(0)= not found
Refuelling with log slot 14, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=14, sd.fCount=10
craft(): slot no: 14, log count:10
getStock()minecraft:coal(0)= not found
Refuelling with log slot 12, crafting planks
craft(): sd.pSlot=5, sd.pCount=64, sd.fSlot=12, sd.fCount=9
craft(): slot no: 12, log count:9
findCobble() Completed. Saving status '3'
clearBase() Starting…
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
getStock()minecraft:coal(0)= not found
Refuelling with log slot 13, crafting planks
EmptyTrash():moving down
Edited on 05 December 2017 - 07:05 PM
dropdead #93
Posted 06 December 2017 - 10:56 PM
This is just a tad annoying, but at least now I got the same error two times. Long story short:
The turtle does its thing and after mining has a bunch of diamonds in its inventory. Then it comes up, drives forwards and backwards, sorts a bit in between and then it suddenly spits everything out: 372: Slot number 0 out of range

366 -- go back and remove supplies
367 T:go("RRFF") -- diamonds
368 turtle.select(1)
369 turtle.suckDown()
370 itemSlot = T:getItemSlot("minecraft:diamond")
371 keepNum = numTurtles * 3
372 turtle.select(itemSlot)
373 if turtle.getItemCount(itemSlot) &amp;gt; keepNum then
374 turtle.dropDown(turtle.getItemCount(itemSlot) - keepNum)
375 end
And what I see eveytime: somewhere along the way the turtle makes a neat little chest and puts the saplings in… but obviously cannot remember where they went, because when it says something about clearTreefarm() it abandons the project because there are no saplings.
Don't know if that's ever going to work but I'll try anyway. ^^
Put the log in the soiler again…
SpoilerarmLog File Created
homeCoords.txt file created
x = 66, y = 63, z = 113, f = 3
Starting at function harvestFirstTree()
harvestFirstTree() Starting…
harvestFirstTree() Completed. Saving status '1'
harvestAllTrees() Starting…
harvestAllTrees() spiral arm no: 2
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling= not found
getStock()minecraft:log, slot=2, quantity=8
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 8, Water found = false
harvestAllTrees() spiral arm no: 4
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling= not found
getStock()minecraft:log, slot=2, quantity=8
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 8, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 2, crafting planks
craft(): sd.pSlot=2, sd.pCount=14, sd.fSlot=2, sd.fCount=14
craft(): slot no: 2, log count:14
harvestAllTrees() spiral arm no: 6
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling, slot=2, quantity=1
getStock()minecraft:log, slot=3, quantity=20
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 20, Water found = false
harvestSand() started
getStock()minecraft:coal(0)= not found
Refuelling with log slot 3, crafting planks
craft(): sd.pSlot=3, sd.pCount=20, sd.fSlot=3, sd.fCount=20
craft(): slot no: 3, log count:20
harvestSand() completed
harvestSand() started
harvestSand() completed
harvestAllTrees() spiral arm no: 8
getStock()minecraft:reeds= not found
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=3
getStock()minecraft:log, slot=4, quantity=24
getStock()minecraft:log2= not found
reeds = 0, sand = 8, logs = 24, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=28, sd.fSlot=4, sd.fCount=28
craft(): slot no: 4, log count:28
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=38, sd.fSlot=4, sd.fCount=38
craft(): slot no: 4, log count:38
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=50, sd.fSlot=4, sd.fCount=50
craft(): slot no: 4, log count:50
harvestAllTrees() spiral arm no: 10
getStock()minecraft:reeds= not found
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=9
getStock()minecraft:log, slot=4, quantity=49
getStock()minecraft:log2= not found
reeds = 0, sand = 8, logs = 49, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=58, sd.fSlot=4, sd.fCount=58
craft(): slot no: 4, log count:58
harvestAllTrees() spiral arm no: 12
getStock()minecraft:reeds= not found
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=12
getStock()minecraft:log, slot=4, quantity=57
getStock()minecraft:log2= not found
reeds = 0, sand = 8, logs = 57, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=57, sd.fSlot=4, sd.fCount=57
craft(): slot no: 4, log count:57
harvestAllTrees() spiral arm no: 14
getStock()minecraft:reeds= not found
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=12
getStock()minecraft:log, slot=4, quantity=56
getStock()minecraft:log2= not found
reeds = 0, sand = 8, logs = 56, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 4, crafting planks
craft(): sd.pSlot=4, sd.pCount=56, sd.fSlot=4, sd.fCount=56
craft(): slot no: 4, log count:56
harvestAllTrees() spiral arm no: 16
getStock()minecraft:reeds= not found
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=13
getStock()minecraft:log, slot=4, quantity=55
getStock()minecraft:log, slot=6, quantity=7
getStock()minecraft:log2= not found
reeds = 0, sand = 8, logs = 62, Water found = false
getStock()minecraft:coal(0)= not found
Refuelling with log slot 6, crafting planks
craft(): sd.pSlot=4, sd.pCount=57, sd.fSlot=6, sd.fCount=7
craft(): slot no: 6, log count:7
getStock()minecraft:coal(0)= not found
Refuelling with log slot 7, crafting planks
craft(): sd.pSlot=4, sd.pCount=64, sd.fSlot=7, sd.fCount=5
craft(): slot no: 7, log count:5
Reeds found
Water source found: checking suitability
Water found: x=76rel X=10, z=122, rel Z=9
Water confirmed and saved to file x=76, y=63, z=122
Reeds found
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 5, crafting planks
craft(): sd.pSlot=4, sd.pCount=64, sd.fSlot=5, sd.fCount=6
craft(): slot no: 5, log count:6
Reeds found
getStock()minecraft:coal(0)= not found
Refuelling with log slot 7, crafting planks
craft(): sd.pSlot=4, sd.pCount=64, sd.fSlot=7, sd.fCount=11
craft(): slot no: 7, log count:11
harvestAllTrees() spiral arm no: 18
getStock()minecraft:reeds, slot=6, quantity=9
getStock()minecraft:sand, slot=3, quantity=8
getStock()minecraft:sapling, slot=2, quantity=17
getStock()minecraft:log, slot=4, quantity=64
getStock()minecraft:log, slot=5, quantity=13
getStock()minecraft:log, slot=7, quantity=10
getStock()minecraft:log2= not found
reeds = 9, sand = 8, logs = 87, Water found = true
harvestAllTrees() Abandoned after 18 spiral arms: Supplies sufficient
Saving Status: '2'
findCobble() Starting…
getStock()minecraft:coal(0)= not found
Refuelling with log slot 7, crafting planks
craft(): sd.pSlot=4, sd.pCount=64, sd.fSlot=7, sd.fCount=10
craft(): slot no: 7, log count:10
Dumping excess blocks
EmptyTrash():Dropping minecraft:dye
EmptyTrash():Dropping minecraft:obsidian
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=24
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=24
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=24
getStock()minecraft:dirt, slot=1, quantity=36
getStock()minecraft:redstone= not found
getStock()minecraft:coal(0, slot=10, quantity=4
getStock()minecraft:coal(0, slot=8, quantity=9
getStock()minecraft:coal(0, slot=10, quantity=4
refuel() 1 coal used. level=80
findCobble() Completed. Saving status '3'
clearBase() Starting…
getStock()minecraft:coal(0, slot=7, quantity=12
refuel() 1 coal used. level=80
clearBase() Completed. Saving Status '4'
placeStorage() Starting…
getStock()minecraft:log, slot=4, quantity=64
getStock()minecraft:log, slot=5, quantity=13
getStock()minecraft:log, slot=8, quantity=9
craft(): sd.pSlot=4, sd.pCount=64, sd.fSlot=8, sd.fCount=9
craft(): slot no: 4, log count:64
getStock()minecraft:log, slot=4, quantity=61
getStock()minecraft:log, slot=7, quantity=9
craft(): sd.pSlot=4, sd.pCount=61, sd.fSlot=7, sd.fCount=9
craft(): slot no: 7, log count:9
getStock()minecraft:coal(0, slot=6, quantity=11
refuel() 1 coal used. level=80
placeStorage() Completed. Saving Status '5'
createMine() Starting…
getStock()minecraft:coal, slot=6, quantity=10
getStock()minecraft:log, slot=4, quantity=61
getStock()minecraft:log, slot=11, quantity=7
getStock()minecraft:log2= not found
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=4, quantity=61
getStock()minecraft:log, slot=10, quantity=7
getStock()minecraft:log, slot=10, quantity=7
getStock()minecraft:log2= not found
getStock()minecraft:cobblestone, slot=7, quantity=19
getStock()minecraft:dirt, slot=1, quantity=64
getStock()minecraft:dirt, slot=9, quantity=47
getStock()minecraft:dirt, slot=9, quantity=47
getStock()minecraft:iron_ore= not found
getStock()minecraft:bucket= not found
getStock()minecraft:iron_ore= not found
getStock()minecraft:log, slot=10, quantity=7
getStock()minecraft:log2= not found
getStock()minecraft:log, slot=10, quantity=7
getStock()minecraft:log, slot=10, quantity=7
craft(): sd.pSlot=10, sd.pCount=7, sd.fSlot=10, sd.fCount=7
craft(): slot no: 10, log count:7
getStock()minecraft:log, slot=5, quantity=5
getStock()minecraft:log2= not found
craftTorches(8)
getStock()minecraft:stick= not found
getStock()minecraft:planks= not found
getStock()minecraft:coal(0, slot=1, quantity=10
craftTorches(8) coal=10, charcoal=0, planksNeeded=4, woodNeeded=1
getStock()minecraft:log, slot=5, quantity=5
craftTorches(8) using minecraft:log
getStock()minecraft:stick= not found
craftTorches(8) crafting sticks
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=5, quantity=5
craft(): sd.pSlot=5, sd.pCount=5, sd.fSlot=5, sd.fCount=5
craft(): slot no: 5, log count:5
craftTorches(8) crafting torches…
getStock()minecraft:stick, slot=8, quantity=2
craftTorches(8) storing sticks
getStock()minecraft:log, slot=5, quantity=4
getStock()minecraft:log2= not found
getStock()minecraft:log, slot=5, quantity=4
getStock()minecraft:log2= not found
getStock()minecraft:log, slot=5, quantity=4
craft(): sd.pSlot=5, sd.pCount=4, sd.fSlot=5, sd.fCount=4
craft(): slot no: 5, log count:4
getStock()minecraft:stick, slot=7, quantity=2
getStock()minecraft:planks, slot=8, quantity=4
getStock()minecraft:stick, slot=9, quantity=1
getStock()minecraft:sign, slot=10, quantity=3
createMinePrepare(14) Signs avaiable: 3
getStock()minecraft:torch, slot=6, quantity=8
createMinePrepare(14) Torches avaiable: 8
getStock()minecraft:chest, slot=4, quantity=2
createMinePrepare(14) Chests avaiable: 1
createMine() Starting Level 14
getStock()minecraft:coal(0, slot=5, quantity=23
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=5, quantity=51
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=5, quantity=64
getStock()minecraft:coal(0, slot=9, quantity=1
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=5, quantity=64
getStock()minecraft:coal(0, slot=9, quantity=2
refuel() 1 coal used. level=80
getStock()minecraft:chest, slot=4, quantity=2
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:dye
getStock()minecraft:cobblestone, slot=1, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=24
getStock()minecraft:dirt, slot=3, quantity=55
getStock()minecraft:redstone= not found
getStock()minecraft:coal(0, slot=4, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=1
getStock()minecraft:coal(0, slot=4, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=1
refuel() 1 coal used. level=81
createMine() Level 14 complete. Saving Status '6'
getStock()minecraft:coal, slot=4, quantity=63
getStock()minecraft:coal, slot=8, quantity=1
getStock()minecraft:log, slot=6, quantity=2
getStock()minecraft:log2= not found
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=6, quantity=2
getStock()minecraft:log2= not found
getStock()minecraft:cobblestone, slot=1, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=19
getStock()minecraft:cobblestone, slot=8, quantity=19
getStock()minecraft:dirt, slot=3, quantity=55
getStock()minecraft:iron_ore, slot=7, quantity=8
getStock()minecraft:bucket= not found
getStock()minecraft:iron_ore, slot=7, quantity=8
smelt(minecraft:iron_ore, 3) started
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=6, quantity=2
getStock()minecraft:log2= not found
craft(): sd.pSlot=6, sd.pCount=2, sd.fSlot=6, sd.fCount=2
craft(): slot no: 6, log count:2
smelt(minecraft:iron_ore, 3) completed
Water coords from file x=76, y=63, z=122
getStock()minecraft:bucket, slot=8, quantity=1
goToWater() started
goToWater() completed
goToWater() started
Water bucket filled x=76, y=63, z=122
Water collected at: x=76, y=63, z=122
goToWater() completed
returnHome() started
getStock()minecraft:coal(0, slot=3, quantity=64
refuel() 1 coal used. level=80
returnHome() completed
returnHome() started
returnHome() completed
returnHome() started
returnHome() completed
Water added to pond at: x=66, y=63, z=110
goToWater() started
goToWater() completed
goToWater() started
Water bucket filled x=76, y=63, z=122
Water collected at: x=76, y=63, z=122
goToWater() completed
returnHome() started
returnHome() completed
returnHome() started
returnHome() completed
returnHome() started
returnHome() completed
Water added (after moving) to pond at: x=66, y=63, z=110
getStock()minecraft:log, slot=7, quantity=1
getStock()minecraft:torch, slot=4, quantity=1
clearTreeFarm() starting
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=7, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:iron_ore, slot=5, quantity=5
getStock()minecraft:coal(0, slot=3, quantity=63
refuel() 1 coal used. level=80
getStock()minecraft:sapling= not found
No saplings: treeFarm abandoned
getStock()minecraft:log, slot=7, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:sign= not found
createMinePrepare(11) Signs avaiable: 0
getStock()minecraft:torch, slot=4, quantity=1
createMinePrepare(11) Torches avaiable: 1
getStock()minecraft:chest, slot=9, quantity=1
createMinePrepare(11) Chests avaiable: 0
createMine() Starting Level 11
getStock()minecraft:coal(0, slot=3, quantity=62
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=61
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=60
refuel() 1 coal used. level=80
getStock()minecraft:chest, slot=9, quantity=1
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:obsidian
getStock()minecraft:cobblestone, slot=5, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=2
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:redstone, slot=9, quantity=25
getStock()minecraft:coal(0, slot=3, quantity=59
getStock()minecraft:coal(0, slot=3, quantity=59
refuel() 1 coal used. level=80
createMine() Level 11 complete. Saving Status '7'
getStock()minecraft:coal, slot=3, quantity=58
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:cobblestone, slot=5, quantity=54
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:iron_ore, slot=4, quantity=12
getStock()minecraft:bucket, slot=7, quantity=1
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:torch= not found
clearTreeFarm() starting
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:iron_ore, slot=4, quantity=12
getStock()minecraft:coal(0, slot=3, quantity=58
refuel() 1 coal used. level=84
getStock()minecraft:sapling= not found
No saplings: treeFarm abandoned
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:sign= not found
createMinePrepare(8) Signs avaiable: 0
getStock()minecraft:torch= not found
createMinePrepare(8) Torches avaiable: 0
getStock()minecraft:chest, slot=8, quantity=1
createMinePrepare(8) Chests avaiable: 0
createMine() Starting Level 8
getStock()minecraft:coal(0, slot=3, quantity=57
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=56
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=10, quantity=7
refuel() 1 coal used. level=80
getStock()minecraft:chest, slot=8, quantity=1
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:gold_ore
EmptyTrash():Dropping minecraft:gravel
getStock()minecraft:cobblestone, slot=5, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=23
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:redstone= not found
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=9, quantity=6
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=9, quantity=6
refuel() 1 coal used. level=80
createMine() Level 8 complete. Saving Status '8'
createMine() Completed…
getStock()minecraft:iron_ore, slot=4, quantity=16
getStock()minecraft:diamond(0, slot=1, quantity=1
completeMining() Starting level 14
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:cobblestone, slot=5, quantity=64
getStock()minecraft:cobblestone, slot=8, quantity=23
getStock()minecraft:cobblestone, slot=8, quantity=23
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:iron_ore, slot=4, quantity=16
getStock()minecraft:log, slot=6, quantity=1
getStock()minecraft:torch= not found
clearTreeFarm() starting
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=5
refuel() 1 coal used. level=80
getStock()minecraft:iron_ore, slot=4, quantity=16
getStock()minecraft:sapling= not found
No saplings: treeFarm abandoned
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=5
getStock()minecraft:log2(0)= not found
getStock()minecraft:log2(1)= not found
getStock()minecraft:torch= not found
craftTorches(24)
getStock()minecraft:stick= not found
getStock()minecraft:planks= not found
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=5
craftTorches(24) coal=68, charcoal=0, planksNeeded=4, woodNeeded=2
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:log2= not found
craftTorches(24) using minecraft:log
goMining() Level 14 started
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=5
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=62
getStock()minecraft:coal(0, slot=8, quantity=5
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=16
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=16
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=62
getStock()minecraft:coal(0, slot=8, quantity=16
refuel() 1 coal used. level=80
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:gold_ore
EmptyTrash():Dropping minecraft:arrow
EmptyTrash():Dropping minecraft:bone
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=3
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=3
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:redstone, slot=10, quantity=28
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=13
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=13
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=13
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=13
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=13
refuel() 1 coal used. level=80
EmptyTrash():moving down
EmptyTrash():down success
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=30
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=30
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=30
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=30
getStock()minecraft:dirt, slot=2, quantity=60
getStock()minecraft:redstone, slot=10, quantity=50
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=11
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=11
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=11
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=62
getStock()minecraft:coal(0, slot=8, quantity=11
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=61
getStock()minecraft:coal(0, slot=8, quantity=11
refuel() 1 coal used. level=85
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:arrow
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=11, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=54
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=54
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=54
getStock()minecraft:dirt, slot=2, quantity=62
getStock()minecraft:redstone, slot=10, quantity=50
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=7
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=7
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=22
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=22
refuel() 1 coal used. level=80
EmptyTrash():moving down
EmptyTrash():down success
EmptyTrash():Dropping minecraft:rotten_flesh
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=12, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=53
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=9, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=53
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=13, quantity=53
getStock()minecraft:dirt, slot=2, quantity=62
getStock()minecraft:redstone, slot=10, quantity=64
getStock()minecraft:redstone, slot=11, quantity=4
getStock()minecraft:redstone, slot=11, quantity=4
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=20
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=20
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=63
getStock()minecraft:coal(0, slot=8, quantity=20
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=62
getStock()minecraft:coal(0, slot=8, quantity=20
refuel() 1 coal used. level=80
getStock()minecraft:coal(0, slot=3, quantity=61
getStock()minecraft:coal(0, slot=8, quantity=20
refuel() 1 coal used. level=80
EmptyTrash():moving down
EmptyTrash():down success
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=10, quantity=52
getStock()minecraft:dirt, slot=2, quantity=64
getStock()minecraft:redstone, slot=9, quantity=4
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=16
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=8, quantity=16
refuel() 1 coal used. level=80
goMining() Level 14 completed
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:cobblestone, slot=7, quantity=64
getStock()minecraft:cobblestone, slot=10, quantity=52
getStock()minecraft:cobblestone, slot=10, quantity=52
getStock()minecraft:dirt, slot=2, quantity=64
getStock()minecraft:iron_ore, slot=4, quantity=25
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:torch= not found
clearTreeFarm() starting
getStock()minecraft:planks= not found
getStock()minecraft:log, slot=5, quantity=1
getStock()minecraft:log2= not found
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=7, quantity=15
refuel() 1 coal used. level=80
getStock()minecraft:iron_ore, slot=4, quantity=25
getStock()minecraft:sapling= not found
No saplings: treeFarm abandoned
getStock()minecraft:diamond, slot=1, quantity=9
completeMining() level 11 complete. Saving Status '10'
getStock()minecraft:diamond(0, slot=1, quantity=9
getStock()minecraft:diamond(0, slot=1, quantity=9
craftMiningTurtle() started
getStock()minecraft:coal(0, slot=3, quantity=64
getStock()minecraft:coal(0, slot=7, quantity=14
refuel() 1 coal used. level=132
Edited on 08 December 2017 - 08:16 PM
doctorwhofan92 #94
Posted 10 August 2018 - 06:03 AM
Hey so the code still isn't working on Computercraft 1.7.5 for 1.7.10 getting the 0 is out of range error
Bomb Bloke #95
Posted 11 August 2018 - 03:11 PM
The author hasn't posted here in quite some time, so unless you're willing to update it for your specific Minecraft build yourself, that's unlikely to change. Earlier posts in this discussion already discuss how to narrow the problem down.
Inksaver #96
Posted 09 December 2018 - 06:24 PM
I have now retired the original 12,000 lines to a new pastebin link: https://pastebin.com/JVD1RPfg
The link given in my original post has now been updated to a new version with less than half the line count which is far more reliable. Here it is again: https://pastebin.com/2Zf5an8H

It served its purpose well, and is still useful for those interested in the concept of machine learning / AI as the turtle had to learn by experiment what the various blocks are, but the huge difficulty of keeping track of all the items during a run session lasting up to 12 hours was a nightmare. I am amazed it ever worked at all.

This has been tested on a portable version of MC 1.7.10 and the latest launcher running MC 1.8.9.

Please continue to enjoy and learn. I now use the computercraft mod in coding clubs due to the instant feedback young pupils get when trying it out.
dropdead #97
Posted 10 January 2019 - 05:42 PM
I have now retired the original 12,000 lines to a new pastebin link: https://pastebin.com/JVD1RPfg
The link given in my original post has now been updated to a new version with less than half the line count which is far more reliable. Here it is again: https://pastebin.com/2Zf5an8H

It served its purpose well, and is still useful for those interested in the concept of machine learning / AI as the turtle had to learn by experiment what the various blocks are, but the huge difficulty of keeping track of all the items during a run session lasting up to 12 hours was a nightmare. I am amazed it ever worked at all.

Well well,

what do we have here? Looks like another chance for me to FINALLY get this program to work.

I have tried countless times since I first found this program years ago and one of the last version I got always got confused where the chests were exactly as well as the tree farm. This was a run that really got me somewhere, although I had to help the turtle a bit or it wouldn't have found the chests for the material and the chest for saplings. In the end it bugged out like always with the lovely "ArrayIndexOutOfBoundsException".

Looks like I'm up for another test. I'm nothing if not persistant. <chuckle>


Thank you for the update!
dropdead #98
Posted 10 January 2019 - 06:52 PM
… Looks like I'm up for another test. …
That was fast. Turtle found massive amounts of wood and saplings, started to create the homebase. After it built a furnace it spit it out - probably because of a full inventory. It built a bit more of the base and when it tried to place the furnace it wasn't there (because it was lying around somewhere).
Great.
Would have posted a pic or something but I can't find where to upload it. Since I have no webspace I can not use an URL.
Edited on 11 January 2019 - 12:01 AM
dropdead #99
Posted 11 January 2019 - 05:00 PM
Huh,
guess I never get this to work. This time I followed it around the whole time and it was a good idea - turtle would have found only two diamonds otherwise. After deep mining for diamonds it got up, sorted a bit and then a bit more and went to put the stuff for away aside from things needed for the pickaxe. Then there it was again: "Slot number 0 out of range".
To me it looked as if this happened exactly after it put some diamonds away. It last words:
"selfrepneu.lua:2687: Slot number 0 out of range"
The end of the log file:

SpoilerEmptyTrash():Dropping minecraft:dirt
EmptyTrash():Dropping minecraft:gold_ore
clsTurtle:sortInventory() started chest found in slot 10
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest NOT placed:forward
clsTurtle:sortInventory() chest NOT placed:forward
clsTurtle:sortInventory() chest NOT placed:forward
clsTurtle:sortInventory() chest NOT placed:forward
clsTurtle:sortInventory() chest NOT placed:forward
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
Waiting for mob to leave…
Waiting for mob to leave…
createMine() Level 8 complete. Saving Status '8'
Saving Status: '8'
craftMiningTurtle() started
clsTurtle:sortInventory() started chest found in slot 10
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)

It stood exactly over the chest between the iron and the stone/dirt. I guess this is where it got the sugarcane.

What I did while following it around was to snag a stack of stones or obsidian when the inventory was full but I don't think the turtle cares because it always sorts its inventory after digging out a row of stone and throws stone/dirt/gravel away if it has more than one stack. I only did that because the first run failed when the inventory was completely full.

Quite a couple of month ago I played around with the older code and this time it came quite far, although I had to place all chests one block back, because it got confused where the heck all the chests where. Then it even made a computer and somewhere around then it got confused with all the stuff in the inventory and the program died.
Don't know why it never works for me. <sigh>
Edited on 11 January 2019 - 04:05 PM
dropdead #100
Posted 12 January 2019 - 03:19 AM
The story continuous!

This time everything went well until the turtle had crafted a bucket. It started the method goToWater() and drove off into the sunset. Quite literally.

In the computer folder of the turtle was no file "waterCoords.txt". The coords it loaded where from "homeCoords.txt". I followed it for a while until I looked what the heck it was trying to do and saw that the water coords in the display where changed everytime it stopped to refuel.

I have absolutely no idea why it will not work for me when everybody says it does. I didn't use a portable version of MC 1.7.1 but a normal one. In the past I have tried different MC versions and different computercraft versions and, for good measure, different forge versions.

So I am a bit obsessed.

Since I didn't get how exactly the turtle got confused again, I'll post the log in the spoiler. Especially the end until I destroyed it was interesting.

Spoiler

homeCoords.txt file created
x = 785, y = 76, z = -3419, f = 1
Starting at function T:harvestFirstTree()
Refuelling with log slot 1, crafting planks
refuel() planks used. level=60
Missing crafting ingredients.
Missing crafting ingredients.
harvestFirstTree() Completed.
Saving Status: '1'
harvestAllTrees() Starting…
harvestAllTrees() spiral arm no: 2
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 2, Water found = false
harvestAllTrees() spiral arm no: 4
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:sapling= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 2, Water found = false
Refuelling with log slot 2, crafting planks
harvestAllTrees() spiral arm no: 6
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 1, Water found = false
harvestAllTrees() spiral arm no: 8
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 1, Water found = false
Refuelling with log slot 4, crafting planks
Refuelling with log slot 4, crafting planks
harvestAllTrees() spiral arm no: 10
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 13, Water found = false
Refuelling with log slot 4, crafting planks
harvestAllTrees() spiral arm no: 12
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 18, Water found = false
Refuelling with log slot 4, crafting planks
Water found, checking suitability: x=793, z=-3422
Water too close to base camp x=0, y=0, z=0
harvestAllTrees() spiral arm no: 14
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 23, Water found = false
Refuelling with log slot 4, crafting planks
Reeds found
Water found, checking suitability: x=794, z=-3423
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3422
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3421
Water too close to base camp x=0, y=0, z=0
Reeds found
Refuelling with log slot 4, crafting planks
harvestAllTrees() spiral arm no: 16
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 6, sand = 0, logs = 38, Water found = false
Refuelling with log slot 5, crafting planks
Reeds found
Water found, checking suitability: x=794, z=-3421
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3420
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3419
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3418
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=794, z=-3417
Water too close to base camp x=0, y=0, z=0
Reeds found
Refuelling with log slot 5, crafting planks
harvestAllTrees() spiral arm no: 18
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 40, Water found = false
Refuelling with log slot 5, crafting planks
Water found, checking suitability: x=795, z=-3420
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3419
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3418
Water too close to base camp x=0, y=0, z=0
Refuelling with log slot 5, crafting planks
Water found, checking suitability: x=795, z=-3417
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3416
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3415
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3414
Water too close to base camp x=0, y=0, z=0
harvestAllTrees() spiral arm no: 20
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 52, Water found = false
Refuelling with log slot 6, crafting planks
Refuelling with log slot 7, crafting planks
Water found, checking suitability: x=795, z=-3422
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3421
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3420
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3419
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3418
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3417
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3416
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=795, z=-3415
Water too close to base camp x=0, y=0, z=0
harvestAllTrees() spiral arm no: 22
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 55, Water found = false
Refuelling with log slot 7, crafting planks
Refuelling with log slot 7, crafting planks
Water found, checking suitability: x=797, z=-3421
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=797, z=-3420
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=797, z=-3419
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=797, z=-3418
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=797, z=-3417
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=797, z=-3416
Water too close to base camp x=0, y=0, z=0
Refuelling with log slot 7, crafting planks
harvestAllTrees() spiral arm no: 24
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 58, Water found = false
Refuelling with log slot 8, crafting planks
Water found, checking suitability: x=799, z=-3420
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=799, z=-3419
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=799, z=-3418
Water too close to base camp x=0, y=0, z=0
Water found, checking suitability: x=799, z=-3417
Water too close to base camp x=0, y=0, z=0
Refuelling with log slot 8, crafting planks
harvestAllTrees() spiral arm no: 26
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 73, Water found = false
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
Water found, checking suitability: x=799, z=-3421
Water too close to base camp x=0, y=0, z=0
Refuelling with log slot 8, crafting planks
Water found, checking suitability: x=799, z=-3420
Water too close to base camp x=0, y=0, z=0
Refuelling with log slot 8, crafting planks
harvestAllTrees() spiral arm no: 28
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 95, Water found = false
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
harvestAllTrees() spiral arm no: 30
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 10, sand = 0, logs = 120, Water found = false
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
harvestAllTrees() Completed.
Saving Status: '2'
findCobble() Starting…
Refuelling with log slot 9, crafting planks
Refuelling with log slot 8, crafting planks
Refuelling with log slot 8, crafting planks
findCobble() Completed.
Saving Status: '3'
clearBase() Starting…
Refuelling with log slot 10, crafting planks
clearBase() Completed.
Saving Status: '4'
placeStorage() Starting…
craft(): slot no: 10, log count:64
craft(): slot no: 12, log count:64
Refuelling with log slot 12, crafting planks
placeStorage() Completed.
Saving Status: '5'
createMine() Starting…
getStock()minecraft:coal(-1)= not found
getStock()minecraft:log2= not found
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:log2= not found
Refuelling with log slot 11, crafting planks
getStock()minecraft:bucket(-1)= not found
smelt(minecraft:iron_ore, 3) started
getStock()minecraft:planks(-1)= not found
craft(): slot no: 5, log count:62
smelt(minecraft:iron_ore, 3) completed
fillPond() started
Coordinates loaded from file:
x = 785, y = 76, z = -3419, f = 1
goToWater() started.
Refuelling with log slot 5, crafting planks
Refuelling with log slot 7, crafting planks
Water bucket filled x=649, y=63, z=-3419
Water collected at: x=649, y=63, z=-3419
Water collected at: x=648, y=63, z=-3419
Water collected at: x=647, y=63, z=-3419
Refuelling with log slot 7, crafting planks
Water collected at: x=646, y=63, z=-3419
Water collected at: x=645, y=63, z=-3419
Water collected at: x=644, y=63, z=-3419
Water collected at: x=643, y=63, z=-3419
Water collected at: x=642, y=63, z=-3419
Water collected at: x=641, y=63, z=-3419
Water collected at: x=640, y=63, z=-3419
Water collected at: x=639, y=63, z=-3419
Water collected at: x=638, y=65, z=-3419
Water collected at: x=637, y=65, z=-3419
Water collected at: x=636, y=65, z=-3419
Water collected at: x=635, y=65, z=-3419
Water collected at: x=634, y=65, z=-3419
Water collected at: x=633, y=65, z=-3419
Water collected at: x=632, y=65, z=-3419
Water collected at: x=631, y=65, z=-3419
Water collected at: x=630, y=65, z=-3419
Water collected at: x=629, y=65, z=-3419
Water collected at: x=628, y=65, z=-3419
Water collected at: x=627, y=65, z=-3419
Water collected at: x=626, y=65, z=-3419
Water collected at: x=625, y=65, z=-3419
Water collected at: x=624, y=65, z=-3419
Water collected at: x=623, y=66, z=-3419
Water collected at: x=622, y=66, z=-3419
Water collected at: x=621, y=66, z=-3419
Water collected at: x=620, y=66, z=-3419
Water collected at: x=619, y=67, z=-3419
Water collected at: x=618, y=67, z=-3419
Water collected at: x=617, y=67, z=-3419
Water collected at: x=616, y=67, z=-3419
Water collected at: x=615, y=67, z=-3419
Water collected at: x=614, y=68, z=-3419
Water collected at: x=613, y=68, z=-3419
Water collected at: x=612, y=68, z=-3419
Water collected at: x=611, y=69, z=-3419
Water collected at: x=610, y=69, z=-3419
Water collected at: x=609, y=70, z=-3419
Water collected at: x=608, y=70, z=-3419
Water collected at: x=607, y=71, z=-3419
Water collected at: x=606, y=72, z=-3419
Water collected at: x=605, y=73, z=-3419
Water collected at: x=604, y=75, z=-3419
Water collected at: x=603, y=76, z=-3419
Water collected at: x=602, y=77, z=-3419
Refuelling with log slot 7, crafting planks
Water collected at: x=601, y=78, z=-3419
Water collected at: x=600, y=79, z=-3419
Water collected at: x=599, y=79, z=-3419
Water collected at: x=598, y=79, z=-3419
Water collected at: x=597, y=80, z=-3419
Water collected at: x=596, y=80, z=-3419
Water collected at: x=595, y=80, z=-3419
Water collected at: x=594, y=80, z=-3419
Water collected at: x=593, y=81, z=-3419
Water collected at: x=592, y=82, z=-3419
Water collected at: x=591, y=82, z=-3419
Water collected at: x=590, y=82, z=-3419
Water collected at: x=589, y=82, z=-3419
Water collected at: x=588, y=82, z=-3419
Water collected at: x=587, y=82, z=-3419
Water collected at: x=586, y=82, z=-3419
Water collected at: x=585, y=83, z=-3419
Water collected at: x=584, y=83, z=-3419
Water collected at: x=583, y=83, z=-3419
Water collected at: x=582, y=83, z=-3419
Water collected at: x=581, y=83, z=-3419
Water collected at: x=580, y=84, z=-3419
Water collected at: x=579, y=84, z=-3419
Water collected at: x=578, y=84, z=-3419
Water collected at: x=577, y=84, z=-3419
Water collected at: x=576, y=84, z=-3419
Water collected at: x=575, y=84, z=-3419
Water collected at: x=574, y=83, z=-3419
Water collected at: x=573, y=83, z=-3419
Water collected at: x=572, y=83, z=-3419
Water collected at: x=571, y=82, z=-3419
Water collected at: x=570, y=81, z=-3419
Water collected at: x=569, y=81, z=-3419
Water collected at: x=568, y=80, z=-3419
Water collected at: x=567, y=79, z=-3419
Water collected at: x=566, y=77, z=-3419
Water collected at: x=565, y=75, z=-3419
Water collected at: x=564, y=73, z=-3419
Water collected at: x=563, y=73, z=-3419
Water collected at: x=562, y=72, z=-3419
Water collected at: x=561, y=72, z=-3419
Water collected at: x=560, y=72, z=-3419
Refuelling with log slot 7, crafting planks
Water collected at: x=559, y=72, z=-3419
Water collected at: x=558, y=72, z=-3419
Water collected at: x=557, y=72, z=-3419
Water collected at: x=556, y=72, z=-3419
Water collected at: x=555, y=72, z=-3419
Water collected at: x=554, y=72, z=-3419
Water collected at: x=553, y=72, z=-3419
Water collected at: x=552, y=72, z=-3419
Water collected at: x=551, y=72, z=-3419
Water collected at: x=550, y=72, z=-3419
Water collected at: x=549, y=72, z=-3419
Water collected at: x=548, y=72, z=-3419
Water collected at: x=547, y=72, z=-3419
Water collected at: x=546, y=72, z=-3419
Water collected at: x=545, y=72, z=-3419
Water collected at: x=544, y=72, z=-3419
Water collected at: x=543, y=72, z=-3419
Water collected at: x=542, y=72, z=-3419
Water collected at: x=541, y=72, z=-3419
Water collected at: x=540, y=72, z=-3419
Water collected at: x=539, y=73, z=-3419
Water collected at: x=538, y=72, z=-3419
Water collected at: x=537, y=72, z=-3419
Water collected at: x=536, y=72, z=-3419
Water collected at: x=535, y=72, z=-3419
Water collected at: x=534, y=72, z=-3419
Water collected at: x=533, y=72, z=-3419
Water collected at: x=532, y=73, z=-3419
Water collected at: x=531, y=73, z=-3419
Water collected at: x=530, y=73, z=-3419
Water collected at: x=529, y=73, z=-3419
Water collected at: x=528, y=74, z=-3419
Water collected at: x=527, y=74, z=-3419
Water collected at: x=526, y=74, z=-3419
Water collected at: x=525, y=74, z=-3419
Water collected at: x=524, y=75, z=-3419
Water collected at: x=523, y=75, z=-3419
Water collected at: x=522, y=75, z=-3419
Water collected at: x=521, y=75, z=-3419
Water collected at: x=520, y=76, z=-3419
Water collected at: x=519, y=76, z=-3419
Water collected at: x=518, y=76, z=-3419
Water collected at: x=517, y=76, z=-3419
Water collected at: x=516, y=76, z=-3419
Water collected at: x=515, y=76, z=-3419
Water collected at: x=514, y=76, z=-3419
Water collected at: x=513, y=76, z=-3419
Water collected at: x=512, y=76, z=-3419
Water collected at: x=511, y=76, z=-3419
Water collected at: x=510, y=76, z=-3419
Water collected at: x=509, y=76, z=-3419
Water collected at: x=508, y=77, z=-3419
Water collected at: x=507, y=77, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=506, y=77, z=-3419
Water collected at: x=505, y=77, z=-3419
Water collected at: x=504, y=77, z=-3419
Water collected at: x=503, y=78, z=-3419
Water collected at: x=502, y=78, z=-3419
Water collected at: x=501, y=77, z=-3419
Water collected at: x=500, y=77, z=-3419
Water collected at: x=499, y=77, z=-3419
Water collected at: x=498, y=77, z=-3419
Water collected at: x=497, y=77, z=-3419
Water collected at: x=496, y=77, z=-3419
Water collected at: x=495, y=77, z=-3419
Water collected at: x=494, y=77, z=-3419
Water collected at: x=493, y=77, z=-3419
Water collected at: x=492, y=78, z=-3419
Water collected at: x=491, y=77, z=-3419
Water collected at: x=490, y=77, z=-3419
Water collected at: x=489, y=77, z=-3419
Water collected at: x=488, y=77, z=-3419
Water collected at: x=487, y=77, z=-3419
Water collected at: x=486, y=78, z=-3419
Water collected at: x=485, y=78, z=-3419
Water collected at: x=484, y=78, z=-3419
Water collected at: x=483, y=78, z=-3419
Water collected at: x=482, y=78, z=-3419
Water collected at: x=481, y=78, z=-3419
Water collected at: x=480, y=78, z=-3419
Water collected at: x=479, y=78, z=-3419
Water collected at: x=478, y=78, z=-3419
Water collected at: x=477, y=77, z=-3419
Water collected at: x=476, y=77, z=-3419
Water collected at: x=475, y=76, z=-3419
Water collected at: x=474, y=76, z=-3419
Water collected at: x=473, y=76, z=-3419
Water collected at: x=472, y=76, z=-3419
Water collected at: x=471, y=75, z=-3419
Water collected at: x=470, y=74, z=-3419
Water collected at: x=469, y=74, z=-3419
Water collected at: x=468, y=74, z=-3419
Water collected at: x=467, y=73, z=-3419
Water collected at: x=466, y=72, z=-3419
Water collected at: x=465, y=72, z=-3419
Water collected at: x=464, y=67, z=-3419
Water collected at: x=463, y=67, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=462, y=67, z=-3419
Water collected at: x=461, y=71, z=-3419
Water collected at: x=460, y=71, z=-3419
Water collected at: x=459, y=71, z=-3419
Water collected at: x=458, y=71, z=-3419
Water collected at: x=457, y=71, z=-3419
Water collected at: x=456, y=71, z=-3419
Water collected at: x=455, y=71, z=-3419
Water collected at: x=454, y=71, z=-3419
Water collected at: x=453, y=71, z=-3419
Water collected at: x=452, y=71, z=-3419
Water collected at: x=451, y=71, z=-3419
Water collected at: x=450, y=71, z=-3419
Water collected at: x=449, y=71, z=-3419
Water collected at: x=448, y=71, z=-3419
Water collected at: x=447, y=71, z=-3419
Water collected at: x=446, y=71, z=-3419
Water collected at: x=445, y=71, z=-3419
Water collected at: x=444, y=71, z=-3419
Water collected at: x=443, y=71, z=-3419
Water collected at: x=442, y=71, z=-3419
Water collected at: x=441, y=71, z=-3419
Water collected at: x=440, y=71, z=-3419
Water collected at: x=439, y=71, z=-3419
Water collected at: x=438, y=71, z=-3419
Water collected at: x=437, y=71, z=-3419
Water collected at: x=436, y=71, z=-3419
Water collected at: x=435, y=71, z=-3419
Water collected at: x=434, y=71, z=-3419
Water collected at: x=433, y=71, z=-3419
Water collected at: x=432, y=71, z=-3419
Water collected at: x=431, y=71, z=-3419
Water collected at: x=430, y=71, z=-3419
Water collected at: x=429, y=71, z=-3419
Water collected at: x=428, y=71, z=-3419
Water collected at: x=427, y=71, z=-3419
Water collected at: x=426, y=71, z=-3419
Water collected at: x=425, y=71, z=-3419
Water collected at: x=424, y=71, z=-3419
Water collected at: x=423, y=71, z=-3419
Water collected at: x=422, y=67, z=-3419
Water collected at: x=421, y=67, z=-3419
Water collected at: x=420, y=67, z=-3419
Water collected at: x=419, y=67, z=-3419
Water collected at: x=418, y=67, z=-3419
Water collected at: x=417, y=67, z=-3419
Water collected at: x=416, y=67, z=-3419
Water collected at: x=415, y=67, z=-3419
Water collected at: x=414, y=68, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=413, y=72, z=-3419
Water collected at: x=412, y=72, z=-3419
Water collected at: x=411, y=71, z=-3419
Water collected at: x=410, y=71, z=-3419
Water collected at: x=409, y=70, z=-3419
Water collected at: x=408, y=65, z=-3419
Water collected at: x=407, y=65, z=-3419
Water collected at: x=406, y=66, z=-3419
Water collected at: x=405, y=66, z=-3419
Water collected at: x=404, y=66, z=-3419
Water collected at: x=403, y=67, z=-3419
Water collected at: x=402, y=67, z=-3419
Water collected at: x=401, y=68, z=-3419
Water collected at: x=400, y=68, z=-3419
Water collected at: x=399, y=67, z=-3419
Water collected at: x=398, y=67, z=-3419
Water collected at: x=397, y=67, z=-3419
Water collected at: x=396, y=67, z=-3419
Water collected at: x=395, y=67, z=-3419
Water collected at: x=394, y=67, z=-3419
Water collected at: x=393, y=67, z=-3419
Water collected at: x=392, y=67, z=-3419
Water collected at: x=391, y=67, z=-3419
Water collected at: x=390, y=67, z=-3419
Water collected at: x=389, y=67, z=-3419
Water collected at: x=388, y=67, z=-3419
Water collected at: x=387, y=68, z=-3419
Water collected at: x=386, y=68, z=-3419
Water collected at: x=385, y=68, z=-3419
Water collected at: x=384, y=68, z=-3419
Water collected at: x=383, y=69, z=-3419
Water collected at: x=382, y=69, z=-3419
Water collected at: x=381, y=69, z=-3419
Water collected at: x=380, y=69, z=-3419
Water collected at: x=379, y=69, z=-3419
Water collected at: x=378, y=69, z=-3419
Water collected at: x=377, y=69, z=-3419
Water collected at: x=376, y=69, z=-3419
Water collected at: x=375, y=70, z=-3419
Water collected at: x=374, y=70, z=-3419
Water collected at: x=373, y=70, z=-3419
Water collected at: x=372, y=70, z=-3419
Water collected at: x=371, y=70, z=-3419
Water collected at: x=370, y=70, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=369, y=70, z=-3419
Water collected at: x=368, y=70, z=-3419
Water collected at: x=367, y=69, z=-3419
Water collected at: x=366, y=69, z=-3419
Water collected at: x=365, y=68, z=-3419
Water collected at: x=364, y=67, z=-3419
Water collected at: x=363, y=66, z=-3419
Water collected at: x=362, y=65, z=-3419
Water collected at: x=361, y=64, z=-3419
Water collected at: x=360, y=64, z=-3419
Water collected at: x=359, y=64, z=-3419
Water collected at: x=358, y=63, z=-3419
Water collected at: x=357, y=63, z=-3419
Water collected at: x=356, y=63, z=-3419
Water collected at: x=355, y=63, z=-3419
Water collected at: x=354, y=63, z=-3419
Water collected at: x=353, y=63, z=-3419
Water collected at: x=352, y=63, z=-3419
Water collected at: x=351, y=63, z=-3419
Water collected at: x=350, y=63, z=-3419
Water collected at: x=349, y=63, z=-3419
Water collected at: x=348, y=63, z=-3419
Water collected at: x=347, y=63, z=-3419
Water collected at: x=346, y=63, z=-3419
Water collected at: x=345, y=63, z=-3419
Water collected at: x=344, y=63, z=-3419
Water collected at: x=343, y=63, z=-3419
Water collected at: x=342, y=63, z=-3419
Water collected at: x=341, y=63, z=-3419
Water collected at: x=340, y=63, z=-3419
Water collected at: x=339, y=63, z=-3419
Water collected at: x=338, y=63, z=-3419
Water collected at: x=337, y=63, z=-3419
Water collected at: x=336, y=63, z=-3419
Water collected at: x=335, y=63, z=-3419
Water collected at: x=334, y=63, z=-3419
Water collected at: x=333, y=63, z=-3419
Water collected at: x=332, y=63, z=-3419
Water collected at: x=331, y=63, z=-3419
Water collected at: x=330, y=63, z=-3419
Water collected at: x=329, y=63, z=-3419
Water collected at: x=328, y=63, z=-3419
Water collected at: x=327, y=64, z=-3419
Water collected at: x=326, y=64, z=-3419
Water collected at: x=325, y=65, z=-3419
Water collected at: x=324, y=66, z=-3419
Water collected at: x=323, y=67, z=-3419
Water collected at: x=322, y=67, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=321, y=68, z=-3419
Water collected at: x=320, y=68, z=-3419
Water collected at: x=319, y=69, z=-3419
Water collected at: x=318, y=69, z=-3419
Water collected at: x=317, y=69, z=-3419
Water collected at: x=316, y=70, z=-3419
Water collected at: x=315, y=70, z=-3419
Waiting for mob to leave…
Water collected at: x=315, y=70, z=-3419
Water collected at: x=314, y=71, z=-3419
Water collected at: x=313, y=71, z=-3419
Water collected at: x=312, y=71, z=-3419
Water collected at: x=311, y=71, z=-3419
Water collected at: x=310, y=71, z=-3419
Water collected at: x=309, y=71, z=-3419
Water collected at: x=308, y=71, z=-3419
Water collected at: x=307, y=71, z=-3419
Water collected at: x=306, y=71, z=-3419
Water collected at: x=305, y=70, z=-3419
Water collected at: x=304, y=70, z=-3419
Water collected at: x=303, y=70, z=-3419
Water collected at: x=302, y=70, z=-3419
Water collected at: x=301, y=70, z=-3419
Water collected at: x=300, y=70, z=-3419
Water collected at: x=299, y=70, z=-3419
Water collected at: x=298, y=70, z=-3419
Water collected at: x=297, y=70, z=-3419
Water collected at: x=296, y=70, z=-3419
Water collected at: x=295, y=79, z=-3419
Water collected at: x=294, y=79, z=-3419
Water collected at: x=293, y=76, z=-3419
Water collected at: x=292, y=69, z=-3419
Water collected at: x=291, y=69, z=-3419
Water collected at: x=290, y=69, z=-3419
Water collected at: x=289, y=69, z=-3419
Water collected at: x=288, y=69, z=-3419
Water collected at: x=287, y=69, z=-3419
Water collected at: x=286, y=69, z=-3419
Refuelling with log slot 8, crafting planks
Water collected at: x=285, y=69, z=-3419
Water collected at: x=284, y=69, z=-3419
Water collected at: x=283, y=69, z=-3419
Water collected at: x=282, y=69, z=-3419
Water collected at: x=281, y=69, z=-3419
Water collected at: x=280, y=69, z=-3419
Water collected at: x=279, y=69, z=-3419
Water collected at: x=278, y=69, z=-3419
Water collected at: x=277, y=68, z=-3419
Water collected at: x=276, y=68, z=-3419
Water collected at: x=275, y=68, z=-3419
Water collected at: x=274, y=68, z=-3419
Water collected at: x=273, y=68, z=-3419
Water collected at: x=272, y=68, z=-3419
Water collected at: x=271, y=68, z=-3419
Water collected at: x=270, y=67, z=-3419
Water collected at: x=269, y=67, z=-3419
Water collected at: x=268, y=67, z=-3419
Water collected at: x=267, y=67, z=-3419
Water collected at: x=266, y=67, z=-3419
Water collected at: x=265, y=67, z=-3419
Water collected at: x=264, y=67, z=-3419
Water collected at: x=263, y=67, z=-3419
Water collected at: x=262, y=67, z=-3419
Water collected at: x=261, y=66, z=-3419
Water collected at: x=260, y=66, z=-3419
Water collected at: x=259, y=66, z=-3419
Water collected at: x=258, y=66, z=-3419
Water collected at: x=257, y=66, z=-3419
Water collected at: x=256, y=66, z=-3419
Water collected at: x=255, y=66, z=-3419
Water collected at: x=254, y=66, z=-3419
Water collected at: x=253, y=66, z=-3419
Water collected at: x=252, y=66, z=-3419
Water collected at: x=251, y=66, z=-3419
Water collected at: x=250, y=66, z=-3419
Water collected at: x=249, y=65, z=-3419
Water collected at: x=248, y=67, z=-3419
Water collected at: x=247, y=68, z=-3419
Water collected at: x=246, y=69, z=-3419
Water collected at: x=245, y=70, z=-3419
Water collected at: x=244, y=71, z=-3419
Water collected at: x=243, y=72, z=-3419
Water collected at: x=242, y=73, z=-3419
Refuelling with log slot 9, crafting planks
Water collected at: x=241, y=77, z=-3419
Water collected at: x=240, y=77, z=-3419
Water collected at: x=239, y=78, z=-3419
Water collected at: x=238, y=78, z=-3419
Water collected at: x=237, y=78, z=-3419
Water collected at: x=236, y=78, z=-3419
Water collected at: x=235, y=77, z=-3419
Water collected at: x=234, y=77, z=-3419
Water collected at: x=233, y=76, z=-3419
Water collected at: x=232, y=76, z=-3419
Water collected at: x=231, y=75, z=-3419
Water collected at: x=230, y=74, z=-3419
Water collected at: x=229, y=74, z=-3419
Water collected at: x=228, y=72, z=-3419
Water collected at: x=227, y=71, z=-3419
Water collected at: x=226, y=69, z=-3419
Water collected at: x=225, y=67, z=-3419
Water collected at: x=224, y=65, z=-3419
Water collected at: x=223, y=63, z=-3419
Water collected at: x=222, y=63, z=-3419
Water collected at: x=221, y=63, z=-3419
Water collected at: x=220, y=63, z=-3419
Water collected at: x=219, y=63, z=-3419
Water collected at: x=218, y=63, z=-3419
Water collected at: x=217, y=63, z=-3419
Waiting for mob to leave…
Waiting for mob to leave…
Water collected at: x=217, y=63, z=-3419
Water collected at: x=216, y=63, z=-3419
Water collected at: x=215, y=64, z=-3419
Water collected at: x=214, y=66, z=-3419
Water collected at: x=213, y=67, z=-3419
Water collected at: x=212, y=68, z=-3419
Waiting for mob to leave…
Water collected at: x=212, y=69, z=-3419
Water collected at: x=211, y=71, z=-3419
Water collected at: x=210, y=72, z=-3419
Refuelling with log slot 9, crafting planks
Water collected at: x=209, y=75, z=-3419
Water collected at: x=208, y=77, z=-3419
Water collected at: x=207, y=79, z=-3419
Water collected at: x=206, y=80, z=-3419
Water collected at: x=205, y=80, z=-3419
Water collected at: x=204, y=81, z=-3419
Water collected at: x=203, y=82, z=-3419
Water collected at: x=202, y=81, z=-3419
Water collected at: x=201, y=80, z=-3419
Water collected at: x=200, y=79, z=-3419
Water collected at: x=199, y=78, z=-3419
Water collected at: x=198, y=77, z=-3419
Water collected at: x=197, y=75, z=-3419
Water collected at: x=196, y=74, z=-3419
Water collected at: x=195, y=73, z=-3419
Water collected at: x=194, y=69, z=-3419
Water collected at: x=193, y=66, z=-3419
Water collected at: x=192, y=64, z=-3419
Water collected at: x=191, y=63, z=-3419
Water collected at: x=190, y=63, z=-3419
Water collected at: x=189, y=63, z=-3419
Water collected at: x=188, y=63, z=-3419
Water collected at: x=187, y=63, z=-3419
Water collected at: x=186, y=63, z=-3419
Water collected at: x=185, y=63, z=-3419
Water collected at: x=184, y=63, z=-3419
Water collected at: x=183, y=63, z=-3419
Water collected at: x=182, y=63, z=-3419
Water collected at: x=181, y=63, z=-3419
Water collected at: x=180, y=63, z=-3419
Water collected at: x=179, y=64, z=-3419
Refuelling with log slot 9, crafting planks
Water collected at: x=178, y=65, z=-3419
Water collected at: x=177, y=66, z=-3419
Water collected at: x=176, y=67, z=-3419
Water collected at: x=175, y=68, z=-3419
Water collected at: x=174, y=68, z=-3419
Water collected at: x=173, y=78, z=-3419
Water collected at: x=172, y=78, z=-3419
Water collected at: x=171, y=69, z=-3419
Water collected at: x=170, y=69, z=-3419
Water collected at: x=169, y=69, z=-3419
Water collected at: x=168, y=69, z=-3419
Water collected at: x=167, y=69, z=-3419
Water collected at: x=166, y=69, z=-3419
Water collected at: x=165, y=69, z=-3419
Water collected at: x=164, y=68, z=-3419
Water collected at: x=163, y=68, z=-3419
Water collected at: x=162, y=68, z=-3419
Water collected at: x=161, y=68, z=-3419
Water collected at: x=160, y=67, z=-3419
Water collected at: x=159, y=67, z=-3419
Water collected at: x=158, y=67, z=-3419
Water collected at: x=157, y=66, z=-3419
Water collected at: x=156, y=66, z=-3419
Water collected at: x=155, y=66, z=-3419
Water collected at: x=154, y=66, z=-3419
Water collected at: x=153, y=66, z=-3419
Water collected at: x=152, y=66, z=-3419
Water collected at: x=151, y=66, z=-3419
Water collected at: x=150, y=66, z=-3419
Water collected at: x=149, y=66, z=-3419
Water collected at: x=148, y=66, z=-3419
Water collected at: x=147, y=66, z=-3419
Water collected at: x=146, y=66, z=-3419
Water collected at: x=145, y=66, z=-3419
Refuelling with log slot 9, crafting planks
Water collected at: x=144, y=66, z=-3419
Water collected at: x=143, y=66, z=-3419
Water collected at: x=142, y=66, z=-3419
Water collected at: x=141, y=66, z=-3419
Water collected at: x=140, y=66, z=-3419
Water collected at: x=139, y=65, z=-3419
Water collected at: x=138, y=65, z=-3419
Water collected at: x=137, y=65, z=-3419
Water collected at: x=136, y=65, z=-3419
Water collected at: x=135, y=65, z=-3419
Water collected at: x=134, y=66, z=-3419
Water collected at: x=133, y=66, z=-3419
Water collected at: x=132, y=66, z=-3419
Water collected at: x=131, y=66, z=-3419
Water collected at: x=130, y=66, z=-3419
Water collected at: x=129, y=66, z=-3419
Water collected at: x=128, y=67, z=-3419
Water collected at: x=127, y=67, z=-3419
Water collected at: x=126, y=67, z=-3419
Water collected at: x=125, y=75, z=-3419
Water collected at: x=124, y=75, z=-3419
Water collected at: x=123, y=75, z=-3419
Water collected at: x=122, y=67, z=-3419
Water collected at: x=121, y=67, z=-3419
Water collected at: x=120, y=67, z=-3419
Water collected at: x=119, y=68, z=-3419
Water collected at: x=118, y=68, z=-3419
Water collected at: x=117, y=68, z=-3419
Water collected at: x=116, y=69, z=-3419
Water collected at: x=115, y=69, z=-3419
Water collected at: x=114, y=69, z=-3419
Water collected at: x=113, y=69, z=-3419
Water collected at: x=112, y=70, z=-3419
Water collected at: x=111, y=70, z=-3419
Water collected at: x=110, y=70, z=-3419
Water collected at: x=109, y=70, z=-3419
Water collected at: x=108, y=70, z=-3419
Water collected at: x=107, y=70, z=-3419
Refuelling with log slot 9, crafting planks
Water collected at: x=106, y=70, z=-3419
Water collected at: x=105, y=70, z=-3419
Water collected at: x=104, y=70, z=-3419
Water collected at: x=103, y=70, z=-3419
Water collected at: x=102, y=71, z=-3419
Water collected at: x=101, y=71, z=-3419
Water collected at: x=100, y=71, z=-3419
Water collected at: x=99, y=71, z=-3419
Water collected at: x=98, y=71, z=-3419
Water collected at: x=97, y=71, z=-3419
Water collected at: x=96, y=71, z=-3419
Water collected at: x=95, y=71, z=-3419
Water collected at: x=94, y=71, z=-3419
Water collected at: x=93, y=72, z=-3419
Water collected at: x=92, y=72, z=-3419
Water collected at: x=91, y=72, z=-3419
Water collected at: x=90, y=72, z=-3419
Water collected at: x=89, y=72, z=-3419
Water collected at: x=88, y=72, z=-3419
Water collected at: x=87, y=72, z=-3419
Water collected at: x=86, y=72, z=-3419
Water collected at: x=85, y=79, z=-3419
Water collected at: x=84, y=78, z=-3419
Water collected at: x=83, y=77, z=-3419
Water collected at: x=82, y=74, z=-3419
Water collected at: x=81, y=74, z=-3419
Water collected at: x=80, y=75, z=-3419
Water collected at: x=79, y=75, z=-3419
Water collected at: x=78, y=76, z=-3419
Water collected at: x=77, y=76, z=-3419
Water collected at: x=76, y=75, z=-3419
Water collected at: x=75, y=74, z=-3419
Water collected at: x=74, y=74, z=-3419
Water collected at: x=73, y=74, z=-3419
Water collected at: x=72, y=74, z=-3419
Water collected at: x=71, y=75, z=-3419
Water collected at: x=70, y=75, z=-3419
Water collected at: x=69, y=76, z=-3419
Water collected at: x=68, y=75, z=-3419
Refuelling with log slot 9, crafting planks


I would provide a link to the save but I lack the webspace. To give the seed is not an option too, because I created the pond manually… and the turtle thought too close to base camp.

Maybe I should have ridden with the turtle into the sunset. :rolleyes:/>
dropdead #101
Posted 12 January 2019 - 09:07 PM
This time the turtle got very far although it went to excavate a third stage at the deepest point possible because it put every redstone in a chest and had to look for new redstone.

It crafted two pickaxes, chests, crafting tables, computers, one floppy disk, and a disk drive. Then it tried to program the new computers and failed:

"…:2794: Slot number 0 out of range" (function "programTurtles(numTurtles))"


Did not see which crafting ingridient it was missing when the program failed.

Its inventory:

1 - 22 cobblestone
2 - diamond pickaxe
3 - 4 sticks
4 - diamond pickaxe
5 - 14 iron
6 - 19 oak wood
7 - 3 chests
8 - 2 crafting tables
9 - 2 paper
10- floppy disk
11 - 14 glas panes
12 - 2 computers
13 - disk drive

I am not sure I thought of the former problem with the config, where I had to give the floppy disk more space to get the program on it (or something like that) or if I still have to do this since the program got so much leaner (from about 12000 lines to about 4000).

I am wondering if this run doesn't count as success… in my book, it sure should.

However, I guess it can do better.


Today we use computers to solve problems we would not have without them.

Hope the joke did not get lost in translation…


Log
SpoilerhomeCoords.txt file created
x = -1696, y = 67, z = -1138, f = 3
Starting at function T:harvestFirstTree()
Refuelling with log slot 1, crafting planks
refuel() planks used. level=60
Missing crafting ingredients.
Missing crafting ingredients.
harvestFirstTree() Completed.
Saving Status: '1'
harvestAllTrees() Starting…
harvestAllTrees() spiral arm no: 2
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 9, Water found = false
harvestAllTrees() spiral arm no: 4
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 9, Water found = false
Refuelling with log slot 2, crafting planks
harvestAllTrees() spiral arm no: 6
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 25, Water found = false
Refuelling with log slot 3, crafting planks
harvestAllTrees() spiral arm no: 8
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 36, Water found = false
Refuelling with log slot 3, crafting planks
Refuelling with log slot 3, crafting planks
harvestAllTrees() spiral arm no: 10
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 51, Water found = false
Refuelling with log slot 4, crafting planks
harvestAllTrees() spiral arm no: 12
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 54, Water found = false
Refuelling with log slot 4, crafting planks
harvestAllTrees() spiral arm no: 14
getStock()minecraft:reeds= not found
getStock()minecraft:sand= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 0, logs = 72, Water found = false
harvestSand() started
harvestSand() completed
Refuelling with log slot 4, crafting planks
harvestSand() started
harvestSand() completed
harvestAllTrees() spiral arm no: 16
getStock()minecraft:reeds= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 2, logs = 76, Water found = false
harvestSand() started
Refuelling with log slot 4, crafting planks
harvestSand() completed
Refuelling with log slot 5, crafting planks
harvestAllTrees() spiral arm no: 18
getStock()minecraft:reeds= not found
getStock()minecraft:log2= not found
reeds = 0, sand = 6, logs = 87, Water found = false
Reeds found
Refuelling with log slot 5, crafting planks
Reeds found
Refuelling with log slot 6, crafting planks
harvestAllTrees() spiral arm no: 20
getStock()minecraft:log2= not found
reeds = 5, sand = 6, logs = 85, Water found = false
Water found, checking suitability: x=-1686, z=-1144
Water confirmed and saved to file x=-1686, y=66, z=-1144
Reeds found
Refuelling with log slot 6, crafting planks
Refuelling with log slot 7, crafting planks
harvestAllTrees() spiral arm no: 22
getStock()minecraft:log2= not found
reeds = 9, sand = 6, logs = 85, Water found = true
harvestAllTrees() Abandoned after 22 spiral arms: Supplies sufficient
harvestAllTrees() Completed.
Saving Status: '2'
findCobble() Starting…
Refuelling with log slot 7, crafting planks
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
findCobble() Completed.
Saving Status: '3'
clearBase() Starting…
refuel() 1 coal used. level=94
clearBase() Completed.
Saving Status: '4'
placeStorage() Starting…
craft(): slot no: 5, log count:64
craft(): slot no: 5, log count:64
refuel() 1 coal used. level=94
placeStorage() Completed.
Saving Status: '5'
createMine() Starting…
getStock()minecraft:log2= not found
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:log2= not found
getStock()minecraft:bucket(-1)= not found
smelt(minecraft:iron_ore, 3) started
getStock()minecraft:planks(-1)= not found
craft(): slot no: 11, log count:64
smelt(minecraft:iron_ore, 3) completed
fillPond() started
Coordinates loaded from file:
x = -1696, y = 67, z = -1138, f = 3
Water coords from file x=-1686, y=66, z=-1144
goToWater() started.
goToWater() completed: no water
Water bucket filled x=-1685, y=66, z=-1145
returnHome() started
refuel() 1 coal used. level=80
returnHome() completed
Coordinates loaded from file:
x = -1696, y = 67, z = -1138, f = 3
Water added to pond at: x=-1696, y=67, z=-1141
goToWater() started.
goToWater() completed: no water
returnHome() started
returnHome() completed
Coordinates loaded from file:
x = -1696, y = 67, z = -1138, f = 3
returnHome() started
returnHome() completed
Coordinates loaded from file:
x = -1696, y = 67, z = -1138, f = 3
Saving Status: 'treeFarm'
getStock()minecraft:torch= not found
clearTreeFarm() starting
clsTurtle:sortInventory() started chest found in slot 9
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
craftTorches(8)
getStock()minecraft:stick= not found
getStock()minecraft:planks(-1)= not found
getStock()minecraft:coal(1)= not found
craftTorches(8) coal=8, charcoal=0, planksNeeded=4, woodNeeded=1
craftTorches(8) using minecraft:log
getStock()minecraft:stick= not found
craftTorches(8) crafting sticks
getStock()minecraft:planks= not found
craft(): slot no: 5, log count:64
craftTorches(8) crafting torches…
craftTorches(8) storing sticks
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:log2= not found
refuel() 1 coal used. level=92
refuel() 1 coal used. level=93
refuel() 1 coal used. level=94
Saving Status: 'treeFarm'
clsTurtle:sortInventory() started chest found in slot 10
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks(-1)= not found
refuel() 1 coal used. level=91
getStock()minecraft:log2= not found
craftHopper() started
craft(): slot no: 5, log count:64
smelt(minecraft:iron_ore, 5) started
getStock()minecraft:planks(-1)= not found
craft(): slot no: 8, log count:62
smelt(minecraft:iron_ore, 5) completed
Saving Status: 'treeFarm'
craftHopper() completed
floodTreeFarm() started
refuel() 1 coal used. level=83
refuel() 1 coal used. level=87
floodTreeFarm() completed
Saving Status: 'treeFarm'
getStock()minecraft:log2= not found
craft(): slot no: 8, log count:60
getStock()minecraft:log2= not found
craftTorches(20)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:coal(0)= not found
getStock()minecraft:coal(1)= not found
craftTorches(20) coal=0, charcoal=0, planksNeeded=4, woodNeeded=12
craftTorches(20) using minecraft:log
craftTorches(20) crafting sticks
getStock()minecraft:planks= not found
craft(): slot no: 7, log count:58
craftTorches(20) smelting charcoal
smelt(minecraft:log, 5) started
getStock()minecraft:planks(-1)= not found
Refuelling with log slot 9, crafting planks
craft(): slot no: 9, log count:51
smelt(minecraft:log, 5) completed
craftTorches(20) crafting torches…
craftTorches(20) storing sticks
getStock()minecraft:log2= not found
getStock()minecraft:log2= not found
craft(): slot no: 8, log count:49
createMinePrepare(14) Signs avaiable: 3
createMinePrepare(14) Torches avaiable: 24
createMinePrepare(14) Chests avaiable: 1
createMine() Starting Level 14
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
clsTurtle:sortInventory() started chest found in slot 7
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:dirt
EmptyTrash():Dropping minecraft:dirt
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:redstone= not found
Waiting for mob to leave…
clsTurtle:sortInventory() started chest found in slot 9
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 9
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:redstone= not found
refuel() 1 coal used. level=89
clsTurtle:sortInventory() started chest found in slot 9
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 10
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:redstone= not found
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
clsTurtle:sortInventory() started chest found in slot 10
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:gravel
clsTurtle:sortInventory() started chest found in slot 14
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
refuel() 1 coal used. level=93
Waiting for mob to leave…
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
refuel() 1 coal used. level=89
refuel() 1 coal used. level=80
refuel() 1 coal used. level=84
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
refuel() 1 coal used. level=93
refuel() 1 coal used. level=89
refuel() 1 coal used. level=80
refuel() 1 coal used. level=84
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
refuel() 1 coal used. level=93
refuel() 1 coal used. level=80
refuel() 1 coal used. level=84
createMine() Level 14 complete. Saving Status '6'
getStock()minecraft:log2= not found
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:log2= not found
getStock()minecraft:dirt= not found
getStock()minecraft:log2= not found
craft(): slot no: 6, log count:47
getStock()minecraft:log2= not found
craftTorches(24)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:coal(1)= not found
craftTorches(24) coal=111, charcoal=0, planksNeeded=4, woodNeeded=2
craftTorches(24) using minecraft:log
craftTorches(24) crafting sticks
getStock()minecraft:planks= not found
craft(): slot no: 7, log count:45
craftTorches(24) crafting torches…
craftTorches(24) storing sticks
getStock()minecraft:log2= not found
getStock()minecraft:sign= not found
createMinePrepare(11) Signs avaiable: 0
createMinePrepare(11) Torches avaiable: 24
createMinePrepare(11) Chests avaiable: 1
createMine() Starting Level 11
refuel() 1 coal used. level=80
refuel() 1 coal used. level=80
clsTurtle:sortInventory() started chest found in slot 6
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:dirt
clsTurtle:sortInventory() started chest found in slot 12
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:gold_ore
clsTurtle:sortInventory() started chest found in slot 12
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
refuel() 1 coal used. level=80
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:obsidian
clsTurtle:sortInventory() started chest found in slot 12
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:dirt
EmptyTrash():Dropping minecraft:gravel
EmptyTrash():Dropping minecraft:obsidian
clsTurtle:sortInventory() started chest found in slot 16
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
createMine() Level 11 complete. Saving Status '7'
getStock()minecraft:log2= not found
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:log2= not found
getStock()minecraft:dirt= not found
getStock()minecraft:log2= not found
craft(): slot no: 6, log count:44
getStock()minecraft:log2= not found
craftTorches(24)
getStock()minecraft:planks(-1)= not found
getStock()minecraft:coal(1)= not found
craftTorches(24) coal=138, charcoal=0, planksNeeded=4, woodNeeded=2
craftTorches(24) using minecraft:log
craftTorches(24) crafting torches…
getStock()minecraft:stick(-1)= not found
getStock()minecraft:log2= not found
getStock()minecraft:sign= not found
createMinePrepare(8) Signs avaiable: 0
createMinePrepare(8) Torches avaiable: 24
createMinePrepare(8) Chests avaiable: 1
createMine() Starting Level 8
clsTurtle:sortInventory() started chest found in slot 8
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:redstone= not found
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:gravel
EmptyTrash():Dropping minecraft:obsidian
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:redstone= not found
clsTurtle:sortInventory() started chest found in slot 11
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
EmptyTrash():Dropping minecraft:gravel
EmptyTrash():Dropping minecraft:obsidian
clsTurtle:sortInventory() started chest found in slot 15
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
Waiting for mob to leave…
createMine() Level 8 complete. Saving Status '8'
Saving Status: '8'
craftMiningTurtle() started
clsTurtle:sortInventory() started chest found in slot 13
clsTurtle:sortInventory() looking forward for chest…
clsTurtle:sortInventory() chest placed:forward
clsTurtle:sortInventory() emptying turtle:forward
clsTurtle:sortInventory() refilling turtle:forward
clsTurtle:sortInventory() chest collected(forward)
getStock()minecraft:planks= not found
craft(): slot no: 7, log count:42
smelt(minecraft:cobblestone, 21) started
craft(): slot no: 6, log count:41
smelt(minecraft:cobblestone, 21) completed
smelt(minecraft:iron_ore, 14) started
getStock()minecraft:planks(-1)= not found
craft(): slot no: 9, log count:35
smelt(minecraft:iron_ore, 14) completed
smelt(minecraft:sand, 6) started
getStock()minecraft:planks(-1)= not found
craft(): slot no: 9, log count:31
smelt(minecraft:sand, 6) completed
craft(): slot no: 9, log count:29
craft(): slot no: 10, log count:23
Missing crafting ingredients.
Missing crafting ingredients.
Edited on 12 January 2019 - 08:10 PM
Bomb Bloke #102
Posted 13 January 2019 - 12:55 PM
Also using a 1.7.10 pack, CC 1.74, and the script build from 12/12/2018, I tested it out and eventually received the same error on 2794. I was AFK standing near the start point when it died, came back to find a couple of computers and pick axes had been dropped close enough that my character had picked them up. Not sure if the turtle made a disk drive, it might've dropped one and had it despawn. It would've had all the ingredients on hand to make another turtle if it hadn't chucked the computers away.

I'd hoped to speed up the resource harvesting process by specifically "making sure" the turtle would find what I thought it wanted (it'd be nice if the terminal counted down the resources it needs), but it still roamed around a large area on the surface and dug out three large areas underground (despite overloading on redstone / diamonds / iron / whatever on its first trip down). It also seems to ignore its limited inventory space while mining (continuing to dig even after all slots were filled), and seemed quite happy to lug stacks of logs down into the mine with it (instead of leaving them in the surface chests) - it might get away with this in vanilla (maybe), but mod packs tend to add a lot of blocks, so "assuming" it won't be full when it finds its first diamond is very risky!

On my first test, the turtle got overenthusiastic in clearing out a large seam of sandstone (aka the bottom of the beach), eventually making so many recursive function calls that it crashed out. I also found it likes to mine out entire seams of Chisel blocks for no apparent reason - I guess it just gobbles up anything that isn't cobble / stone / dirt.
Lupus590 #103
Posted 14 January 2019 - 08:22 PM
[the turtle] seemed quite happy to lug stacks of logs down into the mine with it (instead of leaving them in the surface chests) - it might get away with this in vanilla (maybe), but mod packs tend to add a lot of blocks

If I recall correctly, the original challenge was Vanilla, CC, and Railcraft (for its chunk loader); it won't be expecting a lot of different items when it mines.
Edited on 14 January 2019 - 07:22 PM
Bomb Bloke #104
Posted 14 January 2019 - 11:47 PM
Given that it reserves the first half of its inventory for "whatever it happens to carry down from the surface", there are still enough that it can max out the remaining slots before finding diamonds. It's just "less likely" to do so.
Inksaver #105
Posted 11 May 2019 - 06:28 PM
If I could get this forum to email me when a post is made, I would respond much faster, but to catch up with the comments from January 2019, here goes:
When debugging the program, the main() function can be progressively commented out so the whole process is done in stages. Follow these steps to get as far as you can, which makes fixing the problem faster.
  • 1. Create your world, place the reeds, and add the code to the turtle, either from pastebin get, or manually downloading the file and putting it in the correct place. Assume the world is called "Self Replicate" for this tutorial purpose.
  • 2. Copy this world and rename it with a suffix , say "Self Replicate00". Do NOT run the program on this world! Even better move it to a different folder on your PC
  • 3. Rename the copy world "Self Replicate01current" - this is the world you will be running the code in
  • 4. Edit the code on the "Self Replicate01current" using Notepad++, Atom or similar to comment out code starting with "if status == 2 then" (currently line 4838) to the end of function main(). This will force the script to stop once all the necessary trees have been harvested, and it is ready to move on to digging the first vertical mineshaft.
  • 5. Copy "Self Replicate01current" and rename the copy to "Self Replicate01". Move this copy elsewhere, (along with "Self Replicate00") to keep them safe.
  • 6. Load and run "Self Replicate01current"
  • 7. If all goes well
{
  1. Edit the code in "Self Replicate01current" to un-comment the next process, starting with "if status == 3 then" (currently line 4844)
  2. Rename the world to "Self Replicate02"
  3. Copy "Self Replicate02".
  4. Rename the copy to "Self Replicate02current"
  5. Move "Self Replicate02" elsewhere
  6. Load and run "Self Replicate02current"
}
else
{
  1. Delete "Self Replicate01current".
  2. Copy "Self Replicate01" back to the saves folder. It is now ready for debugging.
  3. break (Stop here.)
}
You get the idea. You are building a series of worlds where an increasing amount of the script is successful. You can make changes to the script and test it out without going through the whole process again.
main() will determine how far you have got with the line "local status = tonumber(loadStatus("currentStatus.txt"))"

It is now over to you to try and read through the code and alter it where necessary.

If anybody has a world that keep on failing, if you can share it on Dropbox / Google Drive / possibly GitHub. I will see if I can get it working.