{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:cobblestone_golem",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:golem_wild": {
        "minecraft:type_family": {
          "family": [
            "cobblestone_golem",
            "golem",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        },
        
        "minecraft:despawn": {
          "despawn_from_chance": true,
          "despawn_from_inactivity": true,
          "despawn_from_simulation_edge": true,
          "remove_child_entities": false,
          "min_range_inactivity_timer": 30,
          "min_range_random_chance": 800,
          "despawn_from_distance": {
            "max_distance": 128,
            "min_distance": 32
          }
        },
        "minecraft:tameable": {
          "probability": 1.0,
          "tame_items": [
            "nicothekid:enchanted_emerald"
          ],
          "tame_event": {
            "event": "minecraft:on_tame",
            "target": "self"
          }
        },

        "minecraft:behavior.hurt_by_target": {
          "priority": 1,
          "alert_same_type": false,
          "hurt_owner": false,
          "entity_types": [
            {
              "must_see": false,
              "reevaluate_description": false,
              "max_dist": 16,
              "walk_speed_multiplier": 1.10,
              "sprint_speed_multiplier": 1.10,
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "creeper",
                    "operator": "!="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:loot": {
          "table": "loot_tables/nicos_mobs/entities/nicothekid_cobblestone_golem.json"
        }
      },
      "component:golem_tamed": {
        "minecraft:is_tamed": {},
        "minecraft:type_family": {
          "family": [
            "cobblestone_golem",
            "golem",
            "player_tamed",
            "player_tamed_aggressive",
            "mob"
          ]
        },
        
        "minecraft:persistent": {},
        "minecraft:sittable": {
          "sit_event": {
            "event": "minecraft:on_sit",
            "target": "self"
          },
          "stand_event": {
            "event": "minecraft:on_stand",
            "target": "self"
          }
        },

        "minecraft:behavior.float": {
          "priority": 0
        },
        "minecraft:behavior.hurt_by_target": {
          "priority": 1,
          "entity_types": [
            {
              "must_see": false,
              "reevaluate_description": false,
              "max_dist": 16,
              "sprint_speed_multiplier": 1.10,
              "walk_speed_multiplier": 1.10,
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player",
                    "operator": "!="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player_tamed",
                    "operator": "!="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "creeper",
                    "operator": "!="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.owner_hurt_by_target": {
          "priority": 2,
          "entity_types": [
            {
              "must_see": false,
              "reevaluate_description": false,
              "max_dist": 16,
              "sprint_speed_multiplier": 1.10,
              "walk_speed_multiplier": 1.10,
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player_tamed",
                    "operator": "!="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "creeper",
                    "operator": "!="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.owner_hurt_target": {
          "priority": 4,
          "entity_types": [
            {
              "must_see": false,
              "reevaluate_description": false,
              "max_dist": 16,
              "sprint_speed_multiplier": 1.10,
              "walk_speed_multiplier": 1.10,
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player_tamed",
                    "operator": "!="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "creeper",
                    "operator": "!="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 5,
          "attack_owner": false,
          "must_reach": false,
          "must_see": true,
          "reselect_targets": true,
          "set_persistent": false,
          "attack_interval": 0,
          "attack_interval_min": 0,
          "persist_time": 0.0,
          "scan_interval": 10,
          "target_invisible_multiplier": 0.7,
          "target_search_height": -1.0,
          "target_sneak_visibility_multiplier": 0.8,
          "within_radius": 8.0,
          "entity_types": [
            {
              "must_see": true,
              "reevaluate_description": false,
              "max_dist": 8,
              "filters": {
                "all_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "creeper",
                    "operator": "!="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player_tamed",
                    "operator": "!="
                  }
                ]
              }
            },
            {
              "must_see": true,
              "reevaluate_description": false,
              "max_dist": 8,
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "illager",
                    "operator": "=="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.follow_owner": {
          "priority": 7,
          "can_teleport": true,
          "ignore_vibration": true,
          "max_distance": 60.0,
          "start_distance": 14.0,
          "stop_distance": 4.0,
          "speed_multiplier": 1.10
        },

        "minecraft:loot": {
          "table": "loot_tables/nicos_mobs/entities/nicothekid_cobblestone_golem_tamedd.json"
        }
      },
      "component:golem_tamed_variant": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "component:golem_standed": {
        "minecraft:balloonable": {
          "mass": 1.00
        },
        "minecraft:knockback_resistance": {
          "value": 0.50
        },
        "minecraft:movement": {
          "value": 0.20
        },
        
        "minecraft:jump.static": {
          "jump_power": 0.42
        },
        "minecraft:movement.basic": {
          "max_turn": 30.0
        },
        "minecraft:navigation.walk": {
          "avoid_damage_blocks": true,
          "avoid_portals": false,
          "avoid_sun": false,
          "avoid_water": true,
          "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_path_over_water": true,
          "can_sink": true,
          "can_swim": false,
          "can_walk": true,
          "can_walk_in_lava": false,
          "is_amphibious": false,
          "blocks_to_avoid": [
            "minecraft:fire",
            "minecraft:flowing_lava",
            "minecraft:lava",
            "minecraft:soul_fire"
          ]
        },
        "minecraft:pushable": {
          "is_pushable": true,
          "is_pushable_by_piston": true
        },
        
        "minecraft:behavior.melee_attack": {
          "priority": 6,
          "attack_once": false,
          "track_target": true,
          "require_complete_path": false,
          "cooldown_time": 1,
          "speed_multiplier": 1.10
        },
        "minecraft:behavior.look_at_target": {
          "priority": 8,
          "probability": 0.02,
          "angle_of_view_horizontal": 360,
          "angle_of_view_vertical": 360,
          "look_distance": 8.0,
          "look_time": [ 2, 4 ]
        },
        "minecraft:behavior.random_stroll": {
          "priority": 9,
          "speed_multiplier": 0.9
        },
        "minecraft:behavior.look_at_player": {
          "priority": 10,
          "look_distance": 8.0,
          "probability": 0.02
        },
        "minecraft:behavior.random_look_around": {
          "priority": 11,
          "look_time": [ 2, 4 ]
        },
        "minecraft:behavior.look_at_entity": {
          "priority": 12,
          "probability": 0.02,
          "angle_of_view_horizontal": 360,
          "angle_of_view_vertical": 360,
          "look_distance": 8.0,
          "look_time": [ 2, 4 ],
          "filters": {
            "any_of": [
              {
                "test": "is_family",
                "subject": "other",
                "value": "mob",
                "operator": "=="
              }
            ]
          }
        }
      },
      "component:golem_seated": {
        "minecraft:balloonable": {
          "mass": 1.25
        },
        "minecraft:knockback_resistance": {
          "value": 1.0
        },
        "minecraft:variant": {
          "value": 2
        },
        
        "minecraft:pushable": {
          "is_pushable": false,
          "is_pushable_by_piston": true
        },
        "minecraft:behavior.stay_while_sitting": {
          "priority": 3
        }
      }
    },
    "components": {
      "minecraft:collision_box": {
        "width": 1.2,
        "height": 2.2
      },
      "minecraft:health": {
        "value": 50,
        "max": 50
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:scale": {
        "value": 1.0
      },
      
      "minecraft:attack": {
        "damage": [ 7, 8 ]
      },
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_lava": false,
        "breathes_solids": true,
        "breathes_water": true,
        "generates_bubbles": false,
        "inhale_time": 0,
        "suffocate_time": 60,
        "total_supply": 60
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": true,
						"damage_modifier": 0.0,
						"damage_multiplier": 1.0
          }
        ]
      },
      "minecraft:healable": {
        "force_use": false,
				"items": [
					{
						"item": "minecraft:cobblestone",
						"heal_amount": 10
					}
				]
			},
			"minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:nameable": {
        "allow_name_tag_renaming": true,
        "always_show": false
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true
      },

      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 16 + (query.equipment_count * Math.Random(1,3)) : 0"
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "component:golem_wild",
            "component:golem_standed"
          ]
        }
      },
      "minecraft:on_tame": {
        "remove": {
          "component_groups": [
            "component:golem_wild"
          ]
        },
        "add": {
          "component_groups": [
            "component:golem_tamed",
            "component:golem_tamed_variant"
          ]
        }
      },
      "minecraft:on_sit": {
        "remove": {
          "component_groups": [
            "component:golem_standed",
            "component:golem_tamed_variant"
          ]
        },
        "add": {
          "component_groups": [
            "component:golem_seated"
          ]
        }
      },
      "minecraft:on_stand": {
        "remove": {
          "component_groups": [
            "component:golem_seated"
          ]
        },
        "add": {
          "component_groups": [
            "component:golem_standed",
            "component:golem_tamed_variant"
          ]
        }
      }
    }
  }
}