mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-17 12:45:39 +02:00
18 lines
307 B
JavaScript
18 lines
307 B
JavaScript
![]() |
export class NPCData {
|
||
|
constructor() {
|
||
|
this.goals = [];
|
||
|
}
|
||
|
|
||
|
toObject() {
|
||
|
return {
|
||
|
goals: this.goals
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static fromObject(obj) {
|
||
|
if (!obj) return null;
|
||
|
let npc = new NPCData();
|
||
|
npc.goals = obj.goals;
|
||
|
return npc;
|
||
|
}
|
||
|
}
|