Hardware Reference
In-Depth Information
FIGURE.6-5 3D printing lots of stone caves inside Minecraft.
Building a 3D Block Scanner
Your 3D printer is already very powerful. You can build up a big library of CSV files for
different objects you want to build, then whenever you need to, just run your
print3D.py program with a different FILENAME constant to stamp the object all
over your Minecraft world.
However, building larger and more complex objects will become very difficult if you
have to enter all the numbers into the CSV file by hand. Minecraft itself is the best
program for building complex objects—so, what if you could use Minecraft to create
these CSV data files for you? Here, you are going to run up to a tree and hug it, then
make an identical copy of the tree so you can duplicate it all over the Minecraft world.
Fortunately, 3D scanning works a bit like 3D printing in reverse, so this not quite as
hard as you might think.
1. Start a new file with File New File, save it with File Save As and call the pro-
gram scan3D.py .
2. Import the necessary modules:
import mcpi.minecraft as minecraft
import mcpi.block as block
3. Connect to the Minecraft game:
mc = minecraft.Minecraft.create()
 
Search WWH ::




Custom Search