@pilaf/backends 1.2.2 → 1.3.1

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.
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  const mineflayer = require('mineflayer');
7
+ const pathfinder = require('mineflayer-pathfinder');
7
8
  const { PilafBackend } = require('./backend.js');
8
9
  const { BotPool } = require('./BotPool.js');
9
10
  const { BotLifecycleManager } = require('./BotLifecycleManager.js');
@@ -171,7 +172,12 @@ class MineflayerBackend extends PilafBackend {
171
172
 
172
173
  // Create and spawn bot using lifecycle manager
173
174
  const { bot } = await BotLifecycleManager.createAndSpawnBot(
174
- () => mineflayer.createBot(botConfig),
175
+ () => {
176
+ const botInstance = mineflayer.createBot(botConfig);
177
+ // Load pathfinder plugin for navigation support
178
+ botInstance.loadPlugin(pathfinder.pathfinder);
179
+ return botInstance;
180
+ },
175
181
  botConfig
176
182
  );
177
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pilaf/backends",
3
- "version": "1.2.2",
3
+ "version": "1.3.1",
4
4
  "main": "lib/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "dockerode": "^4.0.0",
23
- "mineflayer": "^4.20.1",
23
+ "mineflayer": "^4.34.0",
24
+ "mineflayer-pathfinder": "^2.4.5",
24
25
  "rcon-client": "^4.2.5"
25
26
  },
26
27
  "scripts": {