Simplest Possible Advancing Quarry Setup

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

TheGuiTarJokeR

New Member
Jul 29, 2019
4
0
0
Hi Guys,

I just made the most awesome advancing quarry platform, and I wanted to share this design with the world :)

first, some pictures, to give you a sense of the scale of this thing:
29psqas.png


2r7o4qw.png


the setup consists of a 3x3 base platform of any material, on which a quarry should be placed.
the quarry is connected to a stone transport pipe, with a Gate connected, which should be configured to emit a redstone signal on the 'Work Done' condition.
This signal is important and will be explained later :)

The items are piped into an item tesseract, which should be configured to send all items to an external collection point. Usually this is your sorting/storage system. On the right of the quarry, there is an energy tesseract as energy supply for the quarry.
Both tesseracts have to be configured to work regardless of their redstone input status.
This is important, because the default behaviour of the tesseracts is disabled on redstone signal, which may cause the setup to break if the Gate triggers.

left of the quarry is a chunk loader, to keep it all working if I go to far away lands.

In Front of the quarry is a mining turtle, for which I wrote a little piece of software, included below.
This turtle controls a carriage controller, which in turns controls a support carriage block, embedded in the 3x3 platform below the controller.

Both the carriage block and controller are part of the Redstone in Motion mod, which works beautifully with this little setup. It's not included in the modpack, but easy to add.

Here is the turtle code:
Code:
-- wait for an applied redstone signal of at least 'duration' seconds.
-- 'continuous' is hard to define, so lets just test with interval 'interval'
function wait_for_continuous_redstone_signal(duration, interval)
  waited = 0
  while waited < duration do
    if redstone.getInput("front") then
      waited = waited + interval
    else
      waited = 0
    end
    sleep(interval)
  end
end

-- we have state, which we need to persist over reboots.
-- moving the frame reboots our turtle :(
quarryStateFile = "quarryFrame.state"

function load_tiles_to_move()
  statefile = io.open(quarryStateFile, "r")
  if not statefile then
    return 0
  end
  result = statefile:read()
  statefile:close()
  return tonumber(result)
end

function save_tiles_to_move(tiles)
  statefile = io.open(quarryStateFile, "w")
  statefile:write(tiles)
  statefile:close()
end

-- move the platform one field along
function quarry_advance()
  drive = peripheral.wrap("right")
  drive.move(5, false, false)
end

-- if movement is queued, process it
tomove = load_tiles_to_move()
if tomove > 0 then
  sleep(1)
  tomove = tomove - 1
  save_tiles_to_move(tomove)
  quarry_advance()
end

-- replace quarry
turtle.dig()
turtle.place()

-- no movement is queued, wait for quarry ready
wait_for_continuous_redstone_signal(2, 0.2)

-- quarry is ready, store any crap pushed in by the quarry
for i = 1, 16, 1 do
  turtle.select(i)
  turtle.dropUp()
end
turtle.select(1)

-- queue advancement (will restart the turtle)
save_tiles_to_move(8)
quarry_advance()

If you have questions concerning the code, just ask away, and I will explain more details :)
Just make sure, the code is run on startup of the turtle, because the moving frames cause any turtles to reboot.

Tell me what you think!

-Andy
 
Last edited:

KingTriaxx

Forum Addict
Jul 27, 2013
4,266
1,333
184
Michigan
Very cool, though technically the platform is unnecessary. You could reset the tesseracts each time, and use the turtle's SetFrequency Command to reconnect them to the proper frequency.
 

TheGuiTarJokeR

New Member
Jul 29, 2019
4
0
0
right, the platform is just to stand on for convenience.
Why are you suggesting resetting the tesseracts in the turtle code?
 

KingTriaxx

Forum Addict
Jul 27, 2013
4,266
1,333
184
Michigan
If you used the Turtle to move it without the platform, it'd have to break the quarry and tesseracts each time, so you could have it wrap them as peripherals and set the frequencies each time it replaced them. That's what I meant.
 

TheGuiTarJokeR

New Member
Jul 29, 2019
4
0
0
the tesseracts don't lose their frequencies. Only the quarry needs to be replaced, and the turtle reboots when the frame moves.
 

budge

New Member
Jul 29, 2019
273
0
0
Very cool. I made a mining well-based machine like this using lots of turtles and a carriage. It was very fun, but quite buggy. Each time a computer reboots it creates 3 new threads in the server process, and I had twelve turtles, so after a while the entire emulation layer would crash and render all computers inert until a server restart.

I've installed OpenComputers but haven't tried them yet. Their persistence through moves is intriguing.
 

TheGuiTarJokeR

New Member
Jul 29, 2019
4
0
0
I can't reproduce that problem. My server is currently running 24/7, and my setup is rebooting the turtles quite frequently, but I see nothing break yet :)
How many spawned threads did it take for the computers to halt?
 

budge

New Member
Jul 29, 2019
273
0
0
I can't remember, really, but off the top of my head I think it had passed 1000 threads (info from Mac OS activity monitor).