mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 21:11:04 -05:00
Append \0\FML\0 to hostname in set_protocol packet if Forge enabled
http://wiki.vg/User:Pokechu22/Forge#Connection_to_a_forge_server
This commit is contained in:
parent
609c4466f7
commit
6e50863eaa
1 changed files with 4 additions and 1 deletions
|
@ -90,9 +90,12 @@ function createClient(options) {
|
|||
return client;
|
||||
|
||||
function onConnect() {
|
||||
var taggedHost = host;
|
||||
if (options.forge) taggedHost += '\0FML\0';
|
||||
|
||||
client.write('set_protocol', {
|
||||
protocolVersion: version.version,
|
||||
serverHost: host,
|
||||
serverHost: taggedHost,
|
||||
serverPort: port,
|
||||
nextState: 2
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue