A bot to help you with all your Minecraft-related needs!
TextToMinecraft is a bot that can perform all kinds of Minecraft-related tasks, and it can even build structures for you! All you need to do is chat with the bot in-game like you would with ChatGPT or other LLMs, and it will perform what you describe to the best of its ability.
This project is still very much a work-in-progress, so use with caution if you plan on testing it in a Minecraft world.
- Own Minecraft (and an OpenAI key). This also means you need to be on Windows.
- Clone the repository on your machine.
- Create a Python virtual environment in the project directory, and be sure to activate it so nothing gets installed globally.
- Run
pip install .
to install all the dependencies frompyproject.toml
. - Substitute your OpenAI API key in
.env.sample
and rename that file to.env
. - [OPTIONAL] Download the example JSON schematics zip file from here and extract it into the /data directory. This is currently optional because this data is not used in the present version.
- Start coding! Be aware of the pricing for OpenAI API access when you run the program.
The bot works by connecting to a LAN world hosted on your machine. The process is outlined here:
- Run the program with
python main.py
and you should see a controller window asking for the server port. - Launch Minecraft 1.20.4 and open a world.
- In the pause menu, click Open to LAN. In the following menu, set the gamemode to Creative and Allow Cheats to On. Open the LAN server.
- You should see a port show up in the chat. Copy this port and paste it in the controller window's port field.
- Click the connect button and the bot should join your world and say hello!
- Once you're done interacting with it, use the "$exit" command to disconnect the bot, then close the controller window.
Ryan Hardy – [email protected]
https://github.com/ryyHardy/text-to-minecraft
- Fork it (https://github.com/ryyHardy/text-to-minecraft/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request