PrismarineJS / node-minecraft-protocol-forge

Plugin to add FML/Forge client support (including auto-versioning) to node-minecraft-protocol
54 stars 18 forks source link

Parse all fields of the RegistryData (1.8+) or ModIdData (1.7-) packets #2

Open deathcap opened 8 years ago

deathcap commented 8 years ago
              "RegistryData":
              [
                "container",
                [
                  {
                    "name": "hasMore",
                    "type": "bool"
                  },

                  /* TODO: support all fields
                  {
                    "name": "registryName",
                    "type": "string"
                  },
                  */
                ],
              ],

RegistryData is only parsed for the hasMore bool, to know when the last packet was received. http://wiki.vg/Minecraft_Forge_Handshake#RegistryData documents the full structure. Includes registry name, string to id mapping, and array of substitutions. Should parse this because it might be useful for client applications.

deathcap commented 8 years ago

1.8 RegistryData is ModIdData in 1.7, both discriminator byte 3, but slightly different structure (and only one ModIdData, but several RegistryData): see https://github.com/PrismarineJS/node-minecraft-protocol-forge/issues/3