Go to advanced search

by Morpheu5
Tue Jan 29, 2013 12:20 am
Forum: Troubleshooting
Topic: Minecraft Pi edition: "Importing minecraft as mc"
Replies: 4
Views: 3737

Re: Minecraft Pi edition: "Importing minecraft as mc"

You have to go into the directory with the .py Files before you start the python shell
For example:

Code: Select all

cd ~/mcpi/api/python/mcpi
Then you can run python, import the files and play with the api:

Code: Select all

python
>>> import minecraft as mc
>>> mc = mc.Minecraft.create()
>>> mc.postToChat("Hello")

Go to advanced search