Merge pull request #428 from fromlimbo/minecraft

Mineflayer:set born location to (26,100,20)
This commit is contained in:
Sirui Hong 2023-10-13 15:46:12 +08:00 committed by GitHub
commit 3613b9a56e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,7 @@ app.post("/start", (req, res) => {
});
bot.once("spawn", async () => {
mineflayerViewer(bot, { port: 3007, firstPerson: false })
mineflayerViewer(bot, { port: 3007, firstPerson: false })
bot.removeListener("error", onConnectionFailed);
let itemTicks = 1;
if (req.body.reset === "hard") {
@ -127,7 +127,7 @@ app.post("/start", (req, res) => {
bot.chat(`/spreadplayers ~ ~ 0 300 under 80 false @s`);
await bot.waitForTicks(bot.waitTicks);
}
bot.chat(`/spawnpoint bot 26 100 20`);
await bot.waitForTicks(bot.waitTicks * itemTicks);
res.json(bot.observe());