Merge pull request #40 from kolbytn/community-fixes

Community fixes
This commit is contained in:
Max Robinson 2024-04-07 19:34:40 -05:00 committed by GitHub
commit 11aa1948c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -19,13 +19,16 @@ Add one of these environment variables:
- `GEMINI_API_KEY`
- `ANTHROPIC_API_KEY` (and optionally `OPENAI_API_KEY` for embeddings. not necessary, but without embeddings performance will suffer)
⭐[How do I add the API key as an environment variable?](https://phoenixnap.com/kb/windows-set-environment-variable)⭐
Clone/Download this repository
Run `npm install`
Install the minecraft version specified in `settings.json`, currently supports up to 1.20.2
Install the minecraft version specified in `settings.json`, currently supports up to 1.20.4
## Run
## Running Locally
Start a minecraft world and open it to LAN on localhost port `55916`
@ -33,17 +36,21 @@ Run `node main.js`
You can configure the agent's name, model, and prompts in their profile like `andy.json`.
You can configure project details in `settings.json`.
You can configure project details in `settings.json`. Here is an example settings for connecting to a non-local server:
## Online Servers
To connect to online servers your bot will need an official Microsoft/Minecraft account. You can use your own personal one, but will need another account if you want to connect with it. Here is an example settings for this:
```
{
"minecraft_version": "1.20.1",
"minecraft_version": "1.20.4",
"host": "111.222.333.444",
"port": 55920,
"auth": "microsoft",
"allow_insecure_coding": false
}
```
‼️Make sure your bot's name in the profile.json matches the account name! Otherwise the bot will spam talk to itself.
## Patches

View file

@ -12,6 +12,7 @@
"mineflayer-pvp": "^1.3.2",
"openai": "^4.4.0",
"patch-package": "^8.0.0",
"vec3": "^0.1.10",
"yargs": "^17.7.2"
},
"scripts": {