mineflayer 4.21.0 → 4.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/docs/README.md +2 -1
- package/docs/history.md +7 -0
- package/examples/echo.js +6 -2
- package/lib/plugins/chat.js +3 -2
- package/lib/plugins/game.js +0 -2
- package/lib/plugins/inventory.js +2 -1
- package/lib/version.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
17
17
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
|
-
* Supports Minecraft 1.8 to 1.
|
|
20
|
+
* Supports Minecraft 1.8 to 1.21 (1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, and 1.21)
|
|
21
21
|
* Entity knowledge and tracking.
|
|
22
22
|
* Block knowledge. You can query the world around you. Milliseconds to find any block.
|
|
23
23
|
* Physics and movement - handle all bounding boxes
|
|
@@ -234,6 +234,7 @@ The most updated and useful are :
|
|
|
234
234
|
## Projects Using Mineflayer
|
|
235
235
|
|
|
236
236
|
* [Voyager](https://github.com/MineDojo/Voyager) An Open-Ended Embodied Agent with Large Language Models
|
|
237
|
+
* [mindcraft](https://github.com/kolbytn/mindcraft) Lib for using mineflayer with LLMs
|
|
237
238
|
* [rom1504/rbot](https://github.com/rom1504/rbot)
|
|
238
239
|
- [YouTube - building a spiral staircase](https://www.youtube.com/watch?v=UM1ZV5200S0)
|
|
239
240
|
- [YouTube - replicating a building](https://www.youtube.com/watch?v=0cQxg9uDnzA)
|
package/docs/README.md
CHANGED
|
@@ -17,7 +17,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
17
17
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
|
-
* Supports Minecraft 1.8 to 1.
|
|
20
|
+
* Supports Minecraft 1.8 to 1.21 (1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, and 1.21)
|
|
21
21
|
* Entity knowledge and tracking.
|
|
22
22
|
* Block knowledge. You can query the world around you. Milliseconds to find any block.
|
|
23
23
|
* Physics and movement - handle all bounding boxes
|
|
@@ -234,6 +234,7 @@ The most updated and useful are :
|
|
|
234
234
|
## Projects Using Mineflayer
|
|
235
235
|
|
|
236
236
|
* [Voyager](https://github.com/MineDojo/Voyager) An Open-Ended Embodied Agent with Large Language Models
|
|
237
|
+
* [mindcraft](https://github.com/kolbytn/mindcraft) Lib for using mineflayer with LLMs
|
|
237
238
|
* [rom1504/rbot](https://github.com/rom1504/rbot)
|
|
238
239
|
- [YouTube - building a spiral staircase](https://www.youtube.com/watch?v=UM1ZV5200S0)
|
|
239
240
|
- [YouTube - replicating a building](https://www.youtube.com/watch?v=0cQxg9uDnzA)
|
package/docs/history.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 4.23.0
|
|
2
|
+
* [1.21 (#3480)](https://github.com/PrismarineJS/mineflayer/commit/4aa10fb45431940504c7809f078f1f410e7fa7a3) (thanks @Madlykeanu)
|
|
3
|
+
* [Adding mindcraft to mineflayer readme](https://github.com/PrismarineJS/mineflayer/commit/dd00db42ba20682418d8fbd5629e1033dfb0ff20) (thanks @rom1504)
|
|
4
|
+
|
|
5
|
+
## 4.22.0
|
|
6
|
+
* [Remove debug logging (#3478)](https://github.com/PrismarineJS/mineflayer/commit/eb29d350ede0590fce17e04bf21071807a87e3a1) (thanks @extremeheat)
|
|
7
|
+
|
|
1
8
|
## 4.21.0
|
|
2
9
|
* [1.20.6 (#3412)](https://github.com/PrismarineJS/mineflayer/commit/44fad41c18be5024564e24e1cdee624d35d4d387) (thanks @extremeheat)
|
|
3
10
|
* [Update README.md (#3420)](https://github.com/PrismarineJS/mineflayer/commit/1c2a5c0fa78f74a63fabd7edde85c4a74db32dee) (thanks @SilkePilon)
|
package/examples/echo.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
const mineflayer = require('mineflayer')
|
|
10
10
|
|
|
11
11
|
if (process.argv.length < 4 || process.argv.length > 6) {
|
|
12
|
-
console.log('Usage : node echo.js <host> <port> [<name>] [
|
|
12
|
+
console.log('Usage : node echo.js <host> <port> [<name>] [online?]')
|
|
13
13
|
process.exit(1)
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -17,10 +17,14 @@ const bot = mineflayer.createBot({
|
|
|
17
17
|
host: process.argv[2],
|
|
18
18
|
port: parseInt(process.argv[3]),
|
|
19
19
|
username: process.argv[4] ? process.argv[4] : 'echo',
|
|
20
|
-
|
|
20
|
+
auth: process.argv[5] ? 'microsoft' : 'offline'
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
bot.on('chat', (username, message) => {
|
|
24
24
|
if (username === bot.username) return
|
|
25
25
|
bot.chat(message)
|
|
26
26
|
})
|
|
27
|
+
|
|
28
|
+
bot.on('kicked', (reason) => {
|
|
29
|
+
console.log('I was kicked from the server: ' + reason)
|
|
30
|
+
})
|
package/lib/plugins/chat.js
CHANGED
|
@@ -118,10 +118,11 @@ function inject (bot, options) {
|
|
|
118
118
|
target: data.targetName ? JSON.parse(data.targetName) : undefined,
|
|
119
119
|
content: message ? JSON.parse(message) : { text: data.plainMessage }
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
const registryIndex = data.type.registryIndex ? data.type.registryIndex : data.type
|
|
122
|
+
msg = ChatMessage.fromNetwork(registryIndex, parameters)
|
|
122
123
|
|
|
123
124
|
if (data.unsignedContent) {
|
|
124
|
-
msg.unsigned = ChatMessage.fromNetwork(
|
|
125
|
+
msg.unsigned = ChatMessage.fromNetwork(registryIndex, { sender: parameters.sender, target: parameters.target, content: JSON.parse(data.unsignedContent) })
|
|
125
126
|
}
|
|
126
127
|
} else {
|
|
127
128
|
msg = ChatMessage.fromNotch(message)
|
package/lib/plugins/game.js
CHANGED
|
@@ -55,7 +55,6 @@ function inject (bot, options) {
|
|
|
55
55
|
if (packet.worldType && !bot.game.dimension) {
|
|
56
56
|
bot.game.dimension = packet.worldType.replace('minecraft:', '')
|
|
57
57
|
}
|
|
58
|
-
console.log('*Dimension data', bot.game.dimension, bot.registry.dimensionsByName, packet)
|
|
59
58
|
const dimData = bot.registry.dimensionsByName[bot.game.dimension]
|
|
60
59
|
if (dimData) {
|
|
61
60
|
bot.game.minY = dimData.minY
|
|
@@ -79,7 +78,6 @@ function inject (bot, options) {
|
|
|
79
78
|
|
|
80
79
|
// 1.20.2
|
|
81
80
|
bot._client.on('registry_data', (packet) => {
|
|
82
|
-
console.log('Loading Dimension Codec', JSON.stringify(packet).slice(0, 100))
|
|
83
81
|
bot.registry.loadDimensionCodec(packet.codec || packet)
|
|
84
82
|
})
|
|
85
83
|
|
package/lib/plugins/inventory.js
CHANGED
package/lib/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const testedVersions = ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.6']
|
|
1
|
+
const testedVersions = ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.6', '1.21.1']
|
|
2
2
|
module.exports = {
|
|
3
3
|
|
|
4
4
|
testedVersions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mineflayer",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "create minecraft bots with a stable, high level API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"minecraft-data": "^3.76.0",
|
|
25
|
-
"minecraft-protocol": "^1.
|
|
25
|
+
"minecraft-protocol": "^1.50.0",
|
|
26
26
|
"prismarine-biome": "^1.1.1",
|
|
27
27
|
"prismarine-block": "^1.17.0",
|
|
28
28
|
"prismarine-chat": "^1.7.1",
|
|
29
|
-
"prismarine-chunk": "^1.
|
|
29
|
+
"prismarine-chunk": "^1.36.0",
|
|
30
30
|
"prismarine-entity": "^2.3.0",
|
|
31
31
|
"prismarine-item": "^1.15.0",
|
|
32
32
|
"prismarine-nbt": "^2.0.0",
|
|
33
|
-
"prismarine-physics": "^1.
|
|
33
|
+
"prismarine-physics": "^1.9.0",
|
|
34
34
|
"prismarine-recipe": "^1.3.0",
|
|
35
|
-
"prismarine-registry": "^1.
|
|
35
|
+
"prismarine-registry": "^1.10.0",
|
|
36
36
|
"prismarine-windows": "^2.9.0",
|
|
37
37
|
"prismarine-world": "^3.6.0",
|
|
38
38
|
"protodef": "1.17.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@types/node": "^22.1.0",
|
|
44
44
|
"doctoc": "^2.0.1",
|
|
45
45
|
"minecraft-wrap": "^1.3.0",
|
|
46
|
-
"mineflayer": "file
|
|
46
|
+
"mineflayer": "file:",
|
|
47
47
|
"mocha": "^10.0.0",
|
|
48
48
|
"protodef-yaml": "^1.5.3",
|
|
49
49
|
"standard": "^17.0.0",
|