forked from mirror/ObjToSchematic
Fixed atlas loading
This commit is contained in:
parent
9b0697009a
commit
9ac2e19909
@ -27,13 +27,12 @@ export class BlockAtlas {
|
||||
this._cachedBlocks = new HashMap(1024);
|
||||
|
||||
const _path = path.join(__dirname, "../resources/blocks.json");
|
||||
console.log(_path);
|
||||
const blocksString = fs.readFileSync(_path, "utf-8");
|
||||
if (!blocksString) {
|
||||
throw Error("Could not load blocks.json")
|
||||
}
|
||||
|
||||
const blocksJSON = JSON.parse(blocksString);
|
||||
const blocksJSON = JSON.parse(blocksString).blocks;
|
||||
this._blocks = blocksJSON;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user