mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 13:45:37 -04:00
FML|HS ModList packet array
This commit is contained in:
parent
cb9e6db991
commit
459da049c1
@ -97,13 +97,31 @@ proto.addType('FML|HS',
|
|||||||
|
|
||||||
// ModList
|
// ModList
|
||||||
{
|
{
|
||||||
"name": "numberOfMods",
|
"name": "mods",
|
||||||
"type": [
|
"type": [
|
||||||
"switch",
|
"switch",
|
||||||
{
|
{
|
||||||
"compareTo": "discriminator",
|
"compareTo": "discriminator",
|
||||||
"fields": {
|
"fields": {
|
||||||
"2": "varint"
|
"2": [
|
||||||
|
"array",
|
||||||
|
{
|
||||||
|
"countType": "varint",
|
||||||
|
"type": [
|
||||||
|
"container",
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "version",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
"default": "void"
|
"default": "void"
|
||||||
}
|
}
|
||||||
@ -150,8 +168,14 @@ client.on('custom_payload', function(packet) {
|
|||||||
|
|
||||||
var modList = proto.createPacketBuffer('FML|HS', {
|
var modList = proto.createPacketBuffer('FML|HS', {
|
||||||
discriminator: 2, // ModList
|
discriminator: 2, // ModList
|
||||||
numberOfMods: 0,
|
mods: []
|
||||||
// TODO: send some mods
|
// TODO: send some mods
|
||||||
|
// TODO: fix Error: SizeOf error for mods.2.0.name : missing data type: string
|
||||||
|
/*
|
||||||
|
mods: [
|
||||||
|
{name:'IronChest', version:'6.0.121.768'}
|
||||||
|
]
|
||||||
|
*/
|
||||||
});
|
});
|
||||||
client.write('custom_payload', {
|
client.write('custom_payload', {
|
||||||
channel: 'FML|HS',
|
channel: 'FML|HS',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user