mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 13:14:41 -04:00
autoVersion plugin: add hooks to allow Forge/FML to extend this plugin
This commit is contained in:
parent
cc73c2de24
commit
dc9768eaf5
@ -36,15 +36,13 @@ module.exports = function(client, options) {
|
||||
client.version = versionInfo.majorVersion;
|
||||
client.state = states.HANDSHAKING;
|
||||
|
||||
if (response.modinfo && response.modinfo.type === 'FML') {
|
||||
// Use the list of Forge mods from the server ping, so client will match server
|
||||
const forgeMods = response.modinfo.modList;
|
||||
debug('Using forgeMods:',forgeMods);
|
||||
// TODO: https://github.com/PrismarineJS/node-minecraft-protocol/issues/114
|
||||
// https://github.com/PrismarineJS/node-minecraft-protocol/pull/326
|
||||
// TODO: modify client object to set forgeMods and enable forgeHandshake
|
||||
throw new Error('FML/Forge not yet supported');
|
||||
// Let other plugins such as Forge/FML (modinfo) respond to the ping response
|
||||
if (client.autoVersionHooks) {
|
||||
client.autoVersionHooks.forEach((hook) => {
|
||||
hook(response, client, options);
|
||||
});
|
||||
}
|
||||
|
||||
// Finished configuring client object, let connection proceed
|
||||
client.emit('connect_allowed');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user