PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.92k stars 904 forks source link

Transaction Packet Response #2189

Closed Greenlio closed 2 years ago

Greenlio commented 3 years ago

Is your feature request related to a problem? Please describe.

Well, when trying to use on some servers, their anticheat detects the bot and kicks for 'not responding to transaction packets'. It's frustrating. I've talked to these server owners too, one of the anticheats that I know does is Vulcan, and it simply kicks after 30~ seconds for "Not Responding to Transaction Packets (numbers)ms.". It's nothing they can fix, so I was wondering if you guys could.

Describe the solution you'd like

I would like a fix to be made, if possible, if not, that is perfectly fine, and I understand it's a limitation, as this is a feature request.

Describe alternatives you've considered

Oh, at first I thought it was some issue keepAlive, but that's already been considered and fixed. I've tried moving around, sending chat, etc. So, it's not something depending on movement of the player. Yeah. That's about it.

Additional context

N/A

Greenlio commented 3 years ago

heck, it fixed itself i dont know how.

Greenlio commented 3 years ago

nvm, it only fixes with using minecraft-protocol instead of mineflayer. weird.

ghaph commented 3 years ago

Hey, I had the same issue with vulcan and I spent some time looking into the code. This behaves exactly like the 1.8.9 client does, I'm sure it would be the same throughout all versions until 1.17 because they removed the packet i think.

bot._client.on("transaction", (packet) => {
     if (!packet.accepted && (packet.windowId == 0 || packet.windowId == bot.currentWindow.windowId)) {
        bot._client.write('transaction', {windowId: packet.windowId, action: packet.action, accepted: true});
    }
});
Greenlio commented 3 years ago

Interesting, thanks. I'll try when I get home.

U5B commented 3 years ago
bot._client.on('ping', (data) => {
  bot._client.write('pong', {
    id: data.id
  })
})

This is for 1.17.1 Vulcan servers. They use this instead in 1.17. Don't know where this would go to mimic the vanilla client. EDIT: put it in game.js as U9G suggested

Greenlio commented 2 years ago

i see no recognizable progress on this issue and has been inactive for 2+ months. closing ticket, have a great night everyone.

extremeheat commented 2 years ago

If an issue is still valid there is no need to close it. There’s information here missing that makes it harder for a fix:

Can anyone else confirm it’s still a problem and the versions? @U5B @Greenlio

U5B commented 2 years ago

If an issue is still valid there is no need to close it. There’s information here missing that makes it harder for a fix:

  • what version are you running on?
  • Where to download the anti cheat or where to join to test it?
  • Steps to reproduce

Version: any Server: Hypixel Join Hypixel and see if the bot gets sent to limbo after a minute.

PR 2217 fixes this issue, however it has not been merged and has not seen activity recently

grszik commented 1 year ago

i got same problem but its server side problem: if server antycheat is vulcan and its wrong cofigured when somebody join on cracked they got message they cant join because this nick is on server, but then vulcan trigger on this ip and this ip isnt on server so it cant respond on packet