Перейти к содержанию
SoulFire LogoSoulFire

SDK recipes

Complete programs for common Minecraft bot jobs.

Это руководство доступно только на английском.

Each recipe is a complete program that shows the same job in TypeScript and Python.

Before you start

Complete the SDK installation and one first program. Unlike the first program, the recipes attach to a saved bot on a SoulFire server that is already running. They do not install a SoulFire server for you.

Set these values in the terminal that runs the recipe:

export SOULFIRE_URL="http://127.0.0.1:38765"
export SOULFIRE_TOKEN="your-api-token"
export SOULFIRE_INSTANCE_ID="your-instance-uuid"
export SOULFIRE_BOT_ID="your-bot-uuid"

Pick a job

Run and stop a recipe

Save the code using the filename in its code block. Run a TypeScript file with bun run <filename.ts>. Run a Python file with your virtual environment's Python, such as .venv/bin/python <filename.py>.

Some recipes run until you press Ctrl+C. Others finish when their action or task completes. When a recipe calls bot.connect(), it stops the bot on exit only if the recipe started it. The follow recipe uses the lower-level start API, so its task keeps running after the program exits. Cancel that task and stop the bot yourself when you are done. See bot state and task ownership.

Последнее обновление:

Полезна ли эта страница?