Proxies Minecraft packets through Discord!
Find a file
2025-07-27 00:00:08 +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-05-24 19:00:10 +02:00

Discraft

Playing Minecraft through Discord!

Important

This project is almost finished, I just have to get the determination to do the final plumbing and debug intricate 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's quite funny, isn't it?

This was an original idea I initially attempted to implement in C++. However, I encountered challenges at the very end when trying to mix Asio, asynchronous programming, class inheritance, and multithreading. Surely, I had written absolute spaghetti code riddled with memory leaks.

How It Works

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

discraft_diagram

APP is our program.

Note: Each side of our 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 that, on the server side, we first listen for a Discord message. Conversely, on the client side, we first wait for the Minecraft server to connect.