Skip to content

Commit

Permalink
Merge pull request #7 from PrismarineJS/mc17
Browse files Browse the repository at this point in the history
[WIP] Forge 1.7.10 support
  • Loading branch information
deathcap committed Feb 20, 2016
2 parents de7aa71 + 24d972e commit b8eda1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/client/forgeHandshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ proto.addType('FML|HS',
"type": "bool"
},

/* TODO: support all fields
/* TODO: support all fields http://wiki.vg/Minecraft_Forge_Handshake#RegistryData
* TODO: but also consider http://wiki.vg/Minecraft_Forge_Handshake#ModIdData
* and https://github.com/ORelio/Minecraft-Console-Client/pull/100/files#diff-65b97c02a9736311374109e22d30ca9cR297
{
"name": "registryName",
"type": "string"
Expand Down Expand Up @@ -230,8 +232,9 @@ function fmlHandshakeStep(client, data, options)
{
assert.ok(parsed.data.discriminator === 'RegistryData', `expected RegistryData in WAITINGSERVERCOMPLETE, got ${parsed.data.discriminator}`);
debug('RegistryData',parsed.data);
// TODO: support <=1.7.10 single registry, https://github.com/ORelio/Minecraft-Console-Client/pull/100/files#diff-65b97c02a9736311374109e22d30ca9cR297
if (parsed.data.hasMore === false) {
console.log('RegistryData',parsed);
if (client.version === '1.7.10' // actually ModIdData packet, and there is only one of those TODO: avoid hardcoding version, allow earlier
|| parsed.data.hasMore === false) { // RegistryData packet 1.8+ hasMore boolean field, set to false when ready to ack
debug('LAST RegistryData');

writeAck(client, FMLHandshakeClientState.WAITINGSERVERCOMPLETE);
Expand Down

0 comments on commit b8eda1a

Please sign in to comment.