mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52: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,14 +39,14 @@ export class NPCContoller {
|
|||
}
|
||||
|
||||
init() {
|
||||
for (let file of readdirSync('src/agent/npc/construction')) {
|
||||
if (file.endsWith('.json')) {
|
||||
try {
|
||||
try {
|
||||
for (let file of readdirSync('src/agent/npc/construction')) {
|
||||
if (file.endsWith('.json')) {
|
||||
this.constructions[file.slice(0, -5)] = JSON.parse(readFileSync('src/agent/npc/construction/' + file, 'utf8'));
|
||||
} catch (e) {
|
||||
console.log('Error reading construction file: ', file);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error reading construction file: ', file);
|
||||
}
|
||||
|
||||
for (let name in this.constructions) {
|
||||
|
|
Loading…
Add table
Reference in a new issue