{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "hoh_bht:postman",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "animations": {
        "dialogue_spawn": "animation.hoh_bht.dialogue.quest_complete"
      },
      "scripts": {
        "animate": [
        "dialogue_spawn"
        ]
      }
    },
    "component_groups": {
      "hoh_bht:talking": {
        "minecraft:mark_variant":{
          "value": 1
        }
      },
      "hoh_bht:not_talking": {
        "minecraft:mark_variant":{
          "value": 3
        }
      },
      "hoh_bht:despawn": {
        "minecraft:despawn": {
          "filters": {
            "all_of": [
              {
                "test": "is_riding",
                "operator": "=",
                "value": false
              }
            ]
          }
        }
      },
      "hoh_bht:AddProjForCustomTame":{
        "minecraft:projectile": {
          "power": 0.0,
          "gravity": 0.0,
          "inertia": 0,
          "liquid_inertia": 0,
          "uncertainty_base": 0,
          "uncertainty_multiplier": 0,
          "anchor": 0,
          "shoot_target": false,
          "offset": [0, 0, 0],
          "reflect_on_hurt": false,
          "catch_fire": false
        }
      },
      "hoh_bht:follow":{
        "minecraft:is_tamed": {},
        "minecraft:behavior.follow_owner": {
          "priority": 9,
          "speed_multiplier": 1.0,
          "start_distance": 10,
          "stop_distance": 2
        }
      },
      "hoh_bht:leave":{
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": [
                  {
                    "all_of": [
                      {
                        "test": "is_family",
                        "subject": "other",
                        "value": "player"
                      }
                    ]
                  }
                ],
                "target": "self",
                "event": "hoh_bht:triggerd"
              }
            }
          ]
        },
        "minecraft:mark_variant":{
          "value": 2
        },
        "minecraft:timer": {
          "time": [
            4.0,
            4.0
          ],
          "looping": false,
          "time_down_event": {
            "event": "hoh_bht:despawn",
            "target": "self"
          }
        }
      }
    },
    "components": {
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:behavior.rise_to_liquid_level": {
        "priority": 0,
        "liquid_y_offset": 0.0,
        "rise_delta": 0.001,
        "sink_delta": 0.0
      },
      "minecraft:type_family": {
        "family": [ "postman", "mob", "inanimate" ]
      },
      "minecraft:behavior.owner_hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.owner_hurt_target": {
        "priority": 2
      },
      "minecraft:balloonable": {
        "mass": 0.8
      },
      "minecraft:fire_immune":{
      },
      "minecraft:npc": {
        "npc_data": {
          "portrait_offsets": {
            "translate": [ 0, 50.0, 0 ],
            "scale": [ 1.75, 1.75, 1.75 ]
          },
          "picker_offsets": {
            "translate": [ 0, 10, 0 ],
            "scale": [ 1.7, 1.7, 1.7 ]
          }
        }
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0,
        "breathes_water": true,
        "breathes_air": true,
        "generates_bubbles": false
      },
      "minecraft:jump.static": {
      },
      "minecraft:health": {
        "value": 20,
        "max": 20
      },
      "minecraft:movement.basic": {
      },
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 2.0
      },
      "minecraft:movement": {
        "value": 0.3
      },
      "minecraft:underwater_movement": {
        "value": 0.2
      },
      "minecraft:lava_movement": {
        "value": 0.3
      },
      "minecraft:nameable": {
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": true,
        "can_path_over_lava": true,
        "avoid_damage_blocks": false,
        "can_walk_in_lava": true,
        "can_sink": false
      },
      "minecraft:can_climb": {
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
            },
            "deals_damage": false
          }
        ]
      },
      "minecraft:persistent": {
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:is_hidden_when_invisible": {
      },
      "minecraft:behavior.mount_pathing": {
        "priority": 1,
        "speed_multiplier": 1.25,
        "target_dist": 0,
        "track_target": true
      },
      "minecraft:behavior.look_at_player": {
        "priority": 4,
        "target_distance": 6.0,
        "probability": 0.02
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "hoh_bht:dialogue_start":{
        "add": {
          "component_groups": ["hoh_bht:talking"]
        }
      },
      "hoh_bht:dialogue_end":{
        "remove": {
          "component_groups": ["hoh_bht:talking"]
        },
        "add": {
          "component_groups": ["hoh_bht:not_talking"]
        }
      },
      "hoh_bht:delivered":{
        "remove": {
          "component_groups": ["hoh_bht:follow", "hoh_bht:talking"]
        },
        "add": {
          "component_groups": ["hoh_bht:leave"]
        }
      },
      "hoh_bht:despawn":{
        "add": {
          "component_groups": ["hoh_bht:despawn"]
        }
      },
      "minecraft:entity_spawned":{
        "add": {
          "component_groups": ["hoh_bht:follow"]
        }
      },
      "hoh_bht:AddCustomSpawnProj":{
        "add": {
          "component_groups": ["hoh_bht:AddProjForCustomTame"]
        }
      },
      "hoh_bht:RemoveCustomSpawnProj":{
        "remove": {
          "component_groups": ["hoh_bht:AddProjForCustomTame"]
        }
      }
    }
  }
}
