Rename to mosfet.py, delete linux bash scripts

This commit is contained in:
Tanner
2026-11-03 20:07:47 +00:00
parent d43533bcfe
commit 891f14b988
7 changed files with 82 additions and 254 deletions
+15 -42
View File
@@ -7,61 +7,34 @@ Mosfet is able to farm wood by cutting trees, farm crops, gather sand, farm
netherwart, and trade with villagers to get emeralds. He can eat, sleep, and
flee from threats.
## Requirements
## Requirements and setup
- Python >= 3.6
- pip, virtualenv, git, wget, unzip
- Python 3.11+
- The locally updated pyCraft checkout at `../pyCraft`
## Linux Setup
Assuming Debian / Ubuntu based distro:
From the repository root, create and activate a virtual environment, then
install the connection-mode dependencies:
```
$ sudo apt update
$ sudo apt install build-essential python3 python3-dev python3-pip virtualenv git wget unzip
$ git clone https://git.tannercollin.com/tanner/minecraft-bot.git
$ cd minecraft-bot/
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python -m pip install flask flask-cors munch watchdog -e ../pyCraft
```
## Running
If you want to use the built-in burner account (Minecraft name `mattstack`):
Run the bot directly with Python. For the Protospace offline-mode server:
```
$ SERVER=minecraft.example.com ./run_linux.sh
$ SERVER=games.protospace.ca python mosfet.py
```
Or, use `PORT` to specify a custom port to connect to:
`mosfet.py` defaults to that server, player name `mosfet1`, and the current
AuthMe password. Override `SERVER`, `PORT`, `PLAYER_NAME`, or `GAME_PASSWORD`
through environment variables as needed. Microsoft authentication is not used.
```
$ SERVER=localhost PORT=12345 ./run_linux.sh
```
Or, if you have your own alt account for the bot:
```
$ EMAIL=you@domain.com PASSWORD=supersecret SERVER=minecraft.example.com ./run_linux.sh
```
### Current offline servers (Minecraft 26.3)
The legacy automation in `main.py` uses 1.16-era world/chunk packet handling.
For an offline-mode server running Minecraft 26.3, use the minimal current-
protocol connection mode instead. It joins as `mosfet1` by default, answers
AuthMe registration/login prompts using `GAME_PASSWORD`, and stays connected;
world automation is not enabled in this mode.
The locally updated pyCraft checkout is expected at `../pyCraft`:
```
$ ./run_connect.sh
```
You can override `SERVER`, `PORT`, `PLAYER_NAME`, or `GAME_PASSWORD` through
environment variables. The current AuthMe default is `mosfetbot`. pyCraft is
being extended locally for protocol 777; no Microsoft authentication is used
in this mode.
The current entry point connects and handles AuthMe, but world automation is
not enabled yet: those modules still depend on 1.16-era packet and world data.
## Usage