{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:cave_spider",
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "monster"
    },
    "components": {
      "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_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.5,
        "width": 0.7
      },
      "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": 12,
        "value": 12
      },
      "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
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:renders_when_invisible": {},
      "minecraft:rideable": {
        "family_types": [
          "baby_undead"
        ],
        "seat_count": 1,
        "seats": {
          "position": [
            0.0,
            0.325,
            0.0
          ]
        }
      },
      "minecraft:type_family": {
        "family": [
          "cavespider",
          "monster",
          "arthropod",
          "mob"
        ]
      }
    },
    "component_groups": {
      "minecraft:spider_angry": {
        "minecraft:angry": {
          "calm_event": {
            "event": "minecraft:on_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:behavior.nearest_attackable_target": {
          "attack_interval": {
            "min": 10,
            "max": 10
          },
          "must_see": true,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "snowgolem"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "irongolem"
                  }
                ]
              }
            }
          ],
          "priority": 2
        }
      },
      "minecraft:spider_hostile": {
        "minecraft:behavior.leap_at_target": {
          "must_be_on_ground": false,
          "priority": 4,
          "yd": 0.4
        },
        "minecraft:behavior.melee_box_attack": {
          "random_stop_interval": 100,
          "track_target": true,
          "priority": 3
        },
        "minecraft:behavior.nearest_attackable_target": {
          "attack_interval": {
            "min": 5,
            "max": 5
          },
          "must_see": true,
          "entity_types": [
            {
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "snowgolem"
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "irongolem"
                  }
                ]
              }
            }
          ],
          "priority": 2
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:become_neutral",
            "filters": {
              "operator": ">",
              "test": "is_brightness",
              "value": 0.49
            }
          }
        }
      },
      "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_wither_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:wither_skeleton"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.325,
              -0.1
            ]
          }
        }
      },
      "minecraft:spider_neutral": {
        "minecraft:environment_sensor": {
          "triggers": {
            "event": "minecraft:become_hostile",
            "filters": {
              "operator": "<",
              "test": "is_brightness",
              "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.325,
              -0.1
            ]
          }
        }
      },
      "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_poison_easy": {
        "minecraft:attack": {
          "damage": 2,
          "effect_duration": 0,
          "effect_name": "poison"
        }
      },
      "minecraft:spider_poison_hard": {
        "minecraft:attack": {
          "damage": 2,
          "effect_duration": 15,
          "effect_name": "poison"
        }
      },
      "minecraft:spider_poison_normal": {
        "minecraft:attack": {
          "damage": 2,
          "effect_duration": 7,
          "effect_name": "poison"
        }
      },
      "minecraft:spider_stray_jockey": {
        "minecraft:addrider": {
          "riders": [
            {
              "entity_type": "minecraft:stray"
            }
          ]
        },
        "minecraft:rideable": {
          "family_types": [
            "skeleton"
          ],
          "seat_count": 1,
          "seats": {
            "position": [
              0.0,
              0.325,
              -0.1
            ]
          }
        }
      }
    },
    "events": {
      "minecraft:become_angry": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "minecraft:spider_angry"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "easy"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_easy"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_hard",
                "minecraft:spider_poison_normal"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "normal"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_normal"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_easy",
                "minecraft:spider_poison_hard"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "hard"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_hard"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_easy",
                "minecraft:spider_poison_normal"
              ]
            }
          }
        ]
      },
      "minecraft:become_hostile": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "minecraft:spider_hostile"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_neutral"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "easy"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_easy"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_hard",
                "minecraft:spider_poison_normal"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "normal"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_normal"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_easy",
                "minecraft:spider_poison_hard"
              ]
            }
          },
          {
            "filters": {
              "test": "is_difficulty",
              "value": "hard"
            },
            "add": {
              "component_groups": [
                "minecraft:spider_poison_hard"
              ]
            },
            "remove": {
              "component_groups": [
                "minecraft:spider_poison_easy",
                "minecraft:spider_poison_normal"
              ]
            }
          }
        ]
      },
      "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
          }
        ]
      },
      "minecraft:on_calm": {
        "add": {
          "component_groups": [
            "minecraft:spider_neutral"
          ]
        },
        "remove": {
          "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"
          ]
        }
      }
    }
  }
}