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

[MiscPeripherals] Treetap Turtle Resizable Farming

Started by absorr, 29 December 2012 - 07:14 AM
absorr #1
Posted 29 December 2012 - 08:14 AM
Using the MiscPeripherals addon and IndustrialCraft2, I have created a sticky resin farming program that can be used with almost any quadrilateral shape (4 sides). The program does not refuel itself, but obviously you have MiscPeripherals so it should not be too hard to have enough charge in it before executing it.

How to set up your farm (IMPORTANT!!!)

Make your farm follow these guidlines
  • Trees must be 1 block away from each other
  • There must be a wall at least one block high surrounding the farm
  • There must be 1 block between the wall and the closest tree(s)
  • Put chest in any corner in the wall
  • Put turtle next to chest (also in wall) facing the closest tree
EXAMPLE


Download/View on PasteBin
steel_toed_boot #2
Posted 01 January 2013 - 08:17 PM
The function sweep code is kinda lengthy and lil' inefficient but gets the job done :D/>
thetravis0916 #3
Posted 04 January 2013 - 05:50 PM
What type of turtle do you use?
Bindre12 #4
Posted 04 January 2013 - 06:10 PM
For your sweep function you can shorten it up with this, does the exact same thing as the original, just shortens up the code a little:

function sweep()
 for a = 1, 7 do
  turtle.dig()
  turtle.up()
 end
 turtle.dig()
 for b = 1, 8 do
  turtle.down()
 end
end

and same thing for the sweep() and rotate() being repeted:

for c = 1, 4 do
 sweep()
 rotate()
end

for loops help shorten up code and you don't have to type the same thing over and over again
just a little constructive criticism
Pyro_Killer #5
Posted 24 January 2013 - 08:07 PM
I couldn't find this thread again, so i cleaned it up a bit, not a LOT, but a little, it also learned me a thing or two, and I am running this continously on our server:

I just did what was posted in the post above, made it empty all the slots, because 3 slots is simply not enough for my farm; and made it loop every half hour.

http://pastebin.com/hu1q4KnP
DarkEspeon #6
Posted 27 January 2013 - 10:44 AM
my turtle only did one row then stopped, any help
Engineer #7
Posted 27 January 2013 - 12:17 PM
This will suck the trees dry..
MinecraftFarms12 #8
Posted 24 February 2013 - 04:11 PM
Yo absorr Nice Farm Man It Is Awesome Especilly for Ic2
Quickslash78 #9
Posted 25 February 2013 - 01:56 PM
Engineer, been running this, doesn't kill trees.

Great farm! Love that it's expandable without menus or options, just build a bigger farm! :3

Would love for it to repeat on redstone signal, cause with larger farms, you can just say go, and the rubber will regrow before it finishes, and I'd love an infinite loop.
bomanski #10
Posted 22 March 2013 - 06:25 AM
Couldn't get this to work so I decided to write my own little treetapper program. Kinda poor info on how to set this up tbh. I'll upload mine when I'm allowed to make topics
rpg4mc #11
Posted 12 July 2013 - 10:43 AM
I'm looking at your code and trying to improve it at the moment but I have a question about your sweep() function.

function sweep()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.up()
  turtle.dig()
  turtle.down()
  turtle.down()
  turtle.down()
  turtle.down()
  turtle.down()
  turtle.down()
  turtle.down()
  turtle.down()
end

For one, this could be improved with 2 for statements but why do you go up 7 times and then go down 8 times ? Don't you have one turtle.down() too much ?

Also for bigger farms, only dropping out the first 3 slots might not be enough, try this:

local f = 1
while f < 17 do
   turtle.select(f)
   turtle.drop()
   f = f + 1
end
f = 1

instead of this :

turtle.drop()
turtle.select(2)
turtle.drop()
turtle.select(3)
turtle.drop()
turtle.select(1)


One last edit; why are you using repeats everywhere, while loops are easier to make and shorter. Let me show you :)/>
This is what I made out of yours, I still need to make the Sweep() function more energy-efficient though.

function sweep()
for i=1, 7 do
  turtle.dig()
  turtle.up()
end
turtle.dig()
for i=1, 7 do
  turtle.down()
end
end
function rotate()
  turtle.turnRight()
  turtle.forward()
  turtle.turnLeft()
  turtle.forward()
  turtle.turnLeft()
end
print("Starting Tapping Route...")
turtle.forward()
repeat
for i=1, 4 do
  sweep()
  rotate()
end
turtle.turnLeft()
turtle.forward()
if turtle.forward() then
  turtle.turnRight()
  x = false
else
  turtle.turnRight()
  turtle.forward()
  turtle.forward()
  if turtle.forward() then
    turtle.back()
    turtle.turnRight()
    while turtle.detect() == false do
  turtle.forward()
end
turtle.back()
turtle.turnLeft()
  else
    x = true
  end
end
until x
turtle.turnRight()
while turtle.detect() == false do
turtle.forward()
end
turtle.turnRight()
while turtle.detect() == false do
turtle.forward()
end
local f = 1
while f < 17 do
turtle.select(f)
turtle.drop()
f = f + 1
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
print("Finished cycle.")
dxbydt #12
Posted 17 July 2013 - 03:40 AM
Well I got sick of trying to make this work so I rewrote most of it except for the rotate and sweep functions. Keep the same layout described as the OP, any rectangular dimensions. I put a charge station behind the turtle's starting position so it can go forever.

http://pastebin.com/SGDvydwH
mcyd #13
Posted 04 September 2013 - 06:35 PM
Well I got sick of trying to make this work so I rewrote most of it except for the rotate and sweep functions. Keep the same layout described as the OP, any rectangular dimensions. I put a charge station behind the turtle's starting position so it can go forever.

http://pastebin.com/SGDvydwH

Well your version does not seem to work as the turtle just endlessly checks for corners.
pfgcomputercraft #14
Posted 07 September 2013 - 09:22 PM
How do you get treetap turtle

Edit: Oh miscperipherals