Verify and restore the complete Minecraft asset cache
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 8m10s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 8m10s
This commit is contained in:
@@ -23,6 +23,8 @@ const files = {
|
||||
"textures/block/dirt.png": png,
|
||||
"textures/block/stone.png": png,
|
||||
"textures/block/water_still.png": png,
|
||||
"textures/block/newer_fixture.png": png,
|
||||
"textures/entity/newer_fixture.png": png,
|
||||
"textures/block/water_still.png.mcmeta": Buffer.from(
|
||||
'{"animation":{"frametime":2}}',
|
||||
),
|
||||
@@ -145,6 +147,17 @@ test("a complete marker with a missing texture is repaired from the verified cac
|
||||
assert.equal(requests.filter((url) => url.endsWith("client.jar")).length, 0);
|
||||
});
|
||||
|
||||
test("missing non-core 26.2 textures are restored from the verified client", async (t) => {
|
||||
const requests = await isolatedCache(t, false, "26.2");
|
||||
const directory = await prepareAssets("26.2");
|
||||
const path = `${directory}/assets/minecraft/textures/block/newer_fixture.png`;
|
||||
await rm(path);
|
||||
requests.length = 0;
|
||||
await prepareAssets("26.2");
|
||||
assert.deepEqual(await readFile(path), png);
|
||||
assert.equal(requests.filter((url) => url.endsWith("client.jar")).length, 0);
|
||||
});
|
||||
|
||||
test("a corrupted cached client is downloaded again", async (t) => {
|
||||
const requests = await isolatedCache(t);
|
||||
await mkdir(".cache/minecraft", { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user