mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-22 06:02:07 +02:00
npc path error
This commit is contained in:
parent
25f69a9c1c
commit
ce983df59c
1 changed files with 5 additions and 5 deletions
|
@ -39,15 +39,15 @@ export class NPCContoller {
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
try {
|
||||||
for (let file of readdirSync('src/agent/npc/construction')) {
|
for (let file of readdirSync('src/agent/npc/construction')) {
|
||||||
if (file.endsWith('.json')) {
|
if (file.endsWith('.json')) {
|
||||||
try {
|
|
||||||
this.constructions[file.slice(0, -5)] = JSON.parse(readFileSync('src/agent/npc/construction/' + file, 'utf8'));
|
this.constructions[file.slice(0, -5)] = JSON.parse(readFileSync('src/agent/npc/construction/' + file, 'utf8'));
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Error reading construction file: ', file);
|
console.log('Error reading construction file: ', file);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let name in this.constructions) {
|
for (let name in this.constructions) {
|
||||||
let sizez = this.constructions[name].blocks[0].length;
|
let sizez = this.constructions[name].blocks[0].length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue