mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 13:01:14 -05:00
Add a mapper for FML|HS discrminator bytes
This commit is contained in:
parent
30b347cb99
commit
80cc68e480
1 changed files with 17 additions and 1 deletions
|
@ -38,8 +38,24 @@ proto.addType("string", ["pstring", {
|
|||
|
||||
|
||||
// http://wiki.vg/Minecraft_Forge_Handshake
|
||||
proto.addType('fml|hsMapper',
|
||||
[
|
||||
"mapper",
|
||||
{
|
||||
"type": "byte",
|
||||
"mappings": {
|
||||
"0": "ServerHello",
|
||||
"1": "ClientHello",
|
||||
"2": "ModList",
|
||||
"3": "RegistryData",
|
||||
"-1": "HandshakeAck",
|
||||
"-2": "HandshakeReset"
|
||||
},
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
// TODO: refactor to use one big switch like https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/src/transforms/serializer.js#L21
|
||||
// and with a mapper for symbolic names https://github.com/PrismarineJS/prismarine-nbt/blob/master/nbt.json#L48
|
||||
proto.addType('FML|HS',
|
||||
[
|
||||
'container',
|
||||
|
|
Loading…
Reference in a new issue