Skip to content

Commit

Permalink
Merge branch 'PrismarineJS:master' into 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Madlykeanu authored Oct 16, 2024
2 parents ad20637 + af3ba95 commit 945367a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 945367a

Please sign in to comment.