Skip to content

Commit f1618c5

Browse files
committed
Fixed mod loading
1 parent 4455f7d commit f1618c5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplelauncher",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"description": "Launcher for SimpleClient",
55
"main": "src/main.js",
66
"scripts": {

src/minecraft.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ const launch = async (version, account, statusCallback) => {
112112
launcher_version: env.npm_package_version,
113113
classpath: classpath
114114
}
115+
const modsDir = join(getDirectory(), 'versions', version.id, 'mods')
115116
var jvmArguments = [
116117
`-Xmx${memory}M`,
117118
'-Dlog4j2.formatMsgNoLookups=true',
118-
'-Dfabric.addMods=' + readdirSync(join(dir, 'mods')).map(mod => join(dir, 'mods', mod)).join(separator)
119+
'-Dfabric.addMods=' + readdirSync(modsDir).map(mod => join(modsDir, mod)).join(separator)
119120
]
121+
console.log(jvmArguments)
120122
meta.arguments.jvm.filter(arg => !arg.rules || arg.rules.every(checkRule)).forEach(arg => {
121123
if (arg.value) {
122124
if (Array.isArray(arg.value)) for (value of arg.value) jvmArguments.push(value)

0 commit comments

Comments
 (0)