{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "bbr:beans",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:iron_golem"
    },
    "component_groups": {
      "minecraft:player_created": {
        "minecraft:behavior.hurt_by_target": {
          "priority": 2,
          "entity_types": {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "player"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "creeper"
                }
              ]
            }
          }
        }
      },
      "minecraft:village_created": {
        "minecraft:behavior.defend_village_target": {
          "priority": 1,
          "must_reach": true,
          "attack_chance": 0.05,
          "entity_types": {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "mob"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                }
              ]
            }
          }
        },
        "minecraft:dweller": {
          "dwelling_type": "village",
          "dweller_role": "defender",
          "update_interval_base": 60,
          "update_interval_variant": 40,
          "can_find_poi": false,
          "can_migrate": true,
          "first_founding_reward": 0
        }
      }
    },
    "components": {
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:type_family": {
        "family": []
      },
      "minecraft:nameable": {
        "alwaysShow": false,
        "allowNameTagRenaming": false
      },
      "minecraft:collision_box": {
        "height": 1.8,
        "width": 0.6
      },
      "minecraft:health": {
        "value": 50,
        "max": 50
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "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:can_climb": {},
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "fall",
          "deals_damage": false
        }
      },
      "minecraft:leashable": {
        "soft_distance": 4,
        "hard_distance": 6,
        "max_distance": 10
      },
      "minecraft:balloonable": {
        "mass": 2
      },
      "minecraft:preferred_path": {
        "max_fall_blocks": 1,
        "jump_cost": 5,
        "default_block_cost": 1.5,
        "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.target_when_pushed": {
        "priority": 1,
        "percent_chance": 5,
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "monster"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "creeper"
                }
              ]
            }
          }
        ]
      },
      "minecraft:behavior.move_towards_target": {
        "priority": 2,
        "speed_multiplier": 0.9,
        "within_radius": 32
      },
      "minecraft:behavior.move_through_village": {
        "priority": 3,
        "speed_multiplier": 0.6,
        "only_at_night": true
      },
      "minecraft:behavior.move_towards_dwelling_restriction": {
        "priority": 4,
        "speed_multiplier": 1
      },
      "minecraft:behavior.offer_flower": {
        "priority": 5
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 0.6,
        "xz_dist": 16
      },
      "minecraft:behavior.look_at_player": {
        "priority": 7,
        "look_distance": 6,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 8
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:persistent": {},
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:follow_range": {
        "value": 64
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 10 : 0"
      },
      "minecraft:underwater_movement": {
        "value": 0.02
      },
      "minecraft:scale": {
        "value": 0.8
      },
      "minecraft:behavior.owner_hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.owner_hurt_target": {
        "priority": 2
      },
      "minecraft:annotation.open_door": {},
      "minecraft:behavior.open_door": {
        "on_death": "query.last_hit_by_player ? 10 : 0",
        "close_door_after": true
      },
      "minecraft:attack": {
        "damage": 3,
        "effect_name": "slowness",
        "effect_duration": 30
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 3,
        "within_radius": 25,
        "must_reach": false,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "zombie_villager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "zombie_pigman"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "illager"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "vex"
                }
              ]
            },
            "max_dist": 35.0,
            "must_see": true
          }
        ],
        "must_see": true
      },
      "minecraft:behavior.ranged_attack": {
        "attack_interval_min": 1,
        "attack_interval_max": 2,
        "attack_radius": 15,
        "burst_shots": 1,
        "burst_interval": 2
      },
      "minecraft:shooter": {
        "def": "bbr:gum"
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/bbr_beans.json"
      }
    },
    "events": {
      "minecraft:from_player": {
        "add": {
          "component_groups": [
            "minecraft:player_created"
          ]
        }
      },
      "minecraft:from_village": {
        "add": {
          "component_groups": [
            "minecraft:village_created"
          ]
        }
      },
      "on:death": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "run_command": {
          "command": []
        }
      },
      "on:ignite": {
        "run_command": {
          "command": []
        }
      },
      "on:target_acquired": {
        "run_command": {
          "command": []
        }
      },
      "on:target_escape": {
        "run_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "run_command": {
          "command": []
        }
      },
      "on:tick_action": {
        "run_command": {
          "command": []
        }
      }
    }
  }
}