PrismarineJS / mineflayer

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

Bot reaches max walking speed too fast? #3283

Open ghost opened 9 months ago

ghost commented 9 months ago

Versions

Detailed description of a problem

I am hosting a 1.8.9 server, when I (vanilla client) connect and walk around with and without sprinting it is completely fine, however when I connect a mineflayer bot and set it to just walk forward it flags all the speed checks, this has led me to believe that the bot must be walking too fast but please correct me if it is just something that I've overlooked or am missing.

When connecting the bot without an anti-cheat and walking next to it, it does appear that it moves slightly faster than I do in vanilla.

What did you try yet?

I had tried to modify the bot physics in an attempt to slow the walking speed down but despite changing all values, the bot kept walking at the same speed.

Your current code

const mineflayer = require('mineflayer');

function createBot () {
    var bot = mineflayer.createBot({
        username: "Walker",
        host: '127.0.0.1',
        port: 25565,
        version: '1.8.9'
    });

    bot.once('login', async () => {
        console.log('[Debug] Logged in!');

        await bot.waitForTicks(30);

        bot.setControlState('forward', true);

    });
}

createBot();

Additional context

Anti-Cheat in use: https://github.com/Tecnio/AntiHaxerman even if this is considered to be a bad anti cheat the fact that the speed check doesn't flag a non-op, survival player on the vanilla client but does flag a mineflayer bot should be cause for concern

ghost commented 9 months ago

The only way I can replicate this within the vanilla client is if I go straight to the maximum walking speed without first accelerating