From 4ba9d367d4b6e238623c5488578231f54f95cfd6 Mon Sep 17 00:00:00 2001 From: Lucas Dower Date: Thu, 31 Mar 2022 21:26:13 +0100 Subject: [PATCH] Fix pathing for atlas script --- tools/build-atlas.ts | 2 +- tools/misc.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build-atlas.ts b/tools/build-atlas.ts index 10e3ff0..a03efce 100644 --- a/tools/build-atlas.ts +++ b/tools/build-atlas.ts @@ -137,7 +137,7 @@ async function buildAtlas() { logBreak(); log(LogStyle.Info, 'Checking assets are provided...'); - const texturesDirSetup = isDirSetup('./models', 'assets/minecraft/textures/block'); + const texturesDirSetup = isDirSetup('./blocks', 'assets/minecraft/textures/block'); ASSERT(texturesDirSetup, '/blocks is not setup correctly'); log(LogStyle.Success, '/tools/blocks/ setup correctly'); diff --git a/tools/misc.ts b/tools/misc.ts index 479e2d6..486a6b1 100644 --- a/tools/misc.ts +++ b/tools/misc.ts @@ -1,5 +1,5 @@ import { log, LogStyle } from './logging'; -import { RGB } from '../src/util'; +import { RGB, TOOLS_DIR } from '../src/util'; import fs from 'fs'; import path from 'path'; @@ -14,7 +14,7 @@ export const ASSERT = (condition: boolean, onFailMessage: string) => { }; export function isDirSetup(relativePath: string, jarAssetDir: string) { - const dir = path.join(__dirname, relativePath); + const dir = path.join(TOOLS_DIR, relativePath); if (fs.existsSync(dir)) { if (fs.readdirSync(dir).length > 0) { return true;