question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I intercept a velocity packet from the server?

See original GitHub issue

Can I listen for a setVelocity packet from the server?

And check the vector that the server is telling the bot to set its velocity to?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rom1504commented, Nov 12, 2018

You can, and if you manage to get something useful that mineflayer doesn’t currently provide, please pr it in mineflayer code so everybody can use it 😉

On Mon, Nov 12, 2018, 10:24 George notifications@github.com wrote:

Am I allowed to access the bot._client object from my own code? it looks kind of sneaky with that underscore

bot._client.on(‘entity_velocity’, (packet) => { // entity velocity const entity = fetchEntity(packet.entityId) const notchVel = new Vec3(packet.velocityX, packet.velocityY, packet.velocityZ) entity.velocity.update(conv.fromNotchVelocity(notchVel)) })

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/743#issuecomment-437811279, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_nMOA3PD98nOBo-xOv7lTjJIWZMeks5uuT44gaJpZM4YYuxj .

0reactions
nodingneucommented, Nov 12, 2018

Am I allowed to access the bot._client object from my own code? it looks kind of sneaky with that underscore

bot._client.on('entity_velocity', (packet) => {
    // entity velocity
    const entity = fetchEntity(packet.entityId)
    const notchVel = new Vec3(packet.velocityX, packet.velocityY, packet.velocityZ)
    entity.velocity.update(conv.fromNotchVelocity(notchVel))
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Question] Intercept packets using C/C++/JNI
How would I intercept packets received from/sent to the server using JNI? I don't know if using JNI exactly, but using C/C++.
Read more >
man in the middle - Intercept and modify simple TCP session?
Now you run a server on port 1337 that captures all this traffic, sniffs the packets, modifies them and sends them through to...
Read more >
how to intercept and modify HTTP responses on server side?
I had a look at some low-level packet intercepting methods like WinPCap, but it seems to require a lot of work to do...
Read more >
How to Work with Packets using ProtocolLib - Minecraft Plugins
Source code: https://gitlab.com/kody-simpson/spigot/ packets -with-protocollibProtocolLib: https://github.com/dmulloy2/ProtocolLibPacket Docs: ...
Read more >
CN102771086B - The system and method for intercept strategy for ...
If packet meets multiple virtual server Intercept strategy, ... and Cisco AVS serial application speed Degree system (Application Velocity System).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found