deathcap / wsmc

WebSocket proxy to Minecraft
33 stars 10 forks source link

Forge mods auto-detection (forgeAutoVersion) proxying #40

Closed deathcap closed 8 years ago

deathcap commented 8 years ago

https://github.com/PrismarineJS/node-minecraft-protocol-forge adds forgeAutoVersion, but it plugs into autoVersion which sends a 0xfe legacy ping to get the mod list - may need to proxy this through wsmc (or at least abstract it away)

deathcap commented 8 years ago

wsmc.js supports this through autoVersionForge, but wsmc.jar does not yet handle anything with Forge.

Important for Sponge plugin support https://github.com/deathcap/wsmc/issues/7 - since it is most commonly used on Forge-based servers, requiring FML|HS

deathcap commented 8 years ago

Added the pinging, it is only performed once on wsmc startup, and saved for later since presumably mods will not be added/removed while the server is running (or if they are, it's probably reasonable to ask the server admin to restart wsmc).

Next up is the Forge handshake. There are two parts to this: adding the \0FML0 tag, which is trivial, and the FML|HS plugin channel messages, which requires a state machine and various encoding/decoding. ProtoDef serialization (in JavaScript) here: https://github.com/PrismarineJS/node-minecraft-protocol-forge/blob/master/src/client/forgeHandshake.js

Open question: can/should the FML|HS logic occur on the ws client (through nmp-f, which already exists) instead of having to reimplement FML|HS in wsmc/Java on the proxy?