Replies: 1 comment
-
new script: the issue didnt fix from javascript import require, On toggle = True mineflayer = require('mineflayer') bot.loadPlugin(pathfinder.pathfinder) @on(bot,'spawn')
|
Beta Was this translation helpful? Give feedback.
-
I made a bot that registers jump in to a portal and teleports to a dungeon then kills monsters
it crashes after some time + the bot only targets if an entity is very close
[JSE]
C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\javascript\js\pyi.js:150
[JSE] throw new BridgeException(
Attempt to access '${stack.join('.')}' failed.
)[JSE] ^
[JSE]
[JSE] BridgeException [Error]: Attempt to access '' failed. Python didn't respond in time (100000ms), look above for any Python errors. If no errors, the API call hung.
[JSE] at C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\javascript\js\pyi.js:150:13
[JSE] at waitFor (C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\javascript\js\pyi.js:47:26)
[JSE] at runNextTicks (node:internal/process/task_queues:60:5)
[JSE] at listOnTimeout (node:internal/timers:538:9)
[JSE] at process.processTimers (node:internal/timers:512:7)
[JSE] at async PyBridge.call (C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\javascript\js\pyi.js:149:18)
[JSE]
[JSE] Node.js v18.17.1
** The Node process has crashed. Please restart the runtime to use JS APIs. **
Timed out get 18 nearestEntity None
Current code:
from javascript import require, On
import time
toggle = True
chattoggle = True
mineflayer = require('mineflayer')
AutoAuth = require('mineflayer-auto-auth')
pathfinder = require('mineflayer-pathfinder')
GoalFollow = pathfinder.goals.GoalFollow
GoalBlock = pathfinder.goals.GoalBlock
pvp = require('mineflayer-pvp')
bot = mineflayer.createBot({
'plugins':'AutoAuth',
'AutoAuth':'*******',
'host':'CegouCraft.su',
'username':'PersikWhta',
'version':'1.18.2'
})
bot.loadPlugin(pathfinder.pathfinder)
bot.loadPlugin(pvp.plugin)
myGoal = GoalBlock(4,62,-41)
a
@on(bot,'spawn')
def spawn( *args):
def guard():
while True:
time.sleep(1)
entity = bot.nearestEntity()
Beta Was this translation helpful? Give feedback.
All reactions