{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:spider",
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "minecraft:attack": {
        "damage": 2
      },
      "minecraft:behavior.avoid_mob_type": {
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "armadillo"
                },
                {
                  "test": "enum_property",
                  "subject": "other",
                  "domain": "minecraft:armadillo_state",
                  "value": "unrolled"
                }
              ]
            },
            "max_dist": 6,
            "sprint_speed_multiplier": 1.2
          }
        ],
        "priority": 2
      },
      "minecraft:behavior.float": {
        "priority": 1
      },
      "minecraft:behavior.hurt_by_target": {
        "entity_types": [
          {
            "filters": {
              "operator": "!=",
              "test": "is_family",
              "subject": "other",
              "value": "breeze"
            }
          }
        ],
        "priority": 1
      },
      "minecraft:behavior.look_at_player": {
        "look_time": {
          "min": 1,
          "max": 2
        },
        "look_distance": 6,
        "priority": 7
      },
      "minecraft:behavior.mount_pathing": {
        "priority": 5,
        "target_dist": 0.0,
        "speed_multiplier": 1.25,
        "track_target": true
      },
      "minecraft:behavior.random_look_around": {
        "priority": 7
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 0.8
      },
      "minecraft:breathable": {
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "height": 0.9,
        "width": 1.4
      },
      "minecraft:conditional_bandwidth_optimization": {},
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:experience_reward": {
        "on_death": {
          "expression": "query.last_hit_by_player ? 5 : 0",
          "version": 13
        }
      },
      "minecraft:health": {
        "max": 16,
        "value": 16
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "subject": "self",
              "test": "in_lava"
            }
          }
        ]
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:jump.static": {},
      "minecraft:loot": {
        "table": "loot_tables/entities/spider.json"
      },
      "minecraft:movement": {
        "value": 0.3
      },
      "minecraft:movement.basic": {},
      "minecraft:nameable": {},
      "minecraft:navigation.climb": {
        "can_path_over_water": true,
        "using_door_annotation": true
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:renders_when_invisible": {},
      "minecraft:rideable": {
        "family_types": [
          "baby_zombie",
          "baby_husk"
        ],
        "seat_count": 1,
        "seats": {
          "position": [
            0.0,
            0.54,
            -0.1
          ]
        }
      },
      "minecraft:type_family": {
        "family": [
          "spider",
          "monster",
          "mob",
          "arthropod"
        ]
      }
    },
    "component_groups": {
      "minecraft:spider_angry": {
        "minecraft:angry": {
          "calm_event": {
            "event": "minecraft:become_calm",
            "target": "self"
          },
          "duration": 10,
          "duration_delta": 3
        },
        "minecraft:behavior.leap_at_target": {
          "must_be_on_ground": false,
          "priority": 4,
          "yd": 0.4
        },
        "minecraft:behavior.melee_box_attack": {
          "track_target": true,
          "priority": 3
        }
      },
      "minecraft:spider_bogged_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:bogged"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.325,
              -0.1
            ]
          }
        }
      },
      "minecraft:spider_hostile": {
        "minecraft:behavior.nearest_attackable_target": {
          "attack_interval": {
            "min": 5,
            "max": 5
          },
          "must_see": true,
          "entity_types": [
            {
              "filters": {
                "AND": [
                  {
                    "OR": [
                      {
                        "test": "is_family",
                        "subject": 1,
                        "operator": 0,
                        "value": "player"
                      },
                      {
                        "test": "is_family",
                        "subject": 1,
                        "operator": 0,
                        "value": "snowgolem"
                      },
                      {
                        "test": "is_family",
                        "subject": 1,
                        "operator": 0,
                        "value": "irongolem"
                      }
                    ]
                  }
                ]
              }
            }
          ],
          "priority": 2
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:become_neutral",
            "filters": {
              "test": "is_brightness",
              "operator": ">",
              "value": 0.49
            }
          }
        },
        "minecraft:on_target_acquired": {
          "event": "minecraft:become_angry"
        }
      },
      "minecraft:spider_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:skeleton"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.54,
              0.0
            ]
          }
        }
      },
      "minecraft:spider_neutral": {
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:become_hostile",
            "filters": {
              "test": "is_brightness",
              "operator": "<",
              "value": 0.49
            }
          }
        },
        "minecraft:on_target_acquired": {
          "event": "minecraft:become_angry"
        }
      },
      "minecraft:spider_wither_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:wither_skeleton"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.54,
              0.0
            ]
          }
        }
      },
      "minecraft:spider_parched_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:parched"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.325,
              -0.1
            ]
          }
        }
      },
      "minecraft:spider_stray_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:stray"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.54,
              0.0
            ]
          }
        }
      }
    },
    "events": {
      "minecraft:become_angry": {
        "add": {
          "component_groups": [
            "minecraft:spider_angry"
          ]
        }
      },
      "minecraft:entity_spawned_with_default_jockey": {
        "filters": {
          "any_of": [
            {
              "test": "is_daytime",
              "value": false
            },
            {
              "test": "is_underground",
              "value": true
            }
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:spider_jockey",
            "minecraft:spider_neutral"
          ]
        }
      },
      "minecraft:become_calm": {
        "remove": {
          "component_groups": [
            "minecraft:spider_angry"
          ]
        }
      },
      "minecraft:become_hostile": {
        "add": {
          "component_groups": [
            "minecraft:spider_hostile"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:spider_neutral"
          ]
        }
      },
      "minecraft:entity_spawned_with_biome_specific_jockey": {
        "first_valid": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_daytime",
                  "value": false
                },
                {
                  "test": "is_snow_covered",
                  "value": true
                },
                {
                  "test": "is_underground",
                  "value": false
                }
              ]
            },
            "add": {
              "component_groups": [
                "minecraft:spider_stray_jockey",
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_daytime",
                  "value": false
                },
                {
                  "test": "is_underground",
                  "value": false
                },
                {
                  "any_of": [
                    {
                      "test": "has_biome_tag",
                      "value": "swamp"
                    },
                    {
                      "test": "has_biome_tag",
                      "value": "mangrove_swamp"
                    }
                  ]
                }
              ]
            },
            "add": {
              "component_groups": [
                "minecraft:spider_bogged_jockey",
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_daytime",
                  "value": false
                },
                {
                  "test": "is_underground",
                  "value": false
                },
                {
                  "test": "has_biome_tag",
                  "value": "desert"
                }
              ]
            },
            "add": {
              "component_groups": [
                "minecraft:spider_parched_jockey",
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "filters": {
              "test": "has_biome_tag",
              "value": "nether"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_wither_jockey",
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "trigger": "minecraft:entity_spawned_with_default_jockey"
          }
        ]
      },
      "minecraft:become_neutral": {
        "add": {
          "component_groups": [
            "minecraft:spider_neutral"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:spider_hostile"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "randomize": [
              {
                "trigger": "minecraft:entity_spawned_with_biome_specific_jockey",
                "weight": 80
              },
              {
                "trigger": "minecraft:entity_spawned_with_default_jockey",
                "weight": 20
              }
            ],
            "weight": 1
          },
          {
            "add": {
              "component_groups": [
                "minecraft:spider_neutral"
              ]
            },
            "weight": 99
          }
        ]
      }
    }
  }
}