Proxies Minecraft packets through Discord!
Find a file
2025-08-23 10:16:40 +02:00
diagrams add diagram source files 2025-03-01 10:02:19 +01:00
src do nothing 2025-07-25 20:14:10 +02:00
.gitignore do nothing 2025-07-25 20:14:10 +02:00
Cargo.toml try fixes 2025-05-02 02:06:31 +02:00
LICENSE Initial commit 2024-11-24 00:50:28 +01:00
README.md Update README.md 2025-08-23 10:16:40 +02:00

Discraft

Playing Minecraft through Discord!

Important

This project is almost finished. I just need the determination to wire up the last bits and debug the tricky bugs.

💡 The Original Idea

I wondered: would it be possible to play Minecraft through Discord? That would require some knowledge of asynchronous programming, wouldn't it? And it is quite funny, isn't it?

I first tried to implement it in C++. I hit problems at the very end when I tried to mix Asio, asynchronous programming, class inheritance, and multithreading. I had written absolute spaghetti code riddled with memory leaks.

⚙️ How It Works

Below is a diagram explaining how the components interact with one another.

discraft_diagram

APP is the program.

Note: Each side of the app (client and server) controls one Discord bot.

🧠 The Logic

  • Listen for TCP packets coming from the Minecraft client.

    • Convert TCP packets into text suitable for Discord.

      • Send the text to Discord.
  • Listen for Discord messages.

    • Parse the Discord messages into bytes.

      • Send the bytes through the socket to the Minecraft client.

The only difference between the client side and the server side is the order of events. On the server side, we first listen for a Discord message. On the client side, we first wait for the Minecraft server to connect.