Sep 15, 2020.
Mod to emulate the Raspberry PI Minecraft API for writing Python code that functions in Minecraft.
Code: MIT License
Sample scripts: Varies (see script) Mod dependancies: Default ![]() Download: zip file from github for Windows MSVC build of Minetest If you replace the socket/core.dll file with a a Linux or OS X luasockets library, it should work, but this hasn't been tested. ![]() Minecraft Python Api SpigotOnce it's installed, you'll want to install a python interpreter. Once python is installed and on the system path, you can drop scripts into mods/raspberryjammod/mcpipy/ and run them with /py scriptname [arguments] from the Minetest chat. (You will need to edit settings.conf in the mod directory if it can't find your Python interpreter. I recommend PyPy for best performance.) Some fun demo scripts to try:/py borromean /py render dragon (this will be slow) /py chess (wield a sword and LEFT-click on pieces and places to move; only works with a sword, and you need to LEFT click, contrary to instructions) /py fancytree Finally, if you want to play with (or teach) some simple turtle graphics using Blockly (a graphical programming system), you don't need to install python. Just start a world with raspberryjammod enabled, and go to http://robotblocks.appspot.com. What this is about
Lately I bought above book as I wanted to start teaching my 9 - years old kidhow to script a bit w/Python in his beloved Minecraft world.
The book is great, but for one thing. Its first part is about installing Minecraft, Spigot server and Python API on Windows or Mac or Raspberry-PI(w/some Debian/Ubuntu based distro on board).
As we run Fedoras on our laptops (and on my server that is a physical machine placed in our basement) I had to somehow make it work in our environment.
ScenarioPython List Api
So the scenario here is that Minecraft client (game) will be run on laptopswhile Spigot server will be run on the Fedora 27 server inside of systemd-nspawn container. Download mac vlc media player. Thanks to running it on container we will not contaminate server's libraries.
You may of course install all of this on your laptop instead having serverand game running on same host (localhost).
Creating systemd-nspawn container for Minecraft server
This step is not needed at all. I just wanted to have Minecraft server installed under systemd-nspawn container. I will not elaborate here about creating containers as this is totally another matter.
If you'd like to also create systemd-nspawn container you may find followingfiles helpful:
Installing Spigot server on Fedora
This one is actually simple. Skype download mac el capitan. First install all prerequisites:
Now download server libraries (preferably as user minecraft to /home/minecraft/minecraft):
And now build it - provide same version as you have on your Minecraft game:
After a while Your server is all built up. Now you need to install RaspberryJuice plugin for Bukkit that actually create socket API that will beused by Python API helper:
When above is ready you need to copy freshly built jar to Spigot plugins directory (use latest version of the built file; mine was 1.11):
Now you need to confirm that you agree to all terms (haha lol) by creating eula.txt file:
Afterwards you just need to start the server. You may create start.sh script with following contents (remember - provide here same version as your Spigot server and Minecraft client): Apple office mac 2011 download.
or use system unit file I provided on Github
Installing Python API on Fedora
Now we need to install Python API library. Most internet guides tells aboutrunning sudo pip3 install ... I don't like it as this would pollute yourglobal Python path with some Minecraft API library. C'mon.
So imo we should rather create virtualenv for this: https://hightree185.weebly.com/crimson-text-font-download-mac.html.
And now we can safely install the API library:
And that's all. Now the following code run from your virtualenv should justwork:
Minecraft Python 3CommentsPlease enable JavaScript to view the comments.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |