Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/client/autoVersionForge.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ const forgeHandshake = require('./forgeHandshake')
const forgeHandshake2 = require('./forgeHandshake2')
const forgeHandshake3 = require('./forgeHandshake3')

module.exports = function (client, options) {
module.exports = function (client, autoVersionOptions) {
if (!client.autoVersionHooks) client.autoVersionHooks = []

client.autoVersionHooks.push(function (response, client, options) {
if (!response.modinfo || response.modinfo.type !== 'FML') {
return // not ours
}

// Use the list of Forge mods from the server ping, so client will match server
const forgeMods = response.modinfo.modList
// If forgeMods not specified, reflect the mods from the server ping to match.
const forgeMods = autoVersionOptions.forgeMods || response.modinfo.modList
console.log('Using forgeMods:', forgeMods)

// Install the FML|HS plugin with the given mods
Expand All @@ -25,8 +25,8 @@ module.exports = function (client, options) {
return // not ours
}

// Use the list of Forge mods from the server ping, so client will match server
const forgeMods = response.forgeData.mods
// If forgeMods not specified, reflect the mods from the server ping to match.
const forgeMods = autoVersionOptions.forgeMods || response.forgeData.mods
console.log('Using forgeMods:', forgeMods)

// Install the FML2 plugin with the given mods
Expand All @@ -38,8 +38,8 @@ module.exports = function (client, options) {
return // not ours
}

// Use the list of Forge mods from the server ping, so client will match server
const forgeMods = response.forgeData.mods
// If forgeMods not specified, reflect the mods from the server ping to match.
const forgeMods = autoVersionOptions.forgeMods || response.forgeData.mods
console.log('Using forgeMods:', forgeMods)

// Install the FML3 plugin with the given mods
Expand Down
Loading