{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "wesl3y:kuririn_projetil",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "runtime_identifier": "minecraft:snowball"
    },
    "component_groups": {
      "wesl3y:despawn": {
        "minecraft:transformation": {
          "into": "wesl3y:despawn",
          "delay": 0.0
        }
      },
      "wesl3y:kienzan": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:type_family": {
          "family": [ "kienzan", "attack", "projectile" ]
        },
        "minecraft:transformation": {
          "into": "wesl3y:kuririn_damage<wesl3y:kienzan>",
          "delay": 1.5
        },
        "minecraft:projectile": {
          "on_hit": {
            "impact_damage": {
              "damage": 5,
              "knockback": false,
              "destroy_on_hit": false
            },
            "definition_event": {
              "affectProjectile": true,
              "eventTrigger": {
			    "event": "wesl3y:explode",
			    "target": "self"
              }
            }
          },
          "power": 1.5,
          "gravity": 0,
          "inertia": 1,
          "anchor": 1,
          "offset": [0, 0, 0],
          "stop_on_hurt": true
        }
      },
      "wesl3y:kamehameha": {
        "minecraft:variant": {
          "value": 2
        },
        "minecraft:type_family": {
          "family": [ "kamehameha", "attack", "projectile" ]
        },
        "minecraft:transformation": {
          "into": "wesl3y:kuririn_damage<wesl3y:kamehameha>",
          "delay": 1.5
        },
        "minecraft:projectile": {
          "on_hit": {
            "impact_damage": {
              "damage": 10,
              "knockback": false,
              "destroy_on_hit": false
            }
		  },
          "stick_in_ground": {
			"shake_time" : 0.5
          },
          "power": 1.0,
          "gravity": 0,
          "inertia": 1,
          "anchor": 1,
          "offset": [0, 0, 0],
          "stop_on_hurt": false
        }
      },
      "wesl3y:mob.kienzan": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:type_family": {
          "family": [ "mob.kienzan", "attack", "projectile" ]
        },
        "minecraft:transformation": {
          "into": "wesl3y:kuririn_damage<wesl3y:mob.kienzan>",
          "delay": 1.5
        },
        "minecraft:projectile": {
          "on_hit": {
            "impact_damage": {
              "damage": 5,
              "knockback": false,
              "destroy_on_hit": false
            },
            "definition_event": {
              "affectProjectile": true,
              "eventTrigger": {
			    "event": "wesl3y:explode",
			    "target": "self"
              }
            }
          },
          "power": 1.5,
          "gravity": 0,
          "inertia": 1,
          "anchor": 1,
          "offset": [0, 0, 0],
          "stop_on_hurt": true
        }
      },
      "wesl3y:mob.kamehameha": {
        "minecraft:variant": {
          "value": 2
        },
        "minecraft:type_family": {
          "family": [ "mob.kamehameha", "attack", "projectile" ]
        },
        "minecraft:transformation": {
          "into": "wesl3y:kuririn_damage<wesl3y:mob.kamehameha>",
          "delay": 1.5
        },
        "minecraft:projectile": {
          "on_hit": {
            "impact_damage": {
              "damage": 10,
              "knockback": false,
              "destroy_on_hit": false
            }
		  },
          "stick_in_ground": {
			"shake_time" : 0.5
          },
          "power": 1.0,
          "gravity": 0,
          "inertia": 1,
          "anchor": 1,
          "offset": [0, 0, 0],
          "stop_on_hurt": false
        }
      }
    },
    "components": {
      "minecraft:transformation": {
        "into": "wesl3y:despawn",
        "delay": 7.0
      },
      "minecraft:timer": {
        "time": 0.15,
        "looping": true,
        "time_down_event": {
          "event": "minecraft:command",
          "target": "self"
        }
      },
      "minecraft:despawn": {
        "filters": {
          "all_of":[{ "test": "distance_to_nearest_player", "operator": ">", "value": 64 }]
        }
      },
      "minecraft:physics": {},
      "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": {
      "wesl3y:kienzan": {
        "add": {
          "component_groups": ["wesl3y:kienzan"]
        }
      },
      "wesl3y:kamehameha": {
        "add": {
          "component_groups": ["wesl3y:kamehameha"]
        }
      },
      "wesl3y:mob.kienzan": {
        "add": {
          "component_groups": ["wesl3y:mob.kienzan"]
        }
      },
      "wesl3y:mob.kamehameha": {
        "add": {
          "component_groups": ["wesl3y:mob.kamehameha"]
        }
      },
      "minecraft:command": {
        "sequence": [
          {
            "filters": {
              "test": "is_family",
              "value": "kamehameha"
            },
            "queue_command": {
              "command": [
                "summon wesl3y:kuririn_damage ~~~ ~~ wesl3y:kamehameha"
              ]
            }
          },
          {
            "filters": {
              "test": "is_family",
              "value": "mob.kamehameha"
            },
            "queue_command": {
              "command": [
                "summon wesl3y:kuririn_damage ~~~ ~~ wesl3y:mob.kamehameha"
              ]
            }
          }
        ]
      },
      "wesl3y:despawn": {
        "add": {
          "component_groups": ["wesl3y:despawn"]
        }
      },
      "wesl3y:explode": {
        "sequence": [
          {
            "filters": {
              "test": "is_family",
              "value": "kienzan"
            },
            "add": {
              "component_groups": ["wesl3y:despawn"]
            },
            "queue_command": {
              "command": [
                "summon wesl3y:kuririn_damage ~~~ ~~ wesl3y:kienzan",
                "particle wesl3y:spike_yellow.default ~~~",
                "particle wesl3y:slash_white.default ~~~"
              ]
            }
          },
          {
            "filters": {
              "test": "is_family",
              "value": "kamehameha"
            },
            "add": {
              "component_groups": ["wesl3y:despawn"]
            },
            "queue_command": {
              "command": [
                "particle wesl3y:spike_blue.default ~~~",
                "particle wesl3y:slash_white.default ~~~"
              ]
            }
          },
          {
            "filters": {
              "test": "is_family",
              "value": "mob.kienzan"
            },
            "add": {
              "component_groups": ["wesl3y:despawn"]
            },
            "queue_command": {
              "command": [
                "summon wesl3y:kuririn_damage ~~~ ~~ wesl3y:mob.kienzan",
                "particle wesl3y:spike_yellow.default ~~~",
                "particle wesl3y:slash_white.default ~~~"
              ]
            }
          },
          {
            "filters": {
              "test": "is_family",
              "value": "kamehameha"
            },
            "add": {
              "component_groups": ["wesl3y:despawn"]
            },
            "queue_command": {
              "command": [
                "particle wesl3y:spike_blue.default ~~~",
                "particle wesl3y:slash_white.default ~~~"
              ]
            }
          }
        ]
      }
    }
  }
}