Compare commits
2 Commits
1f621333de
...
3c90a09d82
Author | SHA1 | Date | |
---|---|---|---|
3c90a09d82 | |||
390c3405c3 |
12
README.md
12
README.md
|
@ -6,28 +6,22 @@ Mosfet is able to farm wood by cutting trees, gather sand, gather netherwart,
|
||||||
and trade with villagers to get emeralds. He can eat, sleep, and flee from
|
and trade with villagers to get emeralds. He can eat, sleep, and flee from
|
||||||
threats.
|
threats.
|
||||||
|
|
||||||
## Setup
|
## Linux Setup
|
||||||
|
|
||||||
Assuming Debian / Ubuntu based distro:
|
Assuming Debian / Ubuntu based distro:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo apt update
|
$ sudo apt update
|
||||||
$ sudo apt install build-essential python3 python3-dev python3-pip python3-virtualenv git
|
$ sudo apt install build-essential python3 python3-dev python3-pip python3-virtualenv git wget unzip
|
||||||
|
|
||||||
$ git clone https://git.tannercollin.com/tanner/minecraft-bot.git
|
$ git clone https://git.tannercollin.com/tanner/minecraft-bot.git
|
||||||
$ cd minecraft-bot/
|
$ cd minecraft-bot/
|
||||||
$ bash download_mcdata.sh
|
|
||||||
$ virtualenv -p python3 env
|
|
||||||
$ source env/bin/activate
|
|
||||||
(env) $ pip install -r requirements.txt
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Always make sure the virtual environment is running `(env)`.
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
```
|
```
|
||||||
(env) $ USERNAME=you@domain.com PASSWORD=supersecret SERVER=example.com python main.py
|
$ USERNAME=you@domain.com PASSWORD=supersecret SERVER=example.com ./run-linux.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
36
run_linux.sh
36
run_linux.sh
|
@ -2,6 +2,42 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
if ! command -v virtualenv &> /dev/null
|
||||||
|
then
|
||||||
|
echo "virtualenv could not be found, please install with:"
|
||||||
|
echo "sudo apt install python3-virtualenv"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v wget &> /dev/null
|
||||||
|
then
|
||||||
|
echo "wget could not be found, please install with:"
|
||||||
|
echo "sudo apt install wget"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v unzip &> /dev/null
|
||||||
|
then
|
||||||
|
echo "unzip could not be found, please install with:"
|
||||||
|
echo "sudo apt install unzip"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v python3 &> /dev/null
|
||||||
|
then
|
||||||
|
echo "python3 could not be found, please install with:"
|
||||||
|
echo "sudo apt install python3"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v pip3 &> /dev/null
|
||||||
|
then
|
||||||
|
echo "pip3 could not be found, please install with:"
|
||||||
|
echo "sudo apt install pip3"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# download minecraft data
|
# download minecraft data
|
||||||
|
|
||||||
if [ ! -d "minecraft_data" ]
|
if [ ! -d "minecraft_data" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user