also cache manifest.json into offline

This commit is contained in:
Vitaly Turovsky 2024-11-11 18:04:54 +03:00
commit e28608f86e
2 changed files with 4 additions and 1 deletions

View file

@ -52,6 +52,7 @@ exports.getSwAdditionalEntries = () => {
'*.png',
'*.woff',
'mesher.js',
'manifest.json',
'worldSaveWorker.js',
`textures/entity/squid/squid.png`,
// everything but not .map

View file

@ -402,7 +402,9 @@ async function connect (connectOptions: ConnectOptions) {
setLoadingScreenStatus(`Loading data for ${version}`)
if (!document.fonts.check('1em mojangles')) {
// todo instead re-render signs on load
await document.fonts.load('1em mojangles').catch(() => { })
await document.fonts.load('1em mojangles').catch(() => {
console.error('Failed to load font, signs wont be rendered correctly')
})
}
await window._MC_DATA_RESOLVER.promise // ensure data is loaded
await downloadSoundsIfNeeded()