Control Minecraft on your PC using your phone as a controller!
This project provides a Flutter mobile app that sends UDP commands to a Python backend, which then injects keyboard and mouse inputs into Minecraft.
- 🔗 UDP Connection: Connects to the Python backend using server IP and port.
- 🎮 On-Screen Controls: Buttons for movement, hotbar, and actions; joystick for looking.
- 🔄 JSON Payloads: Sends structured JSON for press, click, and movement commands.
- ⚙️ Configurable: Customize server IP, port, and UI sensitivity in settings.
- Flutter SDK (3.x recommended)
- Dart SDK (2.19+)
- Android or iOS device/emulator
- Device and PC on the same local network
-
Clone this repo:
git clone https://github.com/Musaddiq625/minecraft_flutter_controller.git cd minecraft_controller -
Fetch dependencies:
flutter pub get
-
Run the app on your device:
flutter run --release
-
(Optional) Build an APK:
flutter build apk --release
The app sends UDP packets containing JSON objects.
Example formats:
{ "action": "press", "key": "w" }
{ "action": "click" }
{ "action": "move", "x": 1, "y": -1 }| Command | Description |
|---|---|
| press | Press and release a key (e.g., WASD) |
| click | Single mouse click (attack/use) |
| move | Continuous look/aim movement (dx, dy) |
Check the pubspec.yaml for the full package list. Core dependencies include:
- Flutter SDK (
flutter) - UDP client (
udp: ^5.0.3) - (Other packages as needed for UI or state management)
-
Start the Python backend on your PC:
python main.py
It will display your local IP address.
-
Enter the IP and port in the Flutter app’s Settings and tap Connect.
-
Use the on-screen controls to move, look, jump, attack, open inventory, etc.
- Cannot connect: Ensure both devices are on the same Wi-Fi network and the IP/port are correct.
- No response: Verify the Python script is running with appropriate permissions.
- Laggy controls: Increase joystick sensitivity or reduce network interference.
- This app communicates over your local network using UDP and does not use any encryption or authentication.
- Make sure both devices are on a trusted network. Avoid using public Wi-Fi for security reasons.
- Make sure Minecraft is running and focused on your PC.
- Go to Options > Controls > Mouse Settings, and enable Raw Input to ensure the game accepts movement commands correctly.
- Author: Musaddiq Ahmed Khan (Musaddiq625)
- Flutter App: https://github.com/Musaddiq625/minecraft_flutter_controller.git
- Python Backend: https://github.com/Musaddiq625/minecraft_python_controller.git
This is just a basic proof of concept to spark your creativity! If you can improve or extend it, feel free to fork and submit a PR.
Made with ❤️ by Musaddiq625 — contributions welcome!