{
  "format_version": "1.21.0",
  "minecraft:entity": {
    "description": {
      "identifier": "npc:config",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "properties": {
        "npc:selections": {
          "client_sync": true,
          "type": "enum",
          "default": "hemasda",
          "values": [
            "hemasda",
            "aunas",
            "alkh",
            "researcher_agent"
            ]
        }
      }
    },
    "component_groups": {
      "researcher_agent": {
        "minecraft:type_family": {
          "family": [
            "researcher_agent",
            "fixer",
            "inanimate",
            "misc"
            ]
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                    },
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "operator": "!=",
                      "value": "book"
                    }
                    ]
                },
                "event": "researcher_agent:dialog1",
                "target": "self"
              },
              "give_item": false,
              "take_item": false,
              "interact_text": "[ INTERACT ]"
            }
            ]
        }
        },
      "alkh": {
        "minecraft:type_family": {
          "family": [
            "alkh",
            "inanimate",
            "misc"
            ]
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                    },
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "operator": "!=",
                      "value": "book"
                    }
                    ]
                },
                "event": "alkh:dialog1",
                "target": "self"
              },
              "give_item": false,
              "take_item": false,
              "interact_text": "[ INTERACT ]"
            }
            ]
        }
        },
      "aunas": {
        "minecraft:type_family": {
          "family": [
            "aunas",
            "inanimate",
            "misc"
            ]
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                    },
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "operator": "!=",
                      "value": "book"
                    }
                    ]
                },
                "event": "aunas:dialog1",
                "target": "self"
              },
              "give_item": false,
              "take_item": false,
              "interact_text": "[ INTERACT ]"
            }
            ]
        }
        },
      "hemasda": {
        "minecraft:type_family": {
          "family": [
            "hemasda",
            "inanimate",
            "misc"
            ]
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                    },
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "operator": "!=",
                      "value": "book"
                    }
                    ]
                },
                "event": "hemasda:dialog1",
                "target": "self"
              },
              "give_item": false,
              "take_item": false,
              "interact_text": "[ INTERACT ]"
            }
            ]
        }
        },
      "despawn": {
        "minecraft:instant_despawn": {}
      }
    },
    "components": {
      "minecraft:npc": {},
      "minecraft:behavior.look_at_player": {
        "angle_of_view_horizontal": 80,
        "angle_of_view_vertical": 45,
        "look_distance": 8.5,
        "look_time": [ 5, 10 ],
        "probability": 0.90
      },
      "minecraft:nameable": {
        "always_show": false,
        "allow_name_tag_renaming": true
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true
      },
      "minecraft:type_family": {
        "family": [
          "inanimate",
          "humanoid",
          "misc"
        ]
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "event": "takingDamage",
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!=",
                    "value": "kyoto"
                  }
                  ]
              }
            },
          "deals_damage": false,
          "damage_multiplier": 0.01
          }
          ]
        },
      "minecraft:health": {
        "value": 100,
        "max": 100,
        "min": 100
      },
      "minecraft:collision_box": {
        "width": 0.5,
        "height": 1.81
      },
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": false
      },
      "minecraft:knockback_resistance": {
        "value": 100.0
      }
    },
    "events": {
      "takingDamage": {
        "queue_command": {
          "command": [
            "scoreboard players remove @s reputation 1"
            ],
          "target": "damager"
        }
      },
      //RESEARCHER_AGENT[
      "researcher_agent:dialog1": {
        "queue_command": {
          "command": [
            "scriptevent quest:researcherGrading"
            ],
          "target": "other"
        }
      },
        
        //]
      //ALKH[
      "alkh:dialog1": {
        "queue_command": {
          "command": [
            "scriptevent quest:alkhIntro"
            ],
          "target": "other"
        }
      },
        
        //]
      //AUNAS[
      "aunas:dialog1": {
        "queue_command": {
          "command": [
            "say aunas Dialog 1 ran."
            ],
          "target": "other"
        }
      },
        
        //]
      //HEMASDA[
      "hemasda:dialog1": {
        "queue_command": {
          "command": [
            "scriptevent quest:hemasdaIntro"
            ],
          "target": "other"
        }
      },
        
        //]
      
      "remove:comps": {
        "remove": {
          "component_groups": [
            "hemasda",
            "aunas",
            "alkh",
            "researcher_agent"
            ]
        }
      },
      "npc:hemasda": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "hemasda"
                ]
            },
            "set_property": {
              "npc:selections": "hemasda"
            }
          }
          ]
      },
      "npc:alkh": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "alkh"
                ]
            },
            "set_property": {
              "npc:selections": "alkh"
            }
          }
          ]
      },
      "npc:aunas": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "aunas"
                ]
            },
            "set_property": {
              "npc:selections": "aunas"
            }
          }
          ]
      },
      "npc:researcher_agent": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "researcher_agent"
                ]
            },
            "set_property": {
              "npc:selections": "researcher_agent"
            }
          }
          ]
      },
      "npc:despawn": {
        "add": {
          "component_groups": [
            "despawn"
            ]
        }
      },
      "minecraft:entity_spawned": {
        "queue_command": {
          "command": [
            "tag @s add iframes"
            ]
        }
      }
    }
  }
}