Fix pathing for atlas script

This commit is contained in:
Lucas Dower 2022-03-31 21:26:13 +01:00
parent 71a0cf90da
commit 4ba9d367d4
2 changed files with 3 additions and 3 deletions

View File

@ -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');

View File

@ -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;