From cb9e6db991a21439c2125783477454c0adc6f239 Mon Sep 17 00:00:00 2001 From: deathcap Date: Sat, 23 Jan 2016 14:31:03 -0800 Subject: [PATCH] FML|HS: ModList: send empty client modlist --- examples/client_forge/client_forge.js | 28 ++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/examples/client_forge/client_forge.js b/examples/client_forge/client_forge.js index e29fb86..d2b4124 100644 --- a/examples/client_forge/client_forge.js +++ b/examples/client_forge/client_forge.js @@ -93,7 +93,23 @@ proto.addType('FML|HS', "default": "void" } ], - } + }, + + // ModList + { + "name": "numberOfMods", + "type": [ + "switch", + { + "compareTo": "discriminator", + "fields": { + "2": "varint" + }, + "default": "void" + } + // TODO: mods array: modname string, modversion string + ], + }, ] ] ); @@ -131,6 +147,16 @@ client.on('custom_payload', function(packet) { channel: 'FML|HS', data: clientHello }); + + var modList = proto.createPacketBuffer('FML|HS', { + discriminator: 2, // ModList + numberOfMods: 0, + // TODO: send some mods + }); + client.write('custom_payload', { + channel: 'FML|HS', + data: modList + }); } } });