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

Random 3D Maze Builder

Started by jackmott, 03 October 2015 - 12:08 AM
jackmott #1
Posted 03 October 2015 - 02:08 AM
This will build a random 3d maze of dimensions you specify, out of whatever blocks you provide.
It uses ladders for the vertical paths, so it will work in vanilla minecraft. It will place torches inside automatically for you so it isn't totally dark.
Since even medium sized 3d mazes require a ton of blocks, it will automatically return to resource chests you set up ahead of time for more blocks as it builds.


Code:
http://pastebin.com/EQkKrChQ

Screenshots:
http://imgur.com/9VSlLxc

http://imgur.com/V7VW3Mm

http://imgur.com/2l3lED7
Creator #2
Posted 03 November 2015 - 08:45 PM
Nice work.
Lion4ever #3
Posted 06 December 2015 - 11:07 PM
Can you replace

function forward()
turtle.forward()
with

function forward()
repeat until turtle.forward()
and same with up and down? that would make the program a lot more robust if something stands in its way.
the line

turtle.select(3)
is no longer nessary because of the selectBlock method and only causes the turtle slots index to flicker after every move.

I love running through your mazes and i have created quite a few of them in my world :)/>
Edited on 06 December 2015 - 10:07 PM