{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "wesl3y:escanor_damage",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "wesl3y:despawn": {
        "minecraft:transformation": {
          "into": "wesl3y:despawn",
          "delay": 0.0
        }
      },
      "wesl3y:slash": {
        "minecraft:type_family": {
          "family": [ "slash", "attack", "damage" ]
        },
        "minecraft:behavior.knockback_roar": {
          "duration": 0.3,
          "attack_time": 0.1,
          "knockback_horizontal_strength": 3,
          "knockback_vertical_strength": 1,
          "knockback_range": 2.5,
          "cooldown_time": 0.2,
          "knockback_filters": {
            "test": "has_tag","subject": "other","operator": "!=","value": "escanor"
          },
          "damage_filters": {
            "test": "has_tag","subject": "other","operator": "==","value": "sla"
          },
          "on_roar_end": {
            "event": "wesl3y:despawn"
          }
        }
      },
      "wesl3y:cruel_sun": {
        "minecraft:type_family": {
          "family": [ "cruel_sun", "attack", "damage" ]
        },
        "minecraft:behavior.knockback_roar": {
          "duration": 0.3,
          "attack_time": 0.1,
          "knockback_horizontal_strength": 5,
          "knockback_vertical_strength": 1,
          "knockback_range": 3.5,
          "cooldown_time": 0.2,
          "knockback_filters": {
            "test": "has_tag","subject": "other","operator": "!=","value": "escanor"
          },
          "damage_filters": {
            "test": "has_tag","subject": "other","operator": "==","value": "sla"
          },
          "on_roar_end": {
            "event": "wesl3y:despawn"
          }
        }
      },
      "wesl3y:mob.slash": {
        "minecraft:type_family": {
          "family": [ "mob.slash", "attack", "damage" ]
        },
        "minecraft:behavior.knockback_roar": {
          "duration": 0.3,
          "attack_time": 0.1,
          "knockback_horizontal_strength": 3,
          "knockback_vertical_strength": 1,
          "knockback_range": 2.5,
          "cooldown_time": 0.2,
          "knockback_filters": {
            "test": "is_family","subject": "other","operator": "!=","value": "escanor"
          },
          "damage_filters": {
            "test": "has_tag","subject": "other","operator": "==","value": "sla"
          },
          "on_roar_end": {
            "event": "wesl3y:despawn"
          }
        }
      },
      "wesl3y:mob.cruel_sun": {
        "minecraft:type_family": {
          "family": [ "mob.cruel_sun", "attack", "damage" ]
        },
        "minecraft:behavior.knockback_roar": {
          "duration": 0.3,
          "attack_time": 0.1,
          "knockback_horizontal_strength": 5,
          "knockback_vertical_strength": 1,
          "knockback_range": 3.5,
          "cooldown_time": 0.2,
          "knockback_filters": {
            "test": "is_family","subject": "other","operator": "!=","value": "escanor"
          },
          "damage_filters": {
            "test": "has_tag","subject": "other","operator": "==","value": "sla"
          },
          "on_roar_end": {
            "event": "wesl3y:despawn"
          }
        }
      }
    },
    "components": {
      "minecraft:collision_box": {
        "width": 0.0,
        "height": 0.0
      },
      "minecraft:transformation": {
        "into": "wesl3y:despawn",
        "delay": 1.5
      },
      "minecraft:timer": {
        "time": 0.2,
        "looping": true,
        "time_down_event": {
          "event": "minecraft:command",
          "target": "self"
        }
      },
      "minecraft:environment_sensor": {
        "triggers": [
          {
            "event": "minecraft:command2"
          }
        ]
      },
      "minecraft:damage_sensor": {
        "triggers": {
          "on_damage": {},
          "deals_damage": false
        }
      },
      "minecraft:despawn": {
        "filters": {
          "all_of":[{ "test": "distance_to_nearest_player", "operator": ">", "value": 48 }]
        }
      },
      "minecraft:knockback_resistance": {"value": 1.0},
      "minecraft:physics": {
        "has_gravity": false
      },
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": true
      },
      "minecraft:conditional_bandwidth_optimization": {
        "default_values": {
          "max_optimized_distance": 80,
          "max_dropped_ticks": 10,
          "use_motion_prediction_hints": true
        }
      }
    },
    "events": {
      "minecraft:command": {
        "queue_command": {
          "command": [
            "execute at @s[tag=slash0,tag=!summon] run summon wesl3y:escanor_damage ^^^1 facing ^^^10000 wesl3y:slash",
            "execute at @s[tag=mob.slash0,tag=!summon] run summon wesl3y:escanor_damage ^^^1 facing ^^^10000 wesl3y:mob.slash",
            "tag @s[tag=!summon] add summon"
          ]
        }
      },
      "minecraft:command2": {},
      "wesl3y:despawn": {
        "add": {
          "component_groups": [
            "wesl3y:despawn"
          ]
        }
      },
      "wesl3y:slash0": {
        "queue_command": {
          "command": [
            "tag @s add slash0"
          ]
        }
      },
      "wesl3y:slash": {
        "add": {
          "component_groups": [
            "wesl3y:slash"
          ]
        },
        "queue_command": {
          "command": [
            "particle wesl3y:crack5 ~~~",
            "particle wesl3y:smash_smoke.small ~~~",
            "particle wesl3y:expansion_white.small ~~0.5~",
            "particle wesl3y:smash_white.small ~~~",
            "particle wesl3y:spike_white.small ~~~",
            "playsound random.explode @a"
          ]
        }
      },
	  "wesl3y:cruel_sun": {
	    "add": {
	      "component_groups": [
	        "wesl3y:cruel_sun"
	      ]
        },
        "queue_command": {
          "command": [
            "playsound random.explode @a[r=10]"
          ]
        }
      },
      "wesl3y:mob.slash0": {
        "queue_command": {
          "command": [
            "tag @s add mob.slash0"
          ]
        }
      },
      "wesl3y:mob.slash": {
        "add": {
          "component_groups": [
            "wesl3y:mob.slash"
          ]
        },
        "queue_command": {
          "command": [
            "particle wesl3y:crack5 ~~~",
            "particle wesl3y:smash_smoke.small ~~~",
            "particle wesl3y:expansion_white.small ~~0.5~",
            "particle wesl3y:smash_white.small ~~~",
            "particle wesl3y:spike_white.small ~~~",
            "playsound random.explode @a"
          ]
        }
      },
	  "wesl3y:mob.cruel_sun": {
	    "add": {
	      "component_groups": [
	        "wesl3y:mob.cruel_sun"
	      ]
        },
        "queue_command": {
          "command": [
            "playsound random.explode @a[r=10]"
          ]
        }
      }
    }
  }
}