Modified, simplified and improved libraries to code in python via Minecraft
Based on the terrific idea and the original code of David Whale and Martin O'Hanlon (www.stuffaboutcode.com)
Alessandro Norfo ([email protected]) & Giuseppe Menegoz ([email protected])
Install Python 2.7: https://www.python.org/downloads/
Install Pycraft library:
- pip install pycraft_minetest
You will also need to install the Java Runtime Environment, to be able to launch the Spigot server. Download the appropriate installer for your operating system: https://java.com/it/download/manual.jsp
After installing Python and Java, you can download this repository (master branch). Now, extract the zip archive contents and open the Pycraft folder.
Execute the "launcher.py" file. It will launch a Spigot server locally, on your computer, to which we would then connect via Minecraft, so that our scripts in Python will be run within the game.
NOTE: In order for a python script to communicate with the Minecraft world, the Pycraft server must always be up and running.
Now open Minecraft.
First we have to create a new profile to suit the Minecraft server that will be used by clicking on "NewProfile" and selecting "UseVersion: 1.10.2". For convenience we can call this profile "pycraft". Remember to select it each time you want to use pycraft.
Now we are ready to begin!
Once you launched Minecraft, choose "multiplayer" then "direct connect", typing "localhost" as address. If you access the world of Minecraft it means that everything worked properly :) ...otherwise try to re-read the instructions above :(
You can refer to this repository: https://github.com/sprintingkiwi/pycraft_lib