mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 04:51:09 -05:00
FML|HS: ModList: send empty client modlist
This commit is contained in:
parent
2787adbad3
commit
cb9e6db991
1 changed files with 27 additions and 1 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue