A basic Python framework for interacting with Minecraft Bedrock Edition via simulated keypresses & clicks with PyAutoGUI.
Table of Contents
This project represents a proof-of-concept for being able to use Python scripting to interact with Minecraft Bedrock Edition clients. There are lots of bugs and intricacies to adddress, but also lots that this is already capable of. To see some of the possible actions you can automate with the scripting utilities, check out the following video, recorded completely hands free.
Demo_Course_Recording_480p.mp4
In this video you can see the following actions:
- Equipping armor.
- Relatively simple parkour in a back-to-back manner.
- Shooting targets at defined locations.
- Planting & growing saplings.
- Mining blocks.
- Bridging.
- Using a water bucket to land safely.
The script used for this recording can be found at Demo Scripts/demo_course.py
- Python
- PyAutoGUI
- Minecraft Bedrock Edition for Windows 11
Download the source code and customize your script, starting with the contents of custom_script_template.py
as your foundation.
A full list of pre-implemented functionality can be found in MC_Manipulation.py
, with other actions being able to be constructed from the more utility-level methods in MC_Manipulation.py
.
Run your custom script, then during the countdown, bring the Minecraft application window into focus and resume the game or load your world. Let go of all controls to avoid interfering with the script's actions.
See the open issues to add to the list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Distributed under the MIT License. See LICENSE.txt
for more information.
Joseph Lefkovitz - GitHub - LinkedIn
Project Link: https://github.com/lefkovitzj/Minecraft-BE-Input-Scripting
- PyAutoGUI, which serves as the application's primary interface with keyboard and mouse functionality.