mineflayer 3.14.1 → 3.18.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/.github/FUNDING.yml +3 -0
- package/.github/workflows/ci.yml +2 -0
- package/README.md +11 -10
- package/docs/FAQ.md +10 -2
- package/docs/README.md +11 -10
- package/docs/api.md +130 -158
- package/docs/history.md +16 -0
- package/docs/zh/CONTRIBUTING.md +93 -0
- package/docs/zh/FAQ.md +169 -0
- package/docs/zh/README_ZH_CN.md +32 -25
- package/docs/zh/_sidebar.md +9 -0
- package/docs/zh/api.md +2132 -0
- package/docs/zh/demos.md +18 -0
- package/docs/zh/history.md +914 -0
- package/docs/zh/index.html +38 -0
- package/docs/zh/tutorial.md +718 -0
- package/examples/anvil.js +10 -12
- package/examples/chest.js +14 -16
- package/examples/digger.js +25 -31
- package/examples/inventory.js +10 -12
- package/index.d.ts +57 -65
- package/lib/features.json +37 -27
- package/lib/loader.js +1 -1
- package/lib/plugins/blocks.js +70 -90
- package/lib/plugins/chat.js +12 -1
- package/lib/plugins/digging.js +12 -2
- package/lib/plugins/game.js +6 -1
- package/lib/promise_utils.js +16 -3
- package/lib/version.js +2 -2
- package/package.json +5 -5
package/.github/FUNDING.yml
CHANGED
package/.github/workflows/ci.yml
CHANGED
package/README.md
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mineflayer)
|
|
4
4
|
[](https://github.com/PrismarineJS/mineflayer/actions?query=workflow%3A%22CI%22)
|
|
5
|
-
[](https://discord.gg/GsEFRM8)
|
|
6
|
-
[](https://issuehunt.io/r/PrismarineJS/mineflayer)
|
|
7
5
|
[](https://gitpod.io/#https://github.com/PrismarineJS/mineflayer)
|
|
8
6
|
[](https://colab.research.google.com/github/PrismarineJS/mineflayer/blob/master/docs/mineflayer.ipynb)
|
|
7
|
+
[](https://github.com/sponsors/PrismarineJS)
|
|
8
|
+
|
|
9
|
+
[](https://discord.gg/GsEFRM8)
|
|
9
10
|
|
|
10
11
|
| <sub>EN</sub> [English](README.md) | <sub>RU</sub> [русский](ru/README_RU.md) | <sub>ES</sub> [Español](es/README_ES.md) | <sub>FR</sub> [Français](fr/README_FR.md) | <sub>TR</sub> [Türkçe](tr/README_TR.md) | <sub>ZH</sub> [中文](zh/README_ZH_CN.md) |
|
|
11
12
|
|-------------------------|----------------------------|----------------------------|----------------------------|----------------------------|----------------------------|
|
|
@@ -16,7 +17,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
16
17
|
|
|
17
18
|
## Features
|
|
18
19
|
|
|
19
|
-
* Supports Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16 and 1.
|
|
20
|
+
* Supports Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17 and 1.18.
|
|
20
21
|
* Entity knowledge and tracking.
|
|
21
22
|
* Block knowledge. You can query the world around you. Milliseconds to find any block.
|
|
22
23
|
* Physics and movement - handle all bounding boxes
|
|
@@ -31,7 +32,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
31
32
|
### Roadmap
|
|
32
33
|
|
|
33
34
|
Checkout [this page](https://github.com/PrismarineJS/mineflayer/wiki/Big-Prismarine-projects) to see what our current projects are.
|
|
34
|
-
|
|
35
|
+
|
|
35
36
|
## Installation
|
|
36
37
|
|
|
37
38
|
First install Node.js >= 14 from [nodejs.org](https://nodejs.org/) then:
|
|
@@ -196,10 +197,6 @@ The most updated and useful are :
|
|
|
196
197
|
|
|
197
198
|
* [radar](https://github.com/andrewrk/mineflayer-radar/) - web based radar
|
|
198
199
|
interface using canvas and socket.io. [YouTube Demo](https://www.youtube.com/watch?v=FjDmAfcVulQ)
|
|
199
|
-
* [blockfinder](https://github.com/Darthfett/mineflayer-blockFinder) - find blocks in the 3D world
|
|
200
|
-
* [scaffold](https://github.com/andrewrk/mineflayer-scaffold) - get to
|
|
201
|
-
a target destination even if you have to build or break blocks to do so.
|
|
202
|
-
[YouTube Demo](http://youtu.be/jkg6psMUSE0)
|
|
203
200
|
* [auto-auth](https://github.com/G07cha/MineflayerAutoAuth) - chat-based bot authentication
|
|
204
201
|
* [Bloodhound](https://github.com/Nixes/mineflayer-bloodhound) - determine who and what is responsible for damage to another entity
|
|
205
202
|
* [tps](https://github.com/SiebeDW/mineflayer-tps) - get the current tps (processed tps)
|
|
@@ -230,10 +227,14 @@ The most updated and useful are :
|
|
|
230
227
|
Simply run: `npm test`
|
|
231
228
|
|
|
232
229
|
### Testing specific version
|
|
233
|
-
Run `npm mocha_test -- -g <version>`, where `<version>` is a minecraft version like `1.12`, `1.15.2`...
|
|
230
|
+
Run `npm run mocha_test -- -g <version>`, where `<version>` is a minecraft version like `1.12`, `1.15.2`...
|
|
234
231
|
|
|
235
232
|
### Testing specific test
|
|
236
|
-
Run `npm mocha_test -- -g <test_name>`, where `<test_name>` is a name of the test like `bed`, `useChests`, `rayTrace`...
|
|
233
|
+
Run `npm run mocha_test -- -g <test_name>`, where `<test_name>` is a name of the test like `bed`, `useChests`, `rayTrace`...
|
|
234
|
+
|
|
235
|
+
### Example
|
|
236
|
+
|
|
237
|
+
`npm run mocha_test -- -g "1.18.1.*BlockFinder"` to run the block finder test for 1.18.1
|
|
237
238
|
|
|
238
239
|
## License
|
|
239
240
|
|
package/docs/FAQ.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This Frequently Asked Question document is meant to help people for the most common things.
|
|
4
4
|
|
|
5
|
+
### I get an error when trying to login with a microsoft account.
|
|
6
|
+
|
|
7
|
+
Make sure the email you entered into the username option in createBot can be used to login to `minecraft.net` using the 'Login with Microsoft' button.
|
|
8
|
+
Make sure you have the option `auth: 'microsoft'` in your createBot options.
|
|
9
|
+
|
|
10
|
+
When you get an error that says something about invalid credentials or 'Does this account own Minecraft?' try removing the password field in the `createBot` options and try again.
|
|
11
|
+
|
|
5
12
|
### How to hide errors ?
|
|
6
13
|
|
|
7
14
|
Use `hideErrors: true` in createBot options
|
|
@@ -119,7 +126,7 @@ Note that the order in which plugins are loaded is dynamic, so you should never
|
|
|
119
126
|
|
|
120
127
|
### How can I use a socks5 proxy?
|
|
121
128
|
|
|
122
|
-
In the options object for `mineflayer.createBot(options)`, remove your `host` option from the options object, have the following variables declared `PROXY_IP, PROXY_PORT, PROXY_USERNAME, PROXY_PASSWORD,
|
|
129
|
+
In the options object for `mineflayer.createBot(options)`, remove your `host` option from the options object, have the following variables declared `PROXY_IP, PROXY_PORT, PROXY_USERNAME, PROXY_PASSWORD, MC_SERVER_ADDRESS, MC_SERVER_PORT` and add this to your options object:
|
|
123
130
|
```js
|
|
124
131
|
connect: (client) => {
|
|
125
132
|
socks.createConnection({
|
|
@@ -132,7 +139,7 @@ connect: (client) => {
|
|
|
132
139
|
},
|
|
133
140
|
command: 'connect',
|
|
134
141
|
destination: {
|
|
135
|
-
host:
|
|
142
|
+
host: MC_SERVER_ADDRESS,
|
|
136
143
|
port: MC_SERVER_PORT
|
|
137
144
|
}
|
|
138
145
|
}, (err, info) => {
|
|
@@ -146,6 +153,7 @@ connect: (client) => {
|
|
|
146
153
|
}
|
|
147
154
|
```
|
|
148
155
|
`socks` is declared with `const socks = require('socks').SocksClient` and uses [this](https://www.npmjs.com/package/socks) package.
|
|
156
|
+
Some servers might reject the connection. If that happens try adding `fakeHost: MC_SERVER_ADDRESS` to your createBot options.
|
|
149
157
|
|
|
150
158
|
# Common Errors
|
|
151
159
|
|
package/docs/README.md
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mineflayer)
|
|
4
4
|
[](https://github.com/PrismarineJS/mineflayer/actions?query=workflow%3A%22CI%22)
|
|
5
|
-
[](https://discord.gg/GsEFRM8)
|
|
6
|
-
[](https://issuehunt.io/r/PrismarineJS/mineflayer)
|
|
7
5
|
[](https://gitpod.io/#https://github.com/PrismarineJS/mineflayer)
|
|
8
6
|
[](https://colab.research.google.com/github/PrismarineJS/mineflayer/blob/master/docs/mineflayer.ipynb)
|
|
7
|
+
[](https://github.com/sponsors/PrismarineJS)
|
|
8
|
+
|
|
9
|
+
[](https://discord.gg/GsEFRM8)
|
|
9
10
|
|
|
10
11
|
| <sub>EN</sub> [English](README.md) | <sub>RU</sub> [русский](ru/README_RU.md) | <sub>ES</sub> [Español](es/README_ES.md) | <sub>FR</sub> [Français](fr/README_FR.md) | <sub>TR</sub> [Türkçe](tr/README_TR.md) | <sub>ZH</sub> [中文](zh/README_ZH_CN.md) |
|
|
11
12
|
|-------------------------|----------------------------|----------------------------|----------------------------|----------------------------|----------------------------|
|
|
@@ -16,7 +17,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
16
17
|
|
|
17
18
|
## Features
|
|
18
19
|
|
|
19
|
-
* Supports Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16 and 1.
|
|
20
|
+
* Supports Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17 and 1.18.
|
|
20
21
|
* Entity knowledge and tracking.
|
|
21
22
|
* Block knowledge. You can query the world around you. Milliseconds to find any block.
|
|
22
23
|
* Physics and movement - handle all bounding boxes
|
|
@@ -31,7 +32,7 @@ First time using Node.js? You may want to start with the [tutorial](tutorial.md)
|
|
|
31
32
|
### Roadmap
|
|
32
33
|
|
|
33
34
|
Checkout [this page](https://github.com/PrismarineJS/mineflayer/wiki/Big-Prismarine-projects) to see what our current projects are.
|
|
34
|
-
|
|
35
|
+
|
|
35
36
|
## Installation
|
|
36
37
|
|
|
37
38
|
First install Node.js >= 14 from [nodejs.org](https://nodejs.org/) then:
|
|
@@ -196,10 +197,6 @@ The most updated and useful are :
|
|
|
196
197
|
|
|
197
198
|
* [radar](https://github.com/andrewrk/mineflayer-radar/) - web based radar
|
|
198
199
|
interface using canvas and socket.io. [YouTube Demo](https://www.youtube.com/watch?v=FjDmAfcVulQ)
|
|
199
|
-
* [blockfinder](https://github.com/Darthfett/mineflayer-blockFinder) - find blocks in the 3D world
|
|
200
|
-
* [scaffold](https://github.com/andrewrk/mineflayer-scaffold) - get to
|
|
201
|
-
a target destination even if you have to build or break blocks to do so.
|
|
202
|
-
[YouTube Demo](http://youtu.be/jkg6psMUSE0)
|
|
203
200
|
* [auto-auth](https://github.com/G07cha/MineflayerAutoAuth) - chat-based bot authentication
|
|
204
201
|
* [Bloodhound](https://github.com/Nixes/mineflayer-bloodhound) - determine who and what is responsible for damage to another entity
|
|
205
202
|
* [tps](https://github.com/SiebeDW/mineflayer-tps) - get the current tps (processed tps)
|
|
@@ -230,10 +227,14 @@ The most updated and useful are :
|
|
|
230
227
|
Simply run: `npm test`
|
|
231
228
|
|
|
232
229
|
### Testing specific version
|
|
233
|
-
Run `npm mocha_test -- -g <version>`, where `<version>` is a minecraft version like `1.12`, `1.15.2`...
|
|
230
|
+
Run `npm run mocha_test -- -g <version>`, where `<version>` is a minecraft version like `1.12`, `1.15.2`...
|
|
234
231
|
|
|
235
232
|
### Testing specific test
|
|
236
|
-
Run `npm mocha_test -- -g <test_name>`, where `<test_name>` is a name of the test like `bed`, `useChests`, `rayTrace`...
|
|
233
|
+
Run `npm run mocha_test -- -g <test_name>`, where `<test_name>` is a name of the test like `bed`, `useChests`, `rayTrace`...
|
|
234
|
+
|
|
235
|
+
### Example
|
|
236
|
+
|
|
237
|
+
`npm run mocha_test -- -g "1.18.1.*BlockFinder"` to run the block finder test for 1.18.1
|
|
237
238
|
|
|
238
239
|
## License
|
|
239
240
|
|