Posted 23 May 2014 - 06:35 AM
The Water Ferret - by Paul Olinger
Ever been deep under the ocean and wish there was an easier way to go up and back down? Is your nearest stronghold buried deep under the ocean? Or maybe you just want to have a deep underwater secret base?
Introducing the water ferret program. This program will go down to the deep ocean depths and build an access pipe straight up for you. Ideal for trying to reach underground mine shafts, strongholds, or other hard to reach places deep under the ocean. As an added bonus, it also works on land, and even in lava.
The program starts out by plummeting down until it detects a block which determines where the bottom of the ocean floor is. From there, the turtle pierces the ground and builds underground. This is so you can mine straight off your new tunnel without hitting water.
Just running the program without arguments works fine, but there are some commands that help improve the building process…
ARGUMENTS:
Spoiler
[goto] [x] [y]The goto argument tells your turtle where to go to potentially start drilling. Placing a turtle down in the middle of the ocean
isn't that easy unless you have a lilly pad, or some other way of getting a block there to place the turtle down. This argument
exists so you can tell your turtle where to move to.
If you use the goto argument, the next two arguments MUST be numeric values for the coordinates. The turtle's starting location
is considered x: 0 y: 0, so you determine where you want to move from there.
Example: waterFerret goto 140 -15
This will move the turtle forward 140 places, then left 15 places. If you use the goto argument, the next two arguments must be
numeric values for the x and y locations. If you don't wish to move x or y, then enter a value of zero for that coordinate.
[force]
The force argument tells the turtle to immediately start tunneling after it reaches the entered goto x and y coordinates.
Example: waterFerret goto 10 5 force
This will move the turtle forward 10 places, then right 5 places, then it will start tunneling.
[dock]
The dock option will append a small area next to the access pipe where you can dock your boat. Nothing fancy, but enough to keep
your boat from drifting away.
Example: waterFerret dock
[pierce] [z]
Using the pierce argument allows you to change the penetration depth. The default value is 6. A value of zero would build it right
at the ocean floor surface. The argument after pierce, which IS required, determines your depth. A negative value here also works, which will build above the ocean surface somewhere. Not sure how that might be useful, but it works. Setting a high value for pierce depth is useful if you're wanting to use this program for land penetration.
Example: waterFerret dock pierce 10
This would build a dock, then burrow down under the ocean floor 10 blocks.
SLOT PLACEMENT:
Spoiler
Slots 1 - 13 are for structure blocks.Slot 14 is reserved for torches.
Slot 15 and 16 are for ladders.
PROGRAM HIGHLIGHTS:
Spoiler
I have implemented a lot of failsafes for the program so that the turtle does not stall at the bottom of an abyss somewhere. Wheneverthe turtle needs something, it will make it's way to the surface.
The turtle will come to the surface to be refueled, or to get new blocks if it happens to run out. Once refueled or restocked, the
turtle will resume building.
This program handles obstacles fine, including sand, mobs, etc. If the turtle happens to hit bedrock, it will return home and abort
the mission. This will happen early on, as the turtle starts from the bottom up.
PITFALLS:
Spoiler
Do not leave any block slot empty. Doing so, the turtle may pick up rubble from the ocean floor and then start using that for building.This program does not do item checking for torches and ladders. I will probably add this soon, as it's fairly trivial to add, but for
now, make sure the turtle has enough. Even so, this isn't a huge deal, as the pipe is pretty much done by the time the program gets
this far.
Bedrock if you happen to hit it. If the turtle hits bedrock, it will return to the surface and shut down. This will happen early
in the program if you're going to hit bedrock.
SCREENSHOT:
Here is the pastebin: http://pastebin.com/qLtLKNJV
Happy tunneling!