Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in oxygenLevel #3532

Open
1 task done
rawnullbyte opened this issue Dec 27, 2024 · 0 comments
Open
1 task done

error in oxygenLevel #3532

rawnullbyte opened this issue Dec 27, 2024 · 0 comments
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@rawnullbyte
Copy link

rawnullbyte commented Dec 27, 2024

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.23.0
  • server: vanilla/spigot/paper 1.20.1 (Geyser plugin)
  • node: 18.19.1

Detailed description of a problem

When bot enters the world he gets following error:

        bot.oxygenLevel = Math.round(packet.metadata[1].value / 15)
                                                        ^

TypeError: Cannot read properties of undefined (reading 'value')
    at Client.<anonymous> (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/mineflayer/lib/plugins/breath.js:14:57)
    at Client.emit (node:events:529:35)
    at emitPacket (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/minecraft-protocol/src/client.js:83:12)
    at FullPacketParser.<anonymous> (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/minecraft-protocol/src/client.js:112:9)
    at FullPacketParser.emit (node:events:517:28)
    at addChunk (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/readable-stream/lib/internal/streams/readable.js:321:12)
    at readableAddChunk (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/readable-stream/lib/internal/streams/readable.js:298:9)
    at Readable.push (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/readable-stream/lib/internal/streams/readable.js:244:10)
    at FullPacketParser._transform (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/protodef/src/serializer.js:89:10)
    at Transform._write (/opt/mcsmanager/daemon/data/InstanceData/4dcd1dba2af4450d9bcd464d9f97ca97/node_modules/readable-stream/lib/internal/streams/transform.js:153:8)

Node.js v18.19.1

What did you try yet?

Did you try any method from the API? No
Did you try any example? Any error from those? No

Your current code

Not needed as the error is on mineflayers side

Expected behavior

It to work (I wasnt even calling anything to oxygen related)

@rawnullbyte rawnullbyte added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

1 participant