diff --git a/src/client/data/fml3.json b/src/client/data/fml3.json index c3f8faa..c347020 100644 --- a/src/client/data/fml3.json +++ b/src/client/data/fml3.json @@ -133,7 +133,6 @@ "4": "ConfigurationData", "5": "ModData", "6": "ChannelMismatchData", - "98": "Quark", "99": "Acknowledgement" } } @@ -373,7 +372,6 @@ } ] ], - "Quark": "void", "Acknowledgement": "void" } } diff --git a/src/client/forgeHandshake2.js b/src/client/forgeHandshake2.js index f013c8e..6c3bad2 100644 --- a/src/client/forgeHandshake2.js +++ b/src/client/forgeHandshake2.js @@ -217,11 +217,15 @@ module.exports = function (client, options) { } default: - console.log( - 'other loginwrapperchannel', - loginwrapper.channel, - 'received' - ) + try { + console.log('other loginwrapperchannel', loginwrapper.channel, 'received, sending acknowledgement packet') + const AcknowledgementPacket = proto.createPacketBuffer(PROTODEF_TYPES.HANDSHAKE, { discriminator: 'Acknowledgement' }) + const loginWrapperPacket = proto.createPacketBuffer(PROTODEF_TYPES.LOGINWRAPPER, { channel: FML_CHANNELS.HANDSHAKE, data: AcknowledgementPacket }) + client.write('login_plugin_response', { messageId: data.messageId, data: loginWrapperPacket }) + break + } catch (error) { + console.error(error) + } break } } else { diff --git a/src/client/forgeHandshake3.js b/src/client/forgeHandshake3.js index e98da83..c8ae4ba 100644 --- a/src/client/forgeHandshake3.js +++ b/src/client/forgeHandshake3.js @@ -246,43 +246,16 @@ module.exports = function (client, options) { break } - case 'quark:main': { - const { data: quarkHandshake } = proto.parsePacketBuffer( - PROTODEF_TYPES.HANDSHAKE, - loginwrapper.data - ) - - let quarkLoginwrapperpacket = Buffer.alloc(0) - switch (quarkHandshake.discriminator) { - // respond with Ack - case 'Quark': { - quarkLoginwrapperpacket = proto.createPacketBuffer( - PROTODEF_TYPES.LOGINWRAPPER, - { - channel: FML_CHANNELS.HANDSHAKE, - data: proto.createPacketBuffer(PROTODEF_TYPES.HANDSHAKE, { - discriminator: 'Acknowledgement', - data: {} - }) - } - ) - break - } - } - - client.write('login_plugin_response', { - messageId: data.messageId, - data: quarkLoginwrapperpacket - }) - break - } - default: - console.log( - 'other loginwrapperchannel', - loginwrapper.channel, - 'received' - ) + try { + console.log('other loginwrapperchannel', loginwrapper.channel, 'received, sending acknowledgement packet') + const AcknowledgementPacket = proto.createPacketBuffer(PROTODEF_TYPES.HANDSHAKE, { discriminator: 'Acknowledgement' }) + const loginWrapperPacket = proto.createPacketBuffer(PROTODEF_TYPES.LOGINWRAPPER, { channel: FML_CHANNELS.HANDSHAKE, data: AcknowledgementPacket }) + client.write('login_plugin_response', { messageId: data.messageId, data: loginWrapperPacket }) + break + } catch (error) { + console.error(error) + } break } } else {