Skip to content

Commit

Permalink
Remove debug logging (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Oct 14, 2024
1 parent 495eaff commit eb29d35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions examples/echo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@
const mineflayer = require('mineflayer')

if (process.argv.length < 4 || process.argv.length > 6) {
console.log('Usage : node echo.js <host> <port> [<name>] [<password>]')
console.log('Usage : node echo.js <host> <port> [<name>] [online?]')
process.exit(1)
}

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)
})
2 changes: 0 additions & 2 deletions lib/plugins/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
})

Expand Down

0 comments on commit eb29d35

Please sign in to comment.