{
  "format_version": "1.21.0",
  "minecraft:entity": {
    "description": {
      "identifier": "silverlabs:spark_dragon",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "properties": {
        "silverlabs:growth_stage": {
          "type": "int",
          "default": 0,
          "range": [0, 2],
          "client_sync": true
        },
        "silverlabs:beacon_active": {
          "type": "bool",
          "default": false,
          "client_sync": true
        },
        "silverlabs:mood": {
          "type": "int",
          "default": 1,
          "range": [0, 2],
          "client_sync": true
        },
        "silverlabs:trait": {
          "type": "int",
          "default": 0,
          "range": [0, 4],
          "client_sync": true
        },
        "silverlabs:firing": {
          "type": "bool",
          "default": false,
          "client_sync": true
        },
        "silverlabs:dragon_color": {
          "type": "int",
          "default": 0,
          "range": [0, 5],
          "client_sync": true
        }
      }
    },
    "component_groups": {

      "silverlabs:wild": {
        "minecraft:behavior.tempt": {
          "priority": 3,
          "speed_multiplier": 0.5,
          "items": ["cod", "salmon"],
          "can_tempt_vertically": true
        },
        "minecraft:behavior.avoid_mob_type": {
          "priority": 4,
          "max_dist": 8,
          "walk_speed_multiplier": 0.8,
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "monster"
              },
              "max_dist": 8,
              "walk_speed_multiplier": 0.8
            }
          ]
        },
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "chicken" }
                  ]
                },
                "event": "silverlabs:tame_as_relaxed",
                "target": "self"
              },
              "use_item": true,
              "interact_text": "Tame: Relaxed (Raw Chicken)",
              "play_sounds": "random.eat"
            },
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "beef" }
                  ]
                },
                "event": "silverlabs:tame_as_explorer",
                "target": "self"
              },
              "use_item": true,
              "interact_text": "Tame: Explorer (Raw Beef)",
              "play_sounds": "random.eat"
            },
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "cooked_salmon" }
                  ]
                },
                "event": "silverlabs:tame_as_affectionate",
                "target": "self"
              },
              "use_item": true,
              "interact_text": "Tame: Affectionate (Cooked Salmon)",
              "play_sounds": "random.eat"
            },
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "melon_slice" }
                  ]
                },
                "event": "silverlabs:tame_as_playful",
                "target": "self"
              },
              "use_item": true,
              "interact_text": "Tame: Playful (Melon Slice)",
              "play_sounds": "random.eat"
            },
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    { "test": "is_family", "subject": "other", "value": "player" },
                    { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "bamboo" }
                  ]
                },
                "event": "silverlabs:tame_as_independent",
                "target": "self"
              },
              "use_item": true,
              "interact_text": "Tame: Independent (Bamboo)",
              "play_sounds": "random.eat"
            },
            {
              "on_interact": {
                "filters": { "all_of": [{ "test": "is_family", "subject": "other", "value": "player" }] },
                "event": "",
                "target": "self"
              },
              "use_item": false,
              "interact_text": "The dragon eyes you warily..."
            }
          ]
        }
      },

      "silverlabs:tamed": {
        "minecraft:is_tamed": {},
        "minecraft:behavior.follow_owner": {
          "priority": 4,
          "speed_multiplier": 0.35,
          "start_distance": 6,
          "stop_distance": 4
        },
        "minecraft:behavior.tempt": {
          "priority": 5,
          "speed_multiplier": 0.4,
          "items": ["cod", "salmon"],
          "can_tempt_vertically": true
        },
        "minecraft:sittable": {},
        "minecraft:persistent": {},
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 3,
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "dragon_toy"
              },
              "max_dist": 32
            }
          ],
          "must_see": false,
          "reselect_targets": true
        },
        "minecraft:entity_sensor": {
          "subsensors": [
            {
              "range": [500, 500],
              "minimum_count": 1,
              "event": "silverlabs:whistle_called",
              "event_filters": { "test": "is_family", "subject": "other", "value": "whistle_signal" }
            }
          ]
        },
        "minecraft:behavior.melee_attack": {
          "priority": 2,
          "speed_multiplier": 0.8,
          "reach_multiplier": 1.0,
          "track_target": true
        },
        "minecraft:attack": {
          "damage": 1
        },
        "minecraft:on_target_escape": {
          "event": "silverlabs:ball_caught",
          "target": "self"
        }
      },

      "silverlabs:tamed_following": {
        "minecraft:is_tamed": {},
        "minecraft:behavior.follow_owner": {
          "priority": 2,
          "speed_multiplier": 0.3,
          "start_distance": 6,
          "stop_distance": 5
        },
        "minecraft:sittable": {},
        "minecraft:persistent": {},
        "minecraft:teleport": {
          "dark_teleport_chance": 0.0,
          "light_teleport_chance": 0.01,
          "max_random_teleport_time": 60,
          "min_random_teleport_time": 30,
          "random_teleport_cube_size": [8, 4, 8],
          "target_distance": 64,
          "target_teleport_chance": 0.04
        }
      },

      "silverlabs:returning_fetch": {
        "minecraft:behavior.follow_owner": {
          "priority": 1,
          "speed_multiplier": 0.7,
          "start_distance": 15,
          "stop_distance": 2
        },
        "minecraft:behavior.drop_item_for": {
          "priority": 0,
          "seconds_before_pickup": 0,
          "cooldown": 60,
          "drop_item_chance": 1.0,
          "offering_distance": 5.0,
          "speed_multiplier": 0.7,
          "search_range": 20,
          "search_height": 4,
          "target_range": [5, 5, 5],
          "time_of_day_range": [0.0, 1.0],
          "loot_table": "loot_tables/gameplay/toy_return.json",
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 20
            }
          ]
        },
        "minecraft:timer": {
          "time": 5,
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:fetch_complete",
            "target": "self"
          }
        }
      },

      "silverlabs:has_home": {
        "minecraft:home": {
          "restriction_radius": 32
        },
        "minecraft:scheduler": {
          "min_delay_secs": 0,
          "max_delay_secs": 0,
          "scheduled_events": [
            {
              "filters": {
                "all_of": [
                  { "test": "hourly_clock_time", "operator": ">=", "value": 0 },
                  { "test": "hourly_clock_time", "operator": "<", "value": 7000 }
                ]
              },
              "event": "silverlabs:start_exploring"
            },
            {
              "filters": {
                "all_of": [
                  { "test": "hourly_clock_time", "operator": ">=", "value": 7000 },
                  { "test": "hourly_clock_time", "operator": "<", "value": 9000 }
                ]
              },
              "event": "silverlabs:go_home"
            },
            {
              "filters": {
                "all_of": [
                  { "test": "hourly_clock_time", "operator": ">=", "value": 9000 },
                  { "test": "hourly_clock_time", "operator": "<", "value": 22000 }
                ]
              },
              "event": "silverlabs:start_sleeping"
            },
            {
              "filters": {
                "all_of": [
                  { "test": "hourly_clock_time", "operator": ">=", "value": 22000 }
                ]
              },
              "event": "silverlabs:start_exploring"
            }
          ]
        }
      },

      "silverlabs:exploring": {
        "minecraft:behavior.random_stroll": {
          "priority": 6,
          "speed_multiplier": 0.3,
          "xz_dist": 10,
          "y_dist": 2
        },
        "minecraft:behavior.random_look_around": {
          "priority": 8
        }
      },

      "silverlabs:going_home": {
        "minecraft:behavior.go_home": {
          "priority": 2,
          "speed_multiplier": 0.5,
          "interval": 1,
          "goal_radius": 2,
          "on_home": [
            {
              "event": "silverlabs:start_sleeping",
              "target": "self"
            }
          ]
        }
      },

      "silverlabs:sleeping": {
        "minecraft:is_sitting": {},
        "minecraft:behavior.look_at_player": {
          "priority": 8,
          "look_distance": 4.0
        }
      },

      "silverlabs:sitting": {
        "minecraft:is_sitting": {}
      },

      "silverlabs:beacon_on": {
        "minecraft:timer": {
          "time": 12,
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:beacon_off",
            "target": "self"
          }
        }
      },

      "silverlabs:tamed_called": {
        "minecraft:is_tamed": {},
        "minecraft:behavior.follow_owner": {
          "priority": 1,
          "speed_multiplier": 0.9,
          "start_distance": 200,
          "stop_distance": 3
        },
        "minecraft:sittable": {},
        "minecraft:persistent": {},
        "minecraft:teleport": {
          "dark_teleport_chance": 0.0,
          "light_teleport_chance": 1.0,
          "max_random_teleport_time": 3,
          "min_random_teleport_time": 1,
          "random_teleport_cube_size": [20, 10, 20],
          "target_distance": 24,
          "target_teleport_chance": 1.0
        }
      },

      "silverlabs:tamed_loot": {
        "minecraft:loot": {
          "table": "loot_tables/gameplay/dragon_death.json"
        }
      },

      "silverlabs:guide_drop": {
        "minecraft:behavior.drop_item_for": {
          "priority": 1,
          "seconds_before_pickup": 0,
          "cooldown": 99999,
          "drop_item_chance": 1.0,
          "offering_distance": 5.0,
          "speed_multiplier": 0.5,
          "search_range": 10,
          "search_height": 4,
          "target_range": [5, 5, 5],
          "time_of_day_range": [0.0, 1.0],
          "loot_table": "loot_tables/gameplay/dragon_guide.json",
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 16
            }
          ]
        },
        "minecraft:timer": {
          "time": 10,
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:guide_dropped",
            "target": "self"
          }
        }
      },

      "silverlabs:mood_happy": {
        "minecraft:timer": {
          "time": [480, 720],
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:mood_decay_to_content",
            "target": "self"
          }
        }
      },

      "silverlabs:mood_content": {
        "minecraft:timer": {
          "time": [360, 600],
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:mood_decay_to_needy",
            "target": "self"
          }
        }
      },

      "silverlabs:mood_needy": {
        "minecraft:behavior.look_at_player": {
          "priority": 3,
          "look_distance": 10.0,
          "probability": 0.1
        }
      },

      "silverlabs:stage_baby": {
        "minecraft:is_baby": {},
        "minecraft:ageable": {
          "duration": 1200,
          "feed_items": ["cod", "salmon"],
          "grow_up": {
            "event": "silverlabs:grow_to_juvenile",
            "target": "self"
          }
        },
        "minecraft:scale": {
          "value": 0.65
        },
        "minecraft:collision_box": {
          "width": 0.5,
          "height": 0.45
        },
        "minecraft:movement": {
          "value": 0.10
        },
        "minecraft:health": {
          "value": 10,
          "max": 10
        },
        "minecraft:behavior.drop_item_for": {
          "priority": 5,
          "seconds_before_pickup": 0,
          "cooldown": 600,
          "drop_item_chance": 0.6,
          "offering_distance": 5.0,
          "minimum_teleport_distance": 2.0,
          "speed_multiplier": 0.5,
          "search_range": 10,
          "search_height": 2,
          "target_range": [5, 5, 5],
          "teleport_offset": [0, 1, 0],
          "time_of_day_range": [0.0, 0.5],
          "loot_table": "loot_tables/gameplay/gift_baby.json",
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 16
            }
          ]
        },
        "minecraft:behavior.play": {
          "priority": 5,
          "speed_multiplier": 0.5,
          "friend_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "spark_dragon"
              }
            }
          ]
        }
      },

      "silverlabs:stage_juvenile": {
        "minecraft:scale": {
          "value": 0.9
        },
        "minecraft:collision_box": {
          "width": 0.6,
          "height": 0.5
        },
        "minecraft:movement": {
          "value": 0.14
        },
        "minecraft:health": {
          "value": 20,
          "max": 20
        },
        "minecraft:jump.static": {
          "jump_power": 0.5
        },
        "minecraft:timer": {
          "time": 1200,
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:grow_to_adult",
            "target": "self"
          }
        },
        "minecraft:behavior.drop_item_for": {
          "priority": 5,
          "seconds_before_pickup": 0,
          "cooldown": 480,
          "drop_item_chance": 0.7,
          "offering_distance": 5.0,
          "minimum_teleport_distance": 2.0,
          "speed_multiplier": 0.6,
          "search_range": 12,
          "search_height": 2,
          "target_range": [5, 5, 5],
          "teleport_offset": [0, 1, 0],
          "time_of_day_range": [0.0, 0.5],
          "loot_table": "loot_tables/gameplay/gift_juvenile.json",
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 16
            }
          ]
        },
        "minecraft:behavior.play": {
          "priority": 5,
          "speed_multiplier": 0.6,
          "friend_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "spark_dragon"
              }
            }
          ]
        },
        "minecraft:behavior.raid_garden": {
          "priority": 6,
          "speed_multiplier": 0.5,
          "search_range": 12,
          "search_height": 2,
          "goal_radius": 1.0,
          "max_to_eat": 2,
          "initial_eat_delay": 20
        }
      },

      "silverlabs:stage_adult": {
        "minecraft:scale": {
          "value": 1.3
        },
        "minecraft:collision_box": {
          "width": 0.8,
          "height": 0.65
        },
        "minecraft:movement": {
          "value": 0.18
        },
        "minecraft:health": {
          "value": 30,
          "max": 30
        },
        "minecraft:can_fly": {},
        "minecraft:navigation.fly": {
          "can_path_over_water": true,
          "can_path_from_air": true
        },
        "minecraft:movement.fly": {},
        "minecraft:flying_speed": {
          "value": 0.06
        },
        "minecraft:rideable": {
          "seat_count": 1,
          "family_types": ["player"],
          "interact_text": "action.interact.mount",
          "seats": [
            {
              "position": [0, 0.9, -0.3],
              "lock_rider_rotation": 90,
              "min_rider_count": 0,
              "max_rider_count": 1
            }
          ]
        },
        "minecraft:input_ground_controlled": {},
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 5,
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "monster"
              },
              "max_dist": 12
            }
          ],
          "must_see": true,
          "reselect_targets": true
        },
        "minecraft:shooter": {
          "def": "minecraft:small_fireball"
        },
        "minecraft:behavior.ranged_attack": {
          "priority": 3,
          "attack_interval_min": 2.0,
          "attack_interval_max": 4.0,
          "attack_radius": 12.0,
          "speed_multiplier": 0.8
        },
        "minecraft:behavior.drop_item_for": {
          "priority": 5,
          "seconds_before_pickup": 0,
          "cooldown": 300,
          "drop_item_chance": 0.8,
          "offering_distance": 5.0,
          "minimum_teleport_distance": 2.0,
          "speed_multiplier": 0.5,
          "search_range": 16,
          "search_height": 4,
          "target_range": [5, 5, 5],
          "teleport_offset": [0, 1, 0],
          "time_of_day_range": [0.0, 0.5],
          "loot_table": "loot_tables/gameplay/gift_adult.json",
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 16
            }
          ]
        }
      },

      "silverlabs:fire_breathing": {
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 2,
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "monster"
              },
              "max_dist": 20
            }
          ],
          "must_see": false,
          "reselect_targets": true
        },
        "minecraft:behavior.ranged_attack": {
          "priority": 1,
          "attack_interval_min": 0.8,
          "attack_interval_max": 1.5,
          "attack_radius": 18.0,
          "speed_multiplier": 0.5
        },
        "minecraft:timer": {
          "time": [4, 6],
          "looping": false,
          "time_down_event": {
            "event": "silverlabs:fire_breath_end",
            "target": "self"
          }
        }
      },

      "silverlabs:trait_relaxed": {
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.12,
          "xz_dist": 3,
          "y_dist": 1
        },
        "minecraft:behavior.look_at_player": {
          "priority": 7,
          "look_distance": 7.0,
          "probability": 0.03
        }
      },

      "silverlabs:trait_explorer": {
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.22,
          "xz_dist": 14,
          "y_dist": 3
        },
        "minecraft:behavior.look_at_player": {
          "priority": 7,
          "look_distance": 8.0,
          "probability": 0.01
        }
      },

      "silverlabs:trait_affectionate": {
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.14,
          "xz_dist": 4,
          "y_dist": 1
        },
        "minecraft:behavior.look_at_player": {
          "priority": 7,
          "look_distance": 14.0,
          "probability": 0.10
        }
      },

      "silverlabs:trait_playful": {
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.20,
          "xz_dist": 8,
          "y_dist": 2
        },
        "minecraft:behavior.look_at_player": {
          "priority": 7,
          "look_distance": 9.0,
          "probability": 0.05
        }
      },

      "silverlabs:trait_independent": {
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.18,
          "xz_dist": 12,
          "y_dist": 3
        },
        "minecraft:behavior.look_at_player": {
          "priority": 7,
          "look_distance": 5.0,
          "probability": 0.005
        }
      }
    },

    "components": {
      "minecraft:type_family": {
        "family": ["spark_dragon", "pet", "mob"]
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:can_climb": {},
      "minecraft:navigation.walk": {
        "can_path_over_water": true,
        "avoid_water": true,
        "avoid_damage_blocks": true
      },
      "minecraft:movement.basic": {
        "max_turn": 12.0
      },
      "minecraft:jump.static": {},
      "minecraft:tameable": {
        "probability": 0.33,
        "tame_items": ["cod", "salmon"],
        "tame_event": {
          "event": "silverlabs:on_tamed",
          "target": "self"
        }
      },
      "minecraft:healable": {
        "items": [
          { "item": "cod", "heal_amount": 4 },
          { "item": "salmon", "heal_amount": 6 }
        ]
      },
      "minecraft:leashable": {
        "soft_distance": 4.0,
        "hard_distance": 6.0,
        "max_distance": 10.0
      },
      "minecraft:nameable": {},
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0,
        "breathes_air": true,
        "breathes_water": false
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": false
          },
          {
            "cause": "fire",
            "deals_damage": false
          },
          {
            "cause": "fire_tick",
            "deals_damage": false
          }
        ]
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.look_at_player": {
        "priority": 7,
        "look_distance": 8.0,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 9
      },
      "minecraft:behavior.random_stroll": {
        "priority": 8,
        "speed_multiplier": 0.2,
        "xz_dist": 5,
        "y_dist": 2
      },
      "minecraft:interact": {
        "interactions": [
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "cod" },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:mood_boost",
              "target": "self"
            },
            "use_item": false
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "salmon" },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:mood_boost",
              "target": "self"
            },
            "use_item": false
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "potion" },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:mood_boost",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Give Water"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "amethyst_shard" },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:request_guide",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Request Guide",
            "play_sounds": "random.orb"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "chicken" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:set_trait_relaxed",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Teach: Relaxed",
            "play_sounds": "random.eat"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "beef" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:set_trait_explorer",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Teach: Explorer",
            "play_sounds": "random.eat"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "cooked_salmon" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:set_trait_affectionate",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Teach: Affectionate",
            "play_sounds": "random.eat"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "melon_slice" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:set_trait_playful",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Teach: Playful",
            "play_sounds": "random.eat"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "bamboo" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" }
                ]
              },
              "event": "silverlabs:set_trait_independent",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Teach: Independent",
            "play_sounds": "random.eat"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "fire_charge" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "value": "minecraft:can_fly" }
                ]
              },
              "event": "silverlabs:fire_breath_start",
              "target": "self"
            },
            "use_item": true,
            "interact_text": "Breathe Fire",
            "play_sounds": "fire.fire"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "operator": "not", "value": "name_tag" },
                  { "test": "is_sneaking", "subject": "other", "value": false },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "value": "minecraft:is_sitting" }
                ]
              },
              "event": "silverlabs:on_stand",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Get Up",
            "play_sounds": "mob.wolf.bark"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "operator": "not", "value": "name_tag" },
                  { "test": "is_sneaking", "subject": "other", "value": false },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "operator": "!=", "value": "minecraft:is_sitting" }
                ]
              },
              "event": "silverlabs:command_follow",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Follow Me",
            "play_sounds": "mob.wolf.bark"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "bone" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "operator": "!=", "value": "minecraft:is_sitting" }
                ]
              },
              "event": "silverlabs:set_home",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Set Home",
            "play_sounds": "random.levelup"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "bone" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "value": "minecraft:is_sitting" },
                  { "test": "has_component", "value": "minecraft:home" }
                ]
              },
              "event": "silverlabs:command_go_home",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Go Home",
            "play_sounds": "note.pling"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "operator": "not", "value": "name_tag" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "operator": "!=", "value": "minecraft:is_sitting" }
                ]
              },
              "event": "silverlabs:on_sit",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Stay"
          },
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "is_family", "subject": "other", "value": "player" },
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "operator": "not", "value": "name_tag" },
                  { "test": "is_sneaking", "subject": "other", "value": true },
                  { "test": "has_component", "value": "minecraft:is_tamed" },
                  { "test": "has_component", "value": "minecraft:is_sitting" }
                ]
              },
              "event": "silverlabs:on_stand",
              "target": "self"
            },
            "use_item": false,
            "interact_text": "Stand"
          }
        ]
      },
      "minecraft:spawn_entity": {}
    },

    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": ["silverlabs:wild", "silverlabs:stage_baby"]
        }
      },

      "silverlabs:on_tamed": {
        "remove": {
          "component_groups": ["silverlabs:wild"]
        },
        "add": {
          "component_groups": [
            "silverlabs:tamed",
            "silverlabs:tamed_loot",
            "silverlabs:guide_drop",
            "silverlabs:mood_happy",
            "silverlabs:trait_relaxed"
          ]
        },
        "set_property": {
          "silverlabs:mood": 2,
          "silverlabs:trait": 0
        }
      },

      "silverlabs:request_guide": {
        "add": { "component_groups": ["silverlabs:guide_drop"] }
      },

      "silverlabs:guide_dropped": {
        "remove": {
          "component_groups": ["silverlabs:guide_drop"]
        }
      },

      "silverlabs:mood_boost": {
        "remove": {
          "component_groups": ["silverlabs:mood_happy", "silverlabs:mood_content", "silverlabs:mood_needy"]
        },
        "add": {
          "component_groups": ["silverlabs:mood_happy"]
        },
        "set_property": {
          "silverlabs:mood": 2
        }
      },

      "silverlabs:mood_decay_to_content": {
        "remove": {
          "component_groups": ["silverlabs:mood_happy"]
        },
        "add": {
          "component_groups": ["silverlabs:mood_content"]
        },
        "set_property": {
          "silverlabs:mood": 1
        }
      },

      "silverlabs:mood_decay_to_needy": {
        "remove": {
          "component_groups": ["silverlabs:mood_content"]
        },
        "add": {
          "component_groups": ["silverlabs:mood_needy"]
        },
        "set_property": {
          "silverlabs:mood": 0
        }
      },

      "silverlabs:grow_to_juvenile": {
        "remove": {
          "component_groups": [
            "silverlabs:stage_baby",
            "silverlabs:mood_happy", "silverlabs:mood_content", "silverlabs:mood_needy"
          ]
        },
        "add": {
          "component_groups": ["silverlabs:stage_juvenile"]
        },
        "set_property": {
          "silverlabs:growth_stage": 1,
          "silverlabs:mood": 1
        }
      },

      "silverlabs:grow_to_adult": {
        "remove": {
          "component_groups": ["silverlabs:stage_juvenile"]
        },
        "add": {
          "component_groups": ["silverlabs:stage_adult", "silverlabs:mood_content"]
        },
        "set_property": {
          "silverlabs:growth_stage": 2,
          "silverlabs:mood": 1
        }
      },

      "silverlabs:ball_caught": {
        "add": {
          "component_groups": ["silverlabs:returning_fetch"]
        }
      },

      "silverlabs:fetch_complete": {
        "remove": {
          "component_groups": [
            "silverlabs:returning_fetch",
            "silverlabs:mood_happy", "silverlabs:mood_content", "silverlabs:mood_needy"
          ]
        },
        "add": {
          "component_groups": ["silverlabs:tamed_following", "silverlabs:mood_happy"]
        },
        "set_property": {
          "silverlabs:mood": 2
        }
      },

      "silverlabs:command_follow": {
        "add": {
          "component_groups": ["silverlabs:tamed_following", "silverlabs:beacon_on"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:sleeping", "silverlabs:going_home",
            "silverlabs:sitting", "silverlabs:returning_fetch", "silverlabs:tamed_called"
          ]
        },
        "set_property": {
          "silverlabs:beacon_active": true
        }
      },

      "silverlabs:whistle_called": {
        "add": {
          "component_groups": ["silverlabs:tamed_called", "silverlabs:beacon_on"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:sleeping", "silverlabs:going_home",
            "silverlabs:sitting", "silverlabs:returning_fetch", "silverlabs:tamed_following"
          ]
        },
        "set_property": {
          "silverlabs:beacon_active": true
        }
      },

      "silverlabs:activate_beacon": {
        "add": {
          "component_groups": ["silverlabs:beacon_on"]
        },
        "set_property": {
          "silverlabs:beacon_active": true
        }
      },

      "silverlabs:beacon_off": {
        "remove": {
          "component_groups": ["silverlabs:beacon_on", "silverlabs:tamed_called"]
        },
        "add": {
          "component_groups": ["silverlabs:tamed_following"]
        },
        "set_property": {
          "silverlabs:beacon_active": false
        }
      },

      "silverlabs:command_go_home": {
        "add": {
          "component_groups": ["silverlabs:going_home"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:tamed_following",
            "silverlabs:sitting", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:set_home": {
        "add": {
          "component_groups": ["silverlabs:has_home", "silverlabs:exploring"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:tamed_following", "silverlabs:sleeping",
            "silverlabs:going_home", "silverlabs:sitting", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:start_exploring": {
        "add": {
          "component_groups": ["silverlabs:exploring"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:sleeping", "silverlabs:going_home",
            "silverlabs:sitting", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:go_home": {
        "add": {
          "component_groups": ["silverlabs:going_home"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:sleeping", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:start_sleeping": {
        "add": {
          "component_groups": ["silverlabs:sleeping"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:going_home", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:on_sit": {
        "add": {
          "component_groups": ["silverlabs:sitting"]
        },
        "remove": {
          "component_groups": [
            "silverlabs:exploring", "silverlabs:going_home",
            "silverlabs:tamed_following", "silverlabs:returning_fetch"
          ]
        }
      },

      "silverlabs:on_stand": {
        "remove": {
          "component_groups": ["silverlabs:sitting", "silverlabs:sleeping", "silverlabs:returning_fetch"]
        },
        "add": {
          "component_groups": ["silverlabs:tamed_following"]
        }
      },

      "silverlabs:set_trait_relaxed": {
        "remove": {
          "component_groups": [
            "silverlabs:trait_relaxed", "silverlabs:trait_explorer",
            "silverlabs:trait_affectionate", "silverlabs:trait_playful",
            "silverlabs:trait_independent"
          ]
        },
        "add": { "component_groups": ["silverlabs:trait_relaxed"] },
        "set_property": { "silverlabs:trait": 0 }
      },

      "silverlabs:set_trait_explorer": {
        "remove": {
          "component_groups": [
            "silverlabs:trait_relaxed", "silverlabs:trait_explorer",
            "silverlabs:trait_affectionate", "silverlabs:trait_playful",
            "silverlabs:trait_independent"
          ]
        },
        "add": { "component_groups": ["silverlabs:trait_explorer"] },
        "set_property": { "silverlabs:trait": 1 }
      },

      "silverlabs:set_trait_affectionate": {
        "remove": {
          "component_groups": [
            "silverlabs:trait_relaxed", "silverlabs:trait_explorer",
            "silverlabs:trait_affectionate", "silverlabs:trait_playful",
            "silverlabs:trait_independent"
          ]
        },
        "add": { "component_groups": ["silverlabs:trait_affectionate"] },
        "set_property": { "silverlabs:trait": 2 }
      },

      "silverlabs:set_trait_playful": {
        "remove": {
          "component_groups": [
            "silverlabs:trait_relaxed", "silverlabs:trait_explorer",
            "silverlabs:trait_affectionate", "silverlabs:trait_playful",
            "silverlabs:trait_independent"
          ]
        },
        "add": { "component_groups": ["silverlabs:trait_playful"] },
        "set_property": { "silverlabs:trait": 3 }
      },

      "silverlabs:set_trait_independent": {
        "remove": {
          "component_groups": [
            "silverlabs:trait_relaxed", "silverlabs:trait_explorer",
            "silverlabs:trait_affectionate", "silverlabs:trait_playful",
            "silverlabs:trait_independent"
          ]
        },
        "add": { "component_groups": ["silverlabs:trait_independent"] },
        "set_property": { "silverlabs:trait": 4 }
      },

      "silverlabs:fire_breath_start": {
        "add": { "component_groups": ["silverlabs:fire_breathing"] },
        "set_property": { "silverlabs:firing": true }
      },

      "silverlabs:fire_breath_end": {
        "remove": { "component_groups": ["silverlabs:fire_breathing"] },
        "set_property": { "silverlabs:firing": false }
      },

      "silverlabs:tame_as_relaxed": {
        "remove": { "component_groups": ["silverlabs:wild"] },
        "add": { "component_groups": ["silverlabs:tamed", "silverlabs:tamed_loot", "silverlabs:guide_drop", "silverlabs:mood_happy", "silverlabs:trait_relaxed"] },
        "set_property": { "silverlabs:mood": 2, "silverlabs:trait": 0 }
      },
      "silverlabs:tame_as_explorer": {
        "remove": { "component_groups": ["silverlabs:wild"] },
        "add": { "component_groups": ["silverlabs:tamed", "silverlabs:tamed_loot", "silverlabs:guide_drop", "silverlabs:mood_happy", "silverlabs:trait_explorer"] },
        "set_property": { "silverlabs:mood": 2, "silverlabs:trait": 1 }
      },
      "silverlabs:tame_as_affectionate": {
        "remove": { "component_groups": ["silverlabs:wild"] },
        "add": { "component_groups": ["silverlabs:tamed", "silverlabs:tamed_loot", "silverlabs:guide_drop", "silverlabs:mood_happy", "silverlabs:trait_affectionate"] },
        "set_property": { "silverlabs:mood": 2, "silverlabs:trait": 2 }
      },
      "silverlabs:tame_as_playful": {
        "remove": { "component_groups": ["silverlabs:wild"] },
        "add": { "component_groups": ["silverlabs:tamed", "silverlabs:tamed_loot", "silverlabs:guide_drop", "silverlabs:mood_happy", "silverlabs:trait_playful"] },
        "set_property": { "silverlabs:mood": 2, "silverlabs:trait": 3 }
      },
      "silverlabs:tame_as_independent": {
        "remove": { "component_groups": ["silverlabs:wild"] },
        "add": { "component_groups": ["silverlabs:tamed", "silverlabs:tamed_loot", "silverlabs:guide_drop", "silverlabs:mood_happy", "silverlabs:trait_independent"] },
        "set_property": { "silverlabs:mood": 2, "silverlabs:trait": 4 }
      },

      "silverlabs:born_color_0": {
        "set_property": { "silverlabs:dragon_color": 0 }
      },
      "silverlabs:born_color_1": {
        "set_property": { "silverlabs:dragon_color": 1 }
      },
      "silverlabs:born_color_2": {
        "set_property": { "silverlabs:dragon_color": 2 }
      },
      "silverlabs:born_color_3": {
        "set_property": { "silverlabs:dragon_color": 3 }
      },
      "silverlabs:born_color_4": {
        "set_property": { "silverlabs:dragon_color": 4 }
      },
      "silverlabs:born_color_5": {
        "set_property": { "silverlabs:dragon_color": 5 }
      }
    }
  }
}
