{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "legacy:iron_minion",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "minecraft:vindicator_aggro": {
        "minecraft:angry": {
          "duration": -1,
          "broadcastAnger": false,
          "calm_event": {
            "event": "minecraft:stop_aggro",
            "target": "self"
          }
        }
      },
      "upgraded": {
        "minecraft:transformation": {
          "into": "legacy:iron_minion_upgraded",
          "keep_owner": true,
          "keep_level": true,
          "delay": 0.1
        }
      },
      "regeneration": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 2,
              "visible": 1,
              "ambient": false,
              "duration": 30
            }
          ]
        }
      },
      "blessed_regeneration": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 35
            }
          ]
        }
      },
      "blessed_regeneration_cured": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "weakness"
        }
      },
      "blessed_regeneration_cured_1": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "poison"
        }
      },
      "blessed_regeneration_cured_2": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "wither"
        }
      },
      "blessed_regeneration_cured_3": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": 1,
              "ambient": false,
              "duration": 25
            }
          ],
          "remove_effects": "slowness"
        }
      },
      "minecraft:vindicator_johnny": {
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 2,
          "within_radius": 12,
          "must_see": true,
          "must_see_forget_duration": 40.0,
          "entity_types": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!=",
                    "value": "villager"
                  }
                ]
              },
              "max_dist": 12
            }
          ]
        }
      },
      "wild": {
        "minecraft:tameable": {
          "probability": 1,
          "tame_items": [
            "legacy:contract"
          ],
          "tame_event": {
            "event": "on_tame",
            "target": "self"
          }
        }
      },
      "tame": {
        "minecraft:is_tamed": {},
        "minecraft:sittable": {},
        "minecraft:movement": {
          "value": 0.35
        },
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 3,
          "within_radius": 25,
          "reselect_targets": true,
          "must_reach": false,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "illager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "undead"
                  }
                ]
              },
              "max_dist": 20,
              "must_see": false
            }
          ],
          "must_see": false,
          "speed_multiplier": 1.0
        },
        "minecraft:type_family": {
          "family": [
            "player",
            "villager",
            "low_platinum_level"
          ]
        },
        "minecraft:behavior.owner_hurt_target": {
          "priority": 2,
          "entity_types": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!\u003d",
                    "value": "villager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!\u003d",
                    "value": "creeper"
                  },
                  {
                    "test": "has_component",
                    "subject": "other",
                    "operator": "!\u003d",
                    "value": "minecraft:is_tamed"
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.owner_hurt_by_target": {
          "priority": 1,
          "entity_types": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!\u003d",
                    "value": "villager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "operator": "!\u003d",
                    "value": "creeper"
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.follow_owner": {
          "priority": 3,
          "speed_multiplier": 1.0,
          "start_distance": 6,
          "stop_distance": 3
        },
        "minecraft:behavior.random_stroll": {
          "priority": 8,
          "speed_multiplier": 0.75,
          "interval": 15
        }
      },
      "interact": {
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "has_equipment",
                      "subject": "other",
                      "domain": "hand",
                      "value": "legacy:contract_strength"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "value": "player"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "operator": "!\u003d",
                      "value": "high_platinum_level"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "operator": "!\u003d",
                      "value": "gold_level"
                    },
                    {
                      "test": "is_family",
                      "subject": "other",
                      "operator": "!\u003d",
                      "value": "diamond_level"
                    }
                  ]
                },
                "event": "upgraded_platinum",
                "target": "self"
              },
              "swing": true,
              "particle_on_start": {
                "particle_type": "villagerhappy",
                "particle_offset_towards_interactor": false,
                "particle_y_offset": 1.25
              },
              "use_item": true,
              "interact_text": "Upgrade"
            }
          ]
        }
      },
      "minecraft:spawn_on_village": {
        "minecraft:preferred_path": {
          "max_fall_blocks": 1,
          "jump_cost": 20,
          "default_block_cost": 3,
          "preferred_path_blocks": [
            {
              "cost": 0,
              "blocks": [
                "grass_path"
              ]
            },
            {
              "cost": 1,
              "blocks": [
                "cobblestone",
                "stone",
                "stonebrick",
                "sandstone",
                "mossy_cobblestone",
                "stone_slab",
                "stone_slab2",
                "stone_slab3",
                "stone_slab4",
                "double_stone_slab",
                "double_stone_slab2",
                "double_stone_slab3",
                "double_stone_slab4",
                "wooden_slab",
                "double_wooden_slab",
                "planks",
                "brick_block",
                "nether_brick",
                "red_nether_brick",
                "end_bricks",
                "red_sandstone",
                "stained_glass",
                "glass",
                "glowstone",
                "prismarine",
                "emerald_block",
                "diamond_block",
                "lapis_block",
                "gold_block",
                "redstone_block",
                "purple_glazed_terracotta",
                "white_glazed_terracotta",
                "orange_glazed_terracotta",
                "magenta_glazed_terracotta",
                "light_blue_glazed_terracotta",
                "yellow_glazed_terracotta",
                "lime_glazed_terracotta",
                "pink_glazed_terracotta",
                "gray_glazed_terracotta",
                "silver_glazed_terracotta",
                "cyan_glazed_terracotta",
                "blue_glazed_terracotta",
                "brown_glazed_terracotta",
                "green_glazed_terracotta",
                "red_glazed_terracotta",
                "black_glazed_terracotta"
              ]
            },
            {
              "cost": 50,
              "blocks": [
                "bed",
                "lectern",
                "composter",
                "grindstone",
                "blast_furnace",
                "smoker",
                "fletching_table",
                "cartography_table",
                "brewing_stand",
                "smithing_table",
                "cauldron",
                "barrel",
                "loom",
                "stonecutter"
              ]
            }
          ]
        },
        "minecraft:behavior.explore_outskirts": {
          "priority": 5,
          "explore_dist": 7,
          "speed_multiplier": 0.5,
          "wait_time": 30
        },
        "minecraft:behavior.move_to_village": {
          "priority": 6,
          "speed_multiplier": 0.7
        },
        "minecraft:behavior.move_through_village": {
          "priority": 3,
          "speed_multiplier": 0.7,
          "only_at_night": true
        },
        "minecraft:pushable": {
          "is_pushable": true,
          "is_pushable_by_piston": true
        }
      },
      "minecraft:default_targeting": {
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 2,
          "within_radius": 12,
          "must_see": true,
          "must_see_forget_duration": 40.0,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "illager"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "undead"
                  }
                ]
              },
              "max_dist": 12
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "illager"
                  },
                  {
                    "test": "has_component",
                    "subject": "other",
                    "operator": "!=",
                    "value": "minecraft:is_baby"
                  }
                ]
              },
              "max_dist": 12
            }
          ]
        }
      }
    },
    "components": {
      "minecraft:nameable": {
        "default_trigger": {
          "event": "minecraft:stop_johnny",
          "target": "self"
        },
        "name_actions": [
          {
            "name_filter": "Johnny",
            "on_named": {
              "event": "minecraft:start_johnny",
              "target": "self"
            }
          }
        ],
        "alwaysShow": false,
        "allowNameTagRenaming": false
      },
      "minecraft:behavior.stay_while_sitting": {
        "priority": 3
      },
      "minecraft:type_family": {
        "family": [
          "iron_golem",
          "low_platinum_level",
          "mob",
          "villager"
        ]
      },
      "minecraft:variant": {
        "value": 1
      },
      "minecraft:collision_box": {
        "height": 1.9,
        "width": 0.6
      },
      "minecraft:health": {
        "value": 45,
        "max": 45
      },
      "minecraft:attack": {
        "damage": 5
      },
      "minecraft:movement": {
        "value": 0.35
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": false,
        "avoid_water": true,
        "avoid_damage_blocks": true
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:follow_range": {
        "value": 64
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/iron_golem.json"
      },
      "minecraft:equipment": {
        "table": "loot_tables/entities/nope.json",
        "slot_drop_chance": [
          {
            "slot": "slot.armor.head",
            "drop_chance": 0.1
          },
          {
            "slot": "slot.armor.chest",
            "drop_chance": 0.1
          },
          {
            "slot": "slot.armor.legs",
            "drop_chance": 0.1
          },
          {
            "slot": "slot.armor.feet",
            "drop_chance": 0.1
          }
        ]
      },
      "minecraft:behavior.melee_attack": {
        "priority": 3,
        "speed_multiplier": 1,
        "track_target": false
      },
      "minecraft:behavior.random_stroll": {
        "priority": 9,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 10,
        "look_distance": 8,
        "probability": 0.02
      },
      "minecraft:interact": {
        "interactions": [
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "has_equipment",
                    "domain": "hand",
                    "subject": "other",
                    "value": "iron_ingot"
                  },
                  {
                    "test": "is_missing_health",
                    "value": true
                  }
                ]
              }
            },
            "use_item": true,
            "health_amount": 25,
            "play_sounds": "irongolem.repair",
            "interact_text": "action.interact.repair"
          }
        ]
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "villager"
                }
              ]
            },
            "deals_damage": false
          }
        ]
      },
      "minecraft:angry": {
        "duration": 30,
        "broadcast_anger": true,
        "broadcast_anger_on_attack": true,
        "broadcast_anger_on_being_attacked": true,
        "broadcast_range": 16,
        "broadcast_targets": [
          "villager"
        ]
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 2,
        "entity_types": {
          "filters": {
            "test": "is_family",
            "subject": "other",
            "operator": "!\u003d",
            "value": "villager"
          }
        }
      },
      "minecraft:on_target_acquired": {
        "event": "on:target_acquired",
        "target": "self"
      },
      "minecraft:on_target_escape": {
        "event": "on:target_escape",
        "target": "self"
      },
      "minecraft:physics": {},
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 10 : 0"
      },
      "minecraft:underwater_movement": {
        "value": 0.02
      },
      "minecraft:scale": {
        "value": 1
      },
      "minecraft:equip_item": {}
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting",
            "wild",
            "interact"
          ]
        }
      },
      "minecraft:spawn_on_village": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting",
            "minecraft:spawn_on_village",
            "wild",
            "interact"
          ]
        }
      },
      "minecraft:spawn_as_patrol_follower": {
        "add": {
          "component_groups": [
            "minecraft:default_targeting",
            "minecraft:patrol_follower"
          ]
        }
      },
      "minecraft:become_aggro": {
        "add": {
          "component_groups": [
            "minecraft:vindicator_aggro"
          ]
        }
      },
      "minecraft:stop_aggro": {
        "remove": {
          "component_groups": [
            "minecraft:vindicator_aggro"
          ]
        }
      },
      "minecraft:start_johnny": {
        "add": {
          "component_groups": [
            "minecraft:vindicator_johnny"
          ]
        }
      },
      "minecraft:stop_johnny": {
        "remove": {
          "component_groups": [
            "minecraft:vindicator_johnny"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:default_targeting"
          ]
        }
      },
      "minecraft:give_regeneration_villager": {
        "add": {
          "component_groups": [
            "regeneration"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager": {
        "add": {
          "component_groups": [
            "blessed_regeneration"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_1": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_1"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_2": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_2"
          ]
        }
      },
      "minecraft:give_blessed_regeneration_villager_cured_3": {
        "add": {
          "component_groups": [
            "blessed_regeneration_cured_3"
          ]
        }
      },
      "on_tame": {
        "add": {
          "component_groups": [
            "tame"
          ]
        },
        "remove": {
          "component_groups": [
            "wild"
          ]
        }
      },
      "upgraded_platinum": {
        "add": {
          "component_groups": [
            "upgraded"
          ]
        },
        "run_command": {
          "command": [
            "playsound mob.irongolem.repair @r ~~~",
            "playsound armor.equip_iron @r ~~~"
          ]
        }
      }
    }
  }
}