PrismarineJS / node-minecraft-protocol-forge

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

- #16

Closed Tuxorials closed 3 years ago

Tuxorials commented 3 years ago

So, i was coding a proxy, that allows you to join a server (e.g.: Hypixel) with another account, without having to relaunch the game. But, if i join the proxy, i get connected to the target server, but, for me, i don't have a skin. Other players can see me just fine, but i myself can't. Is this even possible? Here is my code, if that helps:

var mc = require( 'minecraft-protocol');
var server = mc.createServer({
    'keepAlive': false,
    'max-players': 1,
    'motd': 'Proxy-Test',
    'version': '1.8.8',
    'online-mode': true,
    'port': '25576'
});

server.on('login', client => {
        const remote = mc.createClient({
            keepAlive: false,
            host: 'myserver.net',
            port: '25565',
            username: "obviouslynotareal@email.com",
            password: "password!",
            version: '1.8.8'
        });

        [remote, client].forEach((value, index, array) => {
            const opposite = array[index === 0 ? 1 : 0];
            value
                .on('end', () => opposite.end('Disconnected'))
                .on('raw', (buffer, metadata) => {
                    if (metadata.state === 'play') opposite.writeRaw(buffer);
                });
        });

        }
    });
console.log('Started proxy on port '+server.port);

Any help is appreciated! I just can't figure this out for my life.

Kind regards, Tuxorials