mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 13:01:14 -05:00
Add tagHost option, clients can use to append to set_protocol serverHost
This is used by Forge clients to tell the server they support FML|HS, otherwise the server will kick with "you must have FML/Forge installed".
This commit is contained in:
parent
92b6c3778b
commit
93c5c7315a
2 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ mc.ping({host, port}, function(err, response) {
|
||||||
console.log('Using forgeMods:',forgeMods);
|
console.log('Using forgeMods:',forgeMods);
|
||||||
|
|
||||||
var client = mc.createClient({
|
var client = mc.createClient({
|
||||||
|
tagHost: '\0FML\0', // signifies client supports FML/Forge
|
||||||
forge: true,
|
forge: true,
|
||||||
forgeMods: forgeMods,
|
forgeMods: forgeMods,
|
||||||
// Client/server mods installed on the client
|
// Client/server mods installed on the client
|
||||||
|
|
|
@ -102,7 +102,7 @@ function createClient(options) {
|
||||||
|
|
||||||
function onConnect() {
|
function onConnect() {
|
||||||
var taggedHost = host;
|
var taggedHost = host;
|
||||||
if (options.forge) taggedHost += '\0FML\0';
|
if (options.tagHost) taggedHost += options.tagHost;
|
||||||
|
|
||||||
client.write('set_protocol', {
|
client.write('set_protocol', {
|
||||||
protocolVersion: version.version,
|
protocolVersion: version.version,
|
||||||
|
|
Loading…
Reference in a new issue