Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

mineflayer

Package Overview
Dependencies
Maintainers
4
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mineflayer - npm Package Compare versions

Comparing version
4.34.0
to
4.35.0
+1
-0
.github/workflows/ci.yml

@@ -59,3 +59,4 @@ name: CI

run: npm install
- name: Start Tests
run: npm run mocha_test -- -g ${{ matrix.mcVersion }}v

@@ -0,1 +1,6 @@

## 4.35.0
* [🎈 1.21.11 (#3781)](https://github.com/PrismarineJS/mineflayer/commit/597745c7c061943620fcacba7254bccee05b7a3e) (thanks @rom1504bot)
* [Fix chat pattern and event listener in tutorial (#3783)](https://github.com/PrismarineJS/mineflayer/commit/48586138f560991de60bea639c71fa82954cf50f) (thanks @brentspine)
* [Update history.md](https://github.com/PrismarineJS/mineflayer/commit/c9f766513d5bb5a93c5b86c07827128716c0afdb) (thanks @extremeheat)
## 4.34.0

@@ -2,0 +7,0 @@ * [🎈 1.21.9/1.21.10 support (#3754)](https://github.com/PrismarineJS/mineflayer/commit/f0afaf73061c15b67e5d3457b60ed543e711acb6) (thanks @rom1504bot)

+1
-1

@@ -20,3 +20,3 @@ # Mineflayer

* Supports Minecraft 1.8 to 1.21.9 (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, 1.21, 1.21.9) <!--version-->
* Supports Minecraft 1.8 to 1.21.11 (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, 1.21, 1.21.9, 1.21.11) <!--version-->
* Entity knowledge and tracking.

@@ -23,0 +23,0 @@ * Block knowledge. You can query the world around you. Milliseconds to find any block.

@@ -579,4 +579,4 @@ # Tutorial

bot.addChatPattern(
'hello',
/(helo|hello|Hello)/,
'hello',
'Someone says hello'

@@ -589,3 +589,3 @@ )

bot.on('hello', hi)
bot.on('chat:hello', hi)
```

@@ -592,0 +592,0 @@

@@ -73,3 +73,3 @@ const { Vec3 } = require('vec3')

// This makes sure that the bot's real position has been already sent
if (!bot.entity.height) await onceWithCleanup(bot, 'chunkColumnLoad')
if (!bot.entity.height) await onceWithCleanup(bot, 'chunkColumnLoad', { timeout: 10000 })
const pos = bot.entity.position

@@ -88,6 +88,12 @@ const center = new Vec3(pos.x >> 4 << 4, 0, pos.z >> 4 << 4)

if (chunkPosToCheck.size) {
return new Promise((resolve) => {
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
bot.world.off('chunkColumnLoad', waitForLoadEvents)
reject(new Error(`Timeout waiting for ${chunkPosToCheck.size} chunks to load after 10000ms`))
}, 10000)
function waitForLoadEvents (columnCorner) {
chunkPosToCheck.delete(columnCorner.toString())
if (chunkPosToCheck.size === 0) { // no chunks left to find
clearTimeout(timeout)
bot.world.off('chunkColumnLoad', waitForLoadEvents) // remove this listener instance

@@ -94,0 +100,0 @@ resolve()

@@ -209,6 +209,13 @@ const { onceWithCleanup } = require('../promise_utils')

function awaitMessage (...args) {
const timeout = typeof args[args.length - 1] === 'number' ? args.pop() : 20000
return new Promise((resolve, reject) => {
const resolveMessages = args.flatMap(x => x)
const timeoutHandle = setTimeout(() => {
bot.off('messagestr', messageListener)
reject(new Error(`Timeout waiting for message after ${timeout}ms`))
}, timeout)
function messageListener (msg) {
if (resolveMessages.some(x => x instanceof RegExp ? x.test(msg) : msg === x)) {
clearTimeout(timeoutHandle)
resolve(msg)

@@ -215,0 +222,0 @@ bot.off('messagestr', messageListener)

@@ -430,6 +430,13 @@ const { Vec3 } = require('vec3')

if (ticks <= 0) return
await new Promise(resolve => {
await new Promise((resolve, reject) => {
// Assuming 20 ticks per second, add extra time for lag
const timeout = setTimeout(() => {
bot.removeListener('physicsTick', tickListener)
reject(new Error(`Timeout waiting for ${ticks} ticks after ${(ticks * 50 + 5000)}ms`))
}, ticks * 50 + 5000) // 50ms per tick + 5s buffer
const tickListener = () => {
ticks--
if (ticks === 0) {
clearTimeout(timeout)
bot.removeListener('physicsTick', tickListener)

@@ -436,0 +443,0 @@ resolve()

@@ -1,2 +0,2 @@

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', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9']
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', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.11']
module.exports = {

@@ -3,0 +3,0 @@

{
"name": "mineflayer",
"version": "4.34.0",
"version": "4.35.0",
"description": "create minecraft bots with a stable, high level API",

@@ -25,3 +25,3 @@ "main": "index.js",

"minecraft-data": "^3.98.0",
"minecraft-protocol": "^1.63.0",
"minecraft-protocol": "^1.64.0",
"prismarine-biome": "^1.1.1",

@@ -28,0 +28,0 @@ "prismarine-block": "^1.22.0",

@@ -20,3 +20,3 @@ # Mineflayer

* Supports Minecraft 1.8 to 1.21.9 (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, 1.21, 1.21.9) <!--version-->
* Supports Minecraft 1.8 to 1.21.11 (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, 1.21, 1.21.9, 1.21.11) <!--version-->
* Entity knowledge and tracking.

@@ -23,0 +23,0 @@ * Block knowledge. You can query the world around you. Milliseconds to find any block.