You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
edit: this was me just being stupid tryna access unrendered stuff like 300 blocks away
How can I get a block at a position with mineflayer? Using py, but js is fine; if anyone has solutions; can port that.
pos = Vec3(0,0,0)
block = mcbot.blockAt(pos)
doesn't work sadly:
[JSE] node:internal/process/promises:288
[JSE] triggerUncaughtException(err, true /* fromPromise */);
[JSE] ^
[JSE]
[JSE] [🐍 Python Error JavaScript attempt to call 'some function' in Python failed:
[JSE] > bot.emit('spawn')
[JSE] at Client. (C:\Users\name.pyenv\pyenv-win\versions\3.11.2\Lib\site-packages\javascript\js\node_modules\mineflayer\lib\plugins\health.js:13:11)
[JSE] at Object.onceWrapper (node:events:628:26)
[JSE] at Client.emit (node:events:525:35)
[JSE] at emitPacket (C:\Users\name.pyenv\pyenv-win\versions\3.11.2\Lib\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:83:12)
[JSE] at FullPacketParser. (C:\Users\name.pyenv\pyenv-win\versions\3.11.2\Lib\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:106:9)
[JSE] at FullPacketParser.emit (node:events:513:28)
[JSE] at addChunk (C:\Users\name.pyenv\pyenv-win\versions\3.11.2\Lib\site-packages\javascript\js\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12)
[JSE]
[JSE] ... across the bridge ...
[JSE]
[JSE] > mine_loop(mcbot)
[JSE] at spawn (C:\Users\name\Desktop\Python\proj\main.py:52)
[JSE] > print(block.position)#.name)
[JSE] at mine_loop (C:\Users\name\Desktop\Python\proj\main.py:100)
[JSE] 🌉 AttributeError: 'NoneType' object has no attribute 'position']
[JSE]
[JSE] Node.js v18.16.0
Beta Was this translation helpful? Give feedback.
All reactions