EntityEvents.hurt('takesapillage:legioner', event => {
    const player = event.source.player
    const mob = event.entity

    if (!player) return
    // event.server.tell(player)
    mob.potionEffects.add(`minecraft:slowness`, 40, 0, false, true)
    // mob.server.runCommandSilent(`effect give @e[type=takesapillage:legioner] slowness 5 2`)
    mob.server.scheduleInTicks(34, t => {
        mob.server.runCommandSilent(`particle minecells:charge ${mob.x} ${mob.y + 2} ${mob.z} 0 0 0 0.1 100 normal`)
        mob.server.runCommandSilent(`playsound minecells:shieldbearer.charge master @a ${mob.x} ${mob.y} ${mob.z} 1 1`)
    })
    mob.server.scheduleInTicks(40, t => {
        //     mob.server.runCommandSilent(`effect give @e[type=takesapillage:legioner] speed 5 10`)
    mob.potionEffects.add(`minecraft:speed`, 25, 3, false, true)
    })
})