node-minecraft-protocol-forge icon indicating copy to clipboard operation
node-minecraft-protocol-forge copied to clipboard

Disconnecting VANILLA connection attempt...

Open samdev-7 opened this issue 5 years ago • 7 comments

Code in JS is:

const usr = process.env.USERNAME;
const pwd = process.env.PASSWORD;
var mc = require('minecraft-protocol');
var autoVersionForge = require('minecraft-protocol-forge').autoVersionForge;
var client = mc.createClient({
    version: '1.15.2',
    host: 'myserver.ip', 
    port: 37390,
    username: usr,
    password: pwd
});
 
autoVersionForge(client);

The server is forge 1.15.2

Disconnecting VANILLA connection attempt... was in console of server

samdev-7 avatar Aug 15 '20 14:08 samdev-7

I'm getting the same error with the same code (pointed at my server instead)

Has anyone solved this already? I googled but sadly found nothing :(

Is this no longer maintained?

brooswit avatar Nov 19 '20 23:11 brooswit

Additional info, I'm running forge 1.15.2 31.2.46

brooswit avatar Nov 19 '20 23:11 brooswit

@SamL2020 try this

version: false,

IIRC, this needs to be false or the auto config won't work. I'm no expect though. I haven't gotten this working myself, but hopefully this helps!

brooswit avatar Nov 19 '20 23:11 brooswit

version: '1.15.2',

The Forge handshake protocol changed significantly since 1.7 - 1.12, versions 1.13 and later use "FML2 Protocol":

https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29

would need to implement FML2 in node-minecraft-protocol-forge to support this version

deathcap avatar Jan 10 '21 18:01 deathcap

version: '1.15.2',

The Forge handshake protocol changed significantly since 1.7 - 1.12, versions 1.13 and later use "FML2 Protocol":

https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29

would need to implement FML2 in node-minecraft-protocol-forge to support this version

anyone working on that?

etiaro avatar May 27 '21 12:05 etiaro

Same error when connecting to a Forge server behind a Velocity proxy. My bot's code

const autoVersionForge = require('./third-party/node-minecraft-protocol-forge').autoVersionForge;
const mineflayer = require('./third-party/mineflayer')

const bot = mineflayer.createBot({
    host: process.argv[2],
    port: parseInt(process.argv[3]),
    username: process.argv[4],
    password: process.argv[5],
    brand: "forge" // even without this I get the same error
})
autoVersionForge(bot._client)

const welcome = () => {
    bot.chat('/server ForgeCreative') // Connect to the Forge Server
    bot.chat('hi! uiodfshdsfuiodfshidihsdfisdfhisdfiodfshui')
}

bot.once('spawn', () => {
    welcome()
})

bot.on('message', (message, position, sender, verified) => {
    const msg = message.toAnsi()
    if (position == 'chat') {
        let player = null
        for (playerName in bot.players) {
            if (bot.players[playerName].uuid == sender) {
                player = bot.players[playerName]
                break
            }
        }
        console.log(player.username, msg)
    }
    if (position == 'system') {
        console.log(msg)
    }
})


bot.on('kicked', console.log)
bot.on('error', console.log)

Velocity information Version: 3.2.0-SNAPSHOT (git-07a525be-b296) Plugins:

  1. ViaVersion-4.9.2
  2. ViaBackwards-4.9.1
  3. Ambassador-Velocity-1.4.3-beta-all

Forge information Version: 1.20.1-47.2.0 Mods don't matter when using autoVersionForge

The bot is able to connect to none Forge servers behind the same Velocity proxy and real Forge clients can connect to the forge server.

ajh123 avatar Jan 10 '24 17:01 ajh123

I also can't get it to connect to my Forge 1.18.2 server.

MistakingManx avatar May 11 '24 15:05 MistakingManx