Programming Minecraft with Websockets

Anand S (~anand40)


Description:

Minecraft is the best-selling video game of all time, with 200 million copies sold.

It's a full-fledged 3D construction environment. It looks blocky at first, but you can create beautiful worlds.

It turns out that Minecraft is quite programmable. You can send it messages using websockets that can place blocks, create mobs, get information, and more.

Unfortunately, this is not officially documented,

This talk is a guide to the reverse-engineered Minecraft websocket protocol, and how to control the system using Python.

Talk outline:

  • 2 min: Overview of Minecraft commands
  • 3 min: Set up a websocket server and connect to it from Minecraft
  • 5 min: Subscribe to player messages from Minecraft
  • 5 min: Parse Minecraft messages
  • 5 min: Create blocks in Minecraft
  • 4 min: Queueing commands to prevent flooding
  • 1 min: What & how you can explore

Prerequisites:

If you want to try this yourself or code along during the session, you need

  • Minecraft. The free trial is fine.
  • Python 3.7+

Content URLs:

Here's a video of this talk, but meant for JavaScript

Speaker Info:

Anand is CEO at Gramener. He narrates data stories using Python.

Dhyeya is a student at Sri Kumaran's. She like robotics and mathematics.

Section: Game Design and 3D Modelling
Type: Talks
Target Audience: Intermediate
Last Updated: