Programming Minecraft with Websockets
Anand S (~anand40) |
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.
- 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
If you want to try this yourself or code along during the session, you need
- Minecraft. The free trial is fine.
- Python 3.7+
Anand is CEO at Gramener. He narrates data stories using Python.
Dhyeya is a student at Sri Kumaran's. She like robotics and mathematics.