{
  "format_version": "1.19.60",
  "minecraft:entity": {
    "description": {
      "identifier": "pa:huggy_wuggy",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "timer": {
        "minecraft:movement": {
          "value": 0.23
        },
        "minecraft:timer": {
          "looping": true,
          "time": 0,
          "time_down_event": {
            "event": "on:end"
          }
        }
      },
      "custom:jumpscare": {
        "minecraft:movement": {
          "value": 0
        },
        "minecraft:timer": {
          "looping": false,
          "time": 1,
          "time_down_event": {
            "event": "custom:kill"
          }
        },
        "minecraft:rideable": {
          "crouching_skip_interact": false,
          "pull_in_entities": false,
          "seat_count": 1,
          "seats": [
            {
              "position": [
                0,
                2,
                1
              ],
              "rotate_rider_by": 180,
              "lock_rider_rotation": 0,
              "max_rider_count": 1,
              "min_rider_count": 0
            }
          ]
        }
      }
    },
    "components": {
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": false
          }
        ]
      },
      "minecraft:health": {
        "value": 300,
        "max": 300
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          },
          {
            "filters": {
              "test": "in_contact_with_water",
              "operator": "==",
              "value": true
            },
            "cause": "drowning",
            "damage_per_tick": 1
          }
        ]
      },
      "minecraft:movement": {
        "value": 0.23
      },
      "minecraft:navigation.climb": {
        "can_walk": true,
        "can_climb": true,
        "can_path_over_water": true,
        "avoid_damage_blocks": false,
        "avoid_portals": false,
        "avoid_sun": false,
        "avoid_water": false,
        "can_breach": false,
        "can_break_doors": false,
        "can_jump": true,
        "can_open_doors": false,
        "can_open_iron_doors": false,
        "can_pass_doors": true,
        "can_path_from_air": false,
        "can_path_over_lava": false,
        "can_sink": true,
        "can_swim": false,
        "can_walk_in_lava": false,
        "is_amphibious": false,
        "blocks_to_avoid": []
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {
        "jump_power": 0.42
      },
      "minecraft:collision_box": {
        "height": 1.9,
        "width": 0.6
      },
      "minecraft:type_family": {
        "family": [
          "poppy",
          "monster",
          "mob"
        ]
      },
      "minecraft:knockback_resistance": {
        "value": 1.0,
        "max": 1.0
      },
      "minecraft:follow_range": {
        "value": 100,
        "max": 100
      },
      "minecraft:attack": {
        "damage": 12,
        "effect_name": "blindness",
        "effect_duration": 3.0
      },
      "minecraft:behavior.melee_attack": {
        "priority": 1,
        "speed_multiplier": 1.2,
        "track_target": true,
        "reach_multiplier": 1.4,
        "on_attack": {
          "event": "custom:jumpscare",
          "target": "self"
        },
        "attack_once": false,
        "can_spread_on_fire": false,
        "cooldown_time": 1.0,
        "inner_boundary_time_increase": 0.25,
        "max_path_time": 0.55,
        "melee_fov": 90.0,
        "min_path_time": 0.2,
        "outer_boundary_time_increase": 0.5,
        "path_fail_time_increase": 0.75,
        "path_inner_boundary": 16.0,
        "path_outer_boundary": 32.0,
        "random_stop_interval": 0,
        "require_complete_path": false,
        "x_max_rotation": 30.0,
        "y_max_head_rotation": 30.0
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 2,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "villager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "pillager"
                }
              ]
            },
            "must_see": true,
            "max_dist": 55.0
          }
        ],
        "must_see": true,
        "within_radius": 55,
        "attack_owner": false,
        "must_reach": true,
        "must_see_forget_duration": 3.0,
        "persist_time": 0.0,
        "reselect_targets": false,
        "scan_interval": 10,
        "set_persistent": false,
        "target_invisible_multiplier": 0.7,
        "target_search_height": -1.0,
        "target_sneak_visibility_multiplier": 0.8
      },
      "minecraft:behavior.random_stroll": {
        "priority": 4,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 5,
        "look_distance": 16
      },
      "minecraft:behavior.random_look_around": {
        "priority": 6
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true,
        "push_towards_closest_space": false
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:nameable": {
        "always_show": true,
        "allow_name_tag_renaming": true
      },
      "minecraft:on_target_acquired": {
        "event": "on:target_acquired",
        "target": "self"
      },
      "minecraft:timer": {
        "looping": true,
        "time": 0.0,
        "time_down_event": {
          "event": "on:tick_action"
        }
      },
      "minecraft:behavior.float": {
        "sink_with_passengers": false
      }
    },
    "events": {
      "on:end": {
        "queue_command": {
          "command": "function crouch"
        }
      },
      "custom:jumpscare": {
        "sequence": [
          {
            "remove": {
              "component_groups": [
                "timer"
              ]
            }
          },
          {
            "add": {
              "component_groups": [
                "custom:jumpscare"
              ]
            }
          },
          {
            "queue_command": {
              "target": "target",
              "command": [
                "function jumpscare",
                "function slowness"
              ]
            }
          }
        ]
      },
      "custom:kill": {
        "sequence": [
          {
            "queue_command": {
              "target": "target",
              "command": "function kill"
            }
          },
          {
            "remove": {
              "component_groups": [
                "custom:jumpscare"
              ]
            }
          },
          {
            "add": {
              "component_groups": [
                "timer"
              ]
            }
          }
        ]
      },
      "on:target_acquired": {
        "queue_command": {
          "command": [
            "function run_huggy"
          ]
        }
      },
      "on:target_escape": {
        "queue_command": {
          "command": []
        }
      },
      "on:death": {
        "queue_command": {
          "command": []
        }
      },
      "on:hurt": {
        "queue_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "queue_command": {
          "command": []
        }
      },
      "on:ignite": {
        "queue_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "queue_command": {
          "command": []
        }
      },
      "on:tick_action": {
        "queue_command": {
          "command": [
            "function crouch"
          ]
        }
      }
    }
  }
}