From eb29d350ede0590fce17e04bf21071807a87e3a1 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 14 Oct 2024 18:02:06 -0400 Subject: [PATCH 1/2] Remove debug logging (#3478) --- examples/echo.js | 8 ++++++-- lib/plugins/game.js | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/echo.js b/examples/echo.js index b7bd929b8..51f36c6c9 100644 --- a/examples/echo.js +++ b/examples/echo.js @@ -9,7 +9,7 @@ const mineflayer = require('mineflayer') if (process.argv.length < 4 || process.argv.length > 6) { - console.log('Usage : node echo.js [] []') + console.log('Usage : node echo.js [] [online?]') process.exit(1) } @@ -17,10 +17,14 @@ const bot = mineflayer.createBot({ host: process.argv[2], port: parseInt(process.argv[3]), username: process.argv[4] ? process.argv[4] : 'echo', - password: process.argv[5] + auth: process.argv[5] ? 'microsoft' : 'offline' }) bot.on('chat', (username, message) => { if (username === bot.username) return bot.chat(message) }) + +bot.on('kicked', (reason) => { + console.log('I was kicked from the server: ' + reason) +}) diff --git a/lib/plugins/game.js b/lib/plugins/game.js index b9dedef2d..c992d1f74 100644 --- a/lib/plugins/game.js +++ b/lib/plugins/game.js @@ -55,7 +55,6 @@ function inject (bot, options) { if (packet.worldType && !bot.game.dimension) { bot.game.dimension = packet.worldType.replace('minecraft:', '') } - console.log('*Dimension data', bot.game.dimension, bot.registry.dimensionsByName, packet) const dimData = bot.registry.dimensionsByName[bot.game.dimension] if (dimData) { bot.game.minY = dimData.minY @@ -79,7 +78,6 @@ function inject (bot, options) { // 1.20.2 bot._client.on('registry_data', (packet) => { - console.log('Loading Dimension Codec', JSON.stringify(packet).slice(0, 100)) bot.registry.loadDimensionCodec(packet.codec || packet) }) From af3ba9554670e8f5115f876156c0fc80d3bb0503 Mon Sep 17 00:00:00 2001 From: rom1504bot Date: Tue, 15 Oct 2024 00:26:44 +0200 Subject: [PATCH 2/2] Release 4.22.0 (#3479) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/history.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/history.md b/docs/history.md index 309edeaa7..d7eeafa06 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,3 +1,6 @@ +## 4.22.0 +* [Remove debug logging (#3478)](https://github.com/PrismarineJS/mineflayer/commit/eb29d350ede0590fce17e04bf21071807a87e3a1) (thanks @extremeheat) + ## 4.21.0 * [1.20.6 (#3412)](https://github.com/PrismarineJS/mineflayer/commit/44fad41c18be5024564e24e1cdee624d35d4d387) (thanks @extremeheat) * [Update README.md (#3420)](https://github.com/PrismarineJS/mineflayer/commit/1c2a5c0fa78f74a63fabd7edde85c4a74db32dee) (thanks @SilkePilon) diff --git a/package.json b/package.json index 6d1888fb1..eef358235 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mineflayer", - "version": "4.21.0", + "version": "4.22.0", "description": "create minecraft bots with a stable, high level API", "main": "index.js", "types": "index.d.ts",