From e28608f86e4e529671fca99eb05cef7af9dbef9f Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Mon, 11 Nov 2024 18:04:54 +0300 Subject: [PATCH] also cache manifest.json into offline --- scripts/build.js | 1 + src/index.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build.js b/scripts/build.js index 9b8a85a55..d3703eea2 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -52,6 +52,7 @@ exports.getSwAdditionalEntries = () => { '*.png', '*.woff', 'mesher.js', + 'manifest.json', 'worldSaveWorker.js', `textures/entity/squid/squid.png`, // everything but not .map diff --git a/src/index.ts b/src/index.ts index 184db177c..5bd29e149 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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()