Spaces:
Paused
Paused
Update bot.js
Browse files
bot.js
CHANGED
|
@@ -6,6 +6,7 @@ const Movements = require("mineflayer-pathfinder").Movements;
|
|
| 6 |
const pathfinder = require("mineflayer-pathfinder").pathfinder;
|
| 7 |
const { GoalBlock, GoalXZ } = require("mineflayer-pathfinder").goals;
|
| 8 |
const util = require("util");
|
|
|
|
| 9 |
|
| 10 |
const config = require("./settings.json");
|
| 11 |
const loggers = require("./logging.js");
|
|
@@ -46,12 +47,15 @@ let viewerTimeout = null;
|
|
| 46 |
let bot = null;
|
| 47 |
|
| 48 |
function createBot() {
|
|
|
|
|
|
|
| 49 |
bot = mineflayer.createBot({
|
| 50 |
username: config["bot-account"]["username"],
|
| 51 |
auth: config["bot-account"]["type"],
|
| 52 |
host: config.server.ip,
|
| 53 |
port: config.server.port,
|
| 54 |
-
version: config.server.version
|
|
|
|
| 55 |
});
|
| 56 |
|
| 57 |
|
|
|
|
| 6 |
const pathfinder = require("mineflayer-pathfinder").pathfinder;
|
| 7 |
const { GoalBlock, GoalXZ } = require("mineflayer-pathfinder").goals;
|
| 8 |
const util = require("util");
|
| 9 |
+
const { SocksProxyAgent } = require("socks-proxy-agent");
|
| 10 |
|
| 11 |
const config = require("./settings.json");
|
| 12 |
const loggers = require("./logging.js");
|
|
|
|
| 47 |
let bot = null;
|
| 48 |
|
| 49 |
function createBot() {
|
| 50 |
+
|
| 51 |
+
const agent = new SocksProxyAgent("socks5://206.123.156.222:8291");
|
| 52 |
bot = mineflayer.createBot({
|
| 53 |
username: config["bot-account"]["username"],
|
| 54 |
auth: config["bot-account"]["type"],
|
| 55 |
host: config.server.ip,
|
| 56 |
port: config.server.port,
|
| 57 |
+
version: config.server.version,
|
| 58 |
+
agent
|
| 59 |
});
|
| 60 |
|
| 61 |
|