{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "hoh_bht:sign_quest",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "animations": {
        "quest1": "animation.signpost_quest_taken_1",
        "quest2": "animation.signpost_quest_taken_2",
        "quest3": "animation.signpost_quest_taken_3",
        "ctrl": "controller.animation.sign_quests"
      },
      "scripts": {
        "animate": ["ctrl"]
      }
    },

    "component_groups": {
      "hoh_bht:used_first": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "hoh_bht:used_second": {
        "minecraft:skin_id": {
          "value": 1
        }
      },
      "hoh_bht:used_third": {
        "minecraft:mark_variant": {
          "value": 1
        }
      },
      "hoh_bht:reset_first": {
        "minecraft:variant": {
          "value": 2
        }
      },
      "hoh_bht:reset_second": {
        "minecraft:skin_id": {
          "value": 2
        }
      },
      "hoh_bht:reset_third": {
        "minecraft:mark_variant": {
          "value": 2
        }
      },
      "hoh_bht:first": {
        "minecraft:type_family": {
          "family": ["quest", "first", "inanimate"]
        }
      },
      "hoh_bht:second": {
        "minecraft:type_family": {
          "family": ["quest", "second", "inanimate"]
        }
      },
      "hoh_bht:third": {
        "minecraft:type_family": {
          "family": ["quest", "third", "inanimate"]
        }
      }
    },

    "components": {
      "minecraft:despawn": {
        "filters": {
          "all_of": [
            {
              "test": "is_riding",
              "operator": "=",
              "value": false
            }
          ]
        }
      },
      "minecraft:interact": {
        "interactions": [
          {
            "cooldown": 5,
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  { "test": "is_family", "subject": "self", "value": "first" }
                ]
              },
              "event": "hoh_bht:quest_taken_1"
            },
            "use_item": false
          },
          {
            "cooldown": 5,
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  { "test": "is_family", "subject": "self", "value": "second" }
                ]
              },
              "event": "hoh_bht:quest_taken_2"
            },
            "use_item": false
          },
          {
            "cooldown": 5,
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  { "test": "is_family", "subject": "self", "value": "third" }
                ]
              },
              "event": "hoh_bht:quest_taken_3"
            },
            "use_item": false
          }
        ]
      },

      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:nameable": {},
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "deals_damage": false
          }
        ]
      },
      "minecraft:health": {
        "value": 3,
        "max": 3
      },
      "minecraft:collision_box": {
        "width": 0.5,
        "height": 0.5
      },
      "minecraft:movement": {
        "value": 0.0
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },

    "events": {
      "hoh_bht:first_quest": {
        "add": {
          "component_groups": ["hoh_bht:first"]
        }
      },
      "hoh_bht:second_quest": {
        "add": {
          "component_groups": ["hoh_bht:second"]
        }
      },
      "hoh_bht:third_quest": {
        "add": {
          "component_groups": ["hoh_bht:third"]
        }
      },
      "hoh_bht:quest_taken_1": {
        "remove": {
          "component_groups": ["hoh_bht:reset_first"]
        },
        "add": {
          "component_groups": ["hoh_bht:used_first"]
        }
      },
      "hoh_bht:quest_taken_2": {
        "remove": {
          "component_groups": ["hoh_bht:reset_second"]
        },
        "add": {
          "component_groups": ["hoh_bht:used_second"]
        }
      },
      "hoh_bht:quest_taken_3": {
        "remove": {
          "component_groups": ["hoh_bht:reset_third"]
        },
        "add": {
          "component_groups": ["hoh_bht:used_third"]
        }
      },
      "hoh_bht:quest_reset_1": {
        "remove": {
          "component_groups": ["hoh_bht:used_first"]
        },
        "add": {
          "component_groups": ["hoh_bht:reset_first"]
        }
      },
      "hoh_bht:quest_reset_2": {
        "remove": {
          "component_groups": ["hoh_bht:used_second"]
        },
        "add": {
          "component_groups": ["hoh_bht:reset_second"]
        }
      },
      "hoh_bht:quest_reset_3": {
        "remove": {
          "component_groups": ["hoh_bht:used_third"]
        },
        "add": {
          "component_groups": ["hoh_bht:reset_third"]
        }
      }
    }
  }
}
