Skip to content

Commit 2eb4954

Browse files
committed
⚠️ Fix crash on startup due to missing cache
1 parent bf812d8 commit 2eb4954

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/systems/minecraft/assetManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ export async function checkForAssetsUpdate() {
7979
}
8080
}
8181

82+
const cachedJarFilePath = getCachedJarFilePath()
83+
if (!fs.existsSync(cachedJarFilePath)) {
84+
console.log('No cached Minecraft client found, updating assets...')
85+
await updateAssets()
86+
}
87+
8288
await extractAssets()
8389
console.log('Minecraft assets are up to date!')
8490
requestAnimationFrame(() => events.MINECRAFT_ASSETS_LOADED.dispatch())

0 commit comments

Comments
 (0)