PrismarineJS / node-minecraft-protocol-forge

Plugin to add FML/Forge client support (including auto-versioning) to node-minecraft-protocol
51 stars 19 forks source link

Disconnecting VANILLA connection attempt... #14

Open samdev-7 opened 4 years ago

samdev-7 commented 4 years ago

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

brooswit commented 3 years ago

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 commented 3 years ago

Additional info, I'm running forge 1.15.2 31.2.46

brooswit commented 3 years ago

@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!

deathcap commented 3 years ago
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

etiaro commented 3 years ago
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?

ajh123 commented 8 months ago

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.

MistakingManx commented 3 months ago

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