From 37d84beed8c53f5ec255508bbf6c6204eadca4f9 Mon Sep 17 00:00:00 2001 From: fhalley Date: Fri, 17 Jun 2022 10:16:51 +0200 Subject: [PATCH] Ajout protocol forge --- README.md | 2 +- bot5.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c02cd90..f995147 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Le but est de disposer d'un outil suplémentaire dans le cadre de l'aide aux dev |---|---|---| | 0.1 | 15/06/2022 | Premier push | | 0.11 | 16/06/2022 | Correction issue #1 | -| | | | \ No newline at end of file +| 0.12 | 17/06/2022 | Ajout protocol forge | \ No newline at end of file diff --git a/bot5.js b/bot5.js index d89f816..2d6f383 100644 --- a/bot5.js +++ b/bot5.js @@ -8,11 +8,17 @@ const autoeat = require("mineflayer-auto-eat") // to add forge modules https://github.com/PrismarineJS/mineflayer/pull/472 const options = { - host: "127.0.0.1", // Server IP - port: 50128, // Server port - username: 'V5-Bot', // Bot name + host: "127.0.0.1", + port: 50500, + username: 'V5-Bot' } +var mc = require('minecraft-protocol'); +var autoVersionForge = require('minecraft-protocol-forge').autoVersionForge; +var client = mc.createClient(options); + +autoVersionForge(client); + const bot = mineflayer.createBot(options) bot.loadPlugin(pathfinder) bot.loadPlugin(autoeat)