mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -04: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
@ -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…
x
Reference in New Issue
Block a user