1 Title: Learn to program with Minetest on Debian
5 <p>A fun way to learn how to program
6 <a href="https://www.python.org/">Python</a> is to follow the
7 instructions in the book
8 "<a href="https://nostarch.com/programwithminecraft">Learn to program
9 with Minecraft</a>", which introduces programming in Python to people
10 who like to play with Minecraft. The book uses a Python library to
11 talk to a TCP/IP socket with an API accepting build instructions and
12 providing information about the current players in a Minecraft world.
13 The TCP/IP API was first created for the Minecraft implementation for
14 Raspberry Pi, and has since been ported to some server versions of
15 Minecraft. The book contain recipes for those using Windows, MacOSX
16 and Raspian. But a little known fact is that you can follow the same
17 recipes using the free software construction game
18 <a href="https://minetest.net/">Minetest</a>.</p>
20 <p>There is <a href="https://github.com/sprintingkiwi/pycraft_mod">a
21 Minetest module implementing the same API</a>, making it possible to
22 use the Python programs coded to talk to Minecraft with Minetest too.
24 <a href="https://ftp-master.debian.org/new/minetest-mod-pycraft_0.20%2Bgit20180331.0376a0a%2Bdfsg-1.html">uploaded
25 this module</a> to Debian two weeks ago, and as soon as it clears the
26 FTP masters NEW queue, learning to program Python with Minetest on
27 Debian will be a simple 'apt install' away. The Debian package is
28 maintained as part of the Debian Games team, and
29 <a href="https://salsa.debian.org/games-team/unfinished/minetest-mod-pycraft">the
30 packaging rules</a> are currently located under 'unfinished' on
33 <p>You will most likely need to install several of the Minetest
34 modules in Debian for the examples included with the library to work
35 well, as there are several blocks used by the example scripts that are
36 provided via modules in Minetest. Without the required blocks, a
37 simple stone block is used instead. My initial testing with a analog
38 clock did not get gold arms as instructed in the python library, but
39 instead used stone arms.</p>
41 <p>I tried to find a way to add the API to the desktop version of
42 Minecraft, but were unable to find any working recipes. The
43 <a href="https://www.epiphanydigest.com/tag/minecraft-python-api/">recipes</a>
44 I <a href="https://github.com/kbsriram/mcpiapi">found</a> are only
45 working with a standalone Minecraft server setup. Are there any
46 options to use with the normal desktop version?</p>
48 <p>As usual, if you use Bitcoin and want to show your support of my
49 activities, please send Bitcoin donations to my address
50 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>