PrismarineJS / node-minecraft-protocol

Parse and serialize minecraft packets, plus authentication and encryption.
https://prismarinejs.github.io/node-minecraft-protocol/
BSD 3-Clause "New" or "Revised" License
1.24k stars 239 forks source link

Proxy will just show the skin for other players and in the tablist, and not for myself #821

Open Tuxorials opened 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

MrZillaGold commented 3 years ago

https://github.com/PrismarineJS/node-minecraft-protocol/issues/454